Add an Exchange API

Learn how to create API keys on supported exchanges and connect them to BeeQuant for automated trading.

I. Overview

An exchange API (Application Programming Interface) connects BeeQuant to an exchange. When a strategy signal is triggered, BeeQuant automatically calls the exchange API to place orders, query data, and perform other operations, enabling fully automated quantitative trading from end to end.

When is an API required?
Backtest — Not required
Simulation — Not required
Live trading / Testnet — Connection required
Security: BeeQuant stores your API key in encrypted form and uses it only for strategy trading operations. We do not use it for any unauthorized operation. Enable trading permission only; never enable withdrawal permission.

II. Supported Exchanges

BeeQuant currently supports the following major exchanges, with more integrations planned.

B
Binance
The world's largest cryptocurrency exchange
SpotUSDT-margined derivativesCoin-margined derivatives
Required credentials: API Key + Secret Key
O
OKX
A leading cryptocurrency trading platform
SpotUSDT-margined derivativesCoin-margined derivatives
Required credentials: API Key + Secret Key + Passphrase
📢 Support for more exchanges, including Bybit and Gate.io, is under active development. Stay tuned.

III. Create an API Key

After you create an API key on an exchange and connect it to BeeQuant, the platform can execute trades on your behalf. Follow the exchange-specific instructions below.

B

3.1 Binance Setup Guide

1
Sign in to Binance
Visit binance.com and sign in. Your identity verification (KYC) must be complete.
2
Open API Management
Click your profile picture in the upper-right corner → API Management, or go directly to binance.com/en/my/settings/api-management.
3
Create an API key
Click Create API → select System generated → enter a label such as BeeQuant → complete the security verification.
4
Configure permissions
Select permissions required by your strategy:
Enable Spot & Margin Trading (required for spot strategies)
Enable Futures (required for derivatives strategies)
Do not enable withdrawals
5
Set an IP allowlist (recommended)
Under Restrict access to trusted IPs only, add your server's IP address. After renting a BeeQuant server, its IP is available on the server management page. If you cannot set it yet, select Unrestricted temporarily and add the restriction later.
6
Save the API key and secret key
After creation, save the API key and secret key immediately. The secret key is displayed only once and cannot be viewed again after you close the page. If it is lost, create a new key.
O

3.2 OKX Setup Guide

1
Sign in to OKX
Visit okx.com, sign in, and make sure identity verification is complete.
2
Open API Management
Click your profile picture → API to open API Management.
3
Create a V5 API key
Click Create V5 API Key and enter:
API name: a custom name such as BeeQuant
Passphrase: set a password that you will enter later when connecting the API
Permissions: select Trade
4
Set an IP allowlist (recommended)
As with Binance, add the server IP to the allowlist for stronger security.
5
Save all three credentials
An OKX API requires all three credentials. Save every item:
① API Key
② Secret Key
③ Passphrase

IV. API Credentials

Credential fields differ by exchange. The following table explains each field:

FieldDescriptionBinanceOKX
API nameA custom name used to distinguish APIs within BeeQuantRequiredRequired
API KeyThe public key generated by the exchange to identify youRequiredRequired
Secret KeyThe private key generated by the exchange for signing requests; shown only once at creationRequiredRequired
PassphraseAn OKX-specific passphrase set by you when creating the APIRequired

V. Connect to BeeQuant

After obtaining an API key, connect it within BeeQuant:

1
Open Exchange Management
Click Exchanges in the left navigation to open the exchange management page.
2
Click Add Exchange
Click Add Exchange in the upper-right corner to open the API configuration page.
3
Select the exchange
Select Binance or OKX at the top of the page. The system automatically displays the fields required by that exchange.
4
Enter API details
Enter the following fields:
Name: a recognizable name, such as "Binance Main Account"
API Key: the public key copied from the exchange
API Secret: the private key copied from the exchange
Passphrase (OKX only): the passphrase set when the API was created
5
Submit and validate
Click Add Exchange to submit. The system automatically validates the API connection. After validation succeeds, the connected exchange and account balance appear on the exchange management page.
💡 Tip: After the connection succeeds, you can select the connected account in the trading-engine node when deploying a live strategy.

VI. Permission Details

Enable the appropriate API permissions for your strategy type:

Strategy typeRequired Binance permissionRequired OKX permission
Spot strategyEnable Spot & Margin TradingTrade
USDT-margined derivatives strategyEnable FuturesTrade
Coin-margined derivatives strategyEnable FuturesTrade
Mixed strategySpot + derivatives tradingTrade
⚠️ Important security warning: Never enable withdrawal permission. BeeQuant needs trading permission only. Withdrawal permission increases the risk that funds could be stolen.

VII. Security Recommendations

Never enable withdrawals
An API key needs trading permission only. Enabling withdrawals increases the risk of stolen funds.
Set an IP allowlist
Add the server IP to the exchange API allowlist so that only the specified IP can use the API.
Protect your credentials
Never share an API key or secret key, and never expose credentials in a public location such as GitHub or a forum.
Rotate keys regularly
Replace API keys every three to six months to reduce long-term security risk, and update BeeQuant after each rotation.
Isolate APIs
Create a separate API key for each strategy. If one API behaves abnormally, it can be disabled without affecting other strategies.
Respond to anomalies immediately
If you detect suspicious trading activity, disable or delete the API key on the exchange immediately and change the account password.

FAQ

Q: What should I do if API connection validation fails?
A: Check each item: (1) the API key and secret key were copied correctly, with no extra spaces; (2) trading permission is enabled; (3) if an IP allowlist is configured, the server IP has been added; (4) for OKX, the passphrase is correct; and (5) the API key has not expired or been disabled.
Q: Can I connect multiple API keys for one exchange?
A: Yes. You can connect multiple API keys for the same exchange and distinguish them with different names. This lets different strategies use isolated APIs for better risk separation.
Q: Must I reconnect the API after changing its exchange permissions?
A: If you only change permissions, such as adding derivatives trading permission, and the API key remains the same, you do not need to reconnect it. If you generate a new API key, delete the old connection from BeeQuant and add the new one.
Q: What if I lose the secret key?
A: A secret key is shown only once when created and cannot be recovered. Delete that API key on the exchange, create a new one, and update the connection in BeeQuant.
Q: Can I use a subaccount API?
A: Yes. An API key created for an exchange subaccount can also be connected to BeeQuant. Subaccounts effectively isolate strategy funds and are a recommended security practice.
    BeeQuant - AI Quantitative Trading Platform