# API Setup Guide

To ensure the smooth execution of your quantitative strategies, please configure your exchange API according to the following instructions.

#### Important Note:&#x20;

Only one API key can be added to each exchange in this account.

Security Notice: To ensure asset security, please be sure to add our server IP 8.209.218.178 to your exchange API's IP whitelist.

<figure><img src="/files/z2Gr7HkBTQwWSh3PA4Hl" alt=""><figcaption></figcaption></figure>

#### Core Parameter Setting Recommendations

\
Permissions and Instruments\
Currency: It is recommended to check "All Currencies" for optimal strategy coverage. You can also customize your selection, supporting up to 50 currencies.

Direction: Please select "All," "Long Only," or "Short Only" according to your strategy.

<figure><img src="/files/TP9qm5nUzwEviPW3fcvK" alt=""><figcaption></figcaption></figure>

API Type: If using the exchange's demo account (Testnet) API, please be sure to select "Demo Account" here.

#### Risk Control Parameters (Strongly Recommended)

Take Profit: Automatically close positions when unrealized profit reaches a specified percentage. Recommended range: 30% \~ 90%.

Stop Loss: Automatically close positions when unrealized loss reaches a specified percentage. Recommended range: 20% \~ 50%.

Profit Protection: Recommended to enable. The system will automatically activate the protection mechanism based on the overall account profitability.

Close Signal: Recommended to enable. Receive intelligent close signals from AI.

<figure><img src="/files/HigQ7HIuQGmjO1d80YEj" alt=""><figcaption></figcaption></figure>

#### Account and Trading Limits

Single Transaction Amount: The minimum limit varies depending on the exchange, but it is recommended to be no less than 20 USDT to ensure orders can be successfully entered into the market.

Leverage: Set the leverage ratio for contract trading; a range of 2x to 5x is recommended.

Margin Limit: Set the maximum amount of capital the account can use for trading. Once this limit is reached, the system will not create new positions.

**For questions, join the Telegram group.:**\
&#x20;<https://t.me/+LMNKYyESSVk2OGE1><br>

***

**Platform：**

**Gate**&#x20;

1. Visit: <https://www.gate.com/myaccount/profile/api-key/manage>
2. Click "Create API Key"
3. Enter the whitelist IP address: 8.209.218.178
4. In the permission settings, enable "Perpetual Futures - Read and Write"
5. Copy the generated API key and secret, and add them to BUYX

**Binance**&#x20;

1. Visit: <https://www.binance.com/en/my/settings/api-management>
2. Select "Create API - System generated"
3. Enter the whitelist IP address: 8.209.218.178
4. Select "Enable Futures"
5. Go to "Contract Trading Settings" and set "Position Mode" to "One-way Mode"
6. Copy the generated API key and secret, and add them to BUYX

**OKX**

1. Visit: <https://www.okx.com/account/my-api>
2. Click “Create API Key”
3. Enter the whitelist IP address: 8.209.218.178
4. In the permission settings, enable “Transaction - Read/Write” permissions
5. Create API Password
6. Copy the generated API key and key, and add them to BUYX.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://buydip.gitbook.io/buyx.ink-buyx/api-setup-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
