Binance¶
HaasOnline connects to Binance (spot), Binance USDT Futures and Binance COIN Futures. One Binance key covers all three if it has spot and futures trading enabled. Binance only allows trading on a key that is restricted to trusted IP addresses.
If you don't have a Binance account yet, sign up at Binance.
Obtaining the API Key¶
Log in to Binance. In the dashboard menu on the left, open Account and click API Management. Binance only lets you create a key after you have completed identity verification (KYC).

Info
To trade Binance USDT Futures or Binance COIN Futures, open your Binance Futures account before you create the key. Binance can't add futures permission to a key created before the Futures account was opened.
Click Create API. (Create Tax Report API makes a read-only key for tax tools, which can't trade.)

Choose System generated and click Next. HaasOnline signs its requests with HMAC, which is what this key type uses; a Self-generated (Ed25519 or RSA) key does not work with HaasOnline.

Name and verify¶
Enter a label that identifies the key (for example HaasOnline API) and click Next.

Complete the security verification Binance asks for, such as the code from your authenticator app.

Copy the keys and set the restrictions¶
Binance opens the new key's page, with its restrictions ready to edit:
- API Key: goes in the HaasOnline Public key field.
- Secret Key: goes in the HaasOnline Private key field.
Danger
Copy the API Key and Secret Key now. Binance doesn't show them in full again after you leave this page. If you lose the secret, delete the key and create a new one.
On the same page:
- Under API restrictions, tick Enable Spot & Margin & Stock Trading for Binance spot, and Enable Futures for Binance USDT Futures or Binance COIN Futures (Enable Reading is always on). Leave everything else unticked, including Enable Withdrawals.
- Under IP access restrictions, choose Restrict access to trusted IPs only (Recommended), add the IP addresses shown in HaasOnline (or your server's IP on a self-hosted license, see below) separated by spaces, and click Confirm.

Click Save at the top right and complete the verification (authenticator app and email).

Danger
Do not enable withdrawals or transfers. HaasOnline never needs them to trade for you, and a trading-only key limits what a leaked key could do.
Info
For the IP restriction:
- On HaasOnline TradeServer Cloud, paste the addresses shown under IP addresses to whitelist in the HaasOnline account setup form (use its copy icon).
- On a self-hosted TradeServer license, use the public IP address of your machine or server.
Binance deletes a key that has any permission other than reading enabled while it is unrestricted, so the IP restriction is required.
Adding the API to HaasOnline TradeServer Cloud¶
Log in to HaasOnline TradeServer Cloud and open Exchange Accounts from the user menu in the top right. The Adding an API to the Platform guide shows these first steps with screenshots.
- Click the + button at the bottom of the accounts list (on an empty page it reads Add account)
- Select Exchange account
- In Connect an exchange account, click Binance
-
Under What should this account trade?, choose Binance for spot trading, or Binance COIN Futures or Binance USDT Futures under Derivatives, then click Continue with .... Each market is its own HaasOnline account, so repeat these steps with the same key to add another market. (Binance.US has its own guide: Binance US.)

-
Enter an Account name, then paste the values from Binance:
- Public key → the Binance
API Key - Private key → the Binance
Secret Key

Info
Check for spaces at the start and end of each value after you paste it. Stray spaces are a common cause of a failed key test.
- Public key → the Binance
-
Click Test keys. When the test passes, click Save account
If the test fails, check that the key has Enable Spot & Margin & Stock Trading (spot) or Enable Futures (USDT or COIN Futures) ticked, and that the trusted IP addresses match the ones shown in HaasOnline. If it still fails, contact Support.