Skip to content

Binance US

HaasOnline connects to Binance US spot trading (Binance.US in HaasOnline). The key needs trading enabled, and it should be restricted to HaasOnline's IP addresses.

If you don't have a Binance US account yet, sign up at Binance US.

Obtaining the API Key

Log in to Binance US, open the account menu at the top right and click API Management. Binance US only lets you create a key after you have completed identity verification.

Binance US account menu with API Management.

Under Exchange, click Create API. (Create Tax Report API makes a read-only key for tax tools, which can't trade.)

Binance US API Management page with the Create API and Create Tax Report API buttons.

Choose System-generated as the signing method. HaasOnline signs its requests with HMAC, which is what this method uses; a Self-generated (Ed25519 or RSA) key does not work with HaasOnline.

Binance US Create exchange API key dialog with System-generated (HMAC) and Self-generated signing methods.

Name and verify

Enter an API Name that identifies the key (for example HaasOnline API) and click Verify & create API.

Binance US Create exchange API key Details step with the API Name and the Verify & create API button.

Binance US emails you a confirmation link. Open it in another tab and keep this window open: once you confirm, the same window moves on to API key created with the secret key. Don't click Done before that, or the secret key isn't shown.

Binance US Confirm your email step: open the link Binance US sent to finish creating the key.

Copy the keys

API key created shows the new key:

Binance US API key created with the API Name, Product Exchange, Key type HMAC, the API Key and the Secret Key.

  • API Key: goes in the HaasOnline Public key field.
  • Secret Key: goes in the HaasOnline Private key field.

Danger

Copy the Secret Key now. Binance US doesn't show it again after you close this window. If you lose it, delete the key and create a new one.

Enable trading and restrict IPs

The new key appears in the API Management list. Open its restrictions to bring up Edit API, then:

  • Under API restrictions, tick Enable Spot Trading (Enable Read is always on). Leave Enable Withdrawals unticked.
  • Under IP access restrictions, choose Trusted IP only (Recommended) and add the IP addresses shown in HaasOnline to Trusted IP addresses (or your server's IP on a self-hosted license, see below), separated by commas or new lines.

Binance US Edit API dialog with Enable Read and Enable Spot Trading ticked, Enable Withdrawals unticked, and Trusted IP only with trusted IP addresses.

Click Save and confirm with 2FA.

Danger

Do not enable withdrawals. 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 US deletes unrestricted keys with spot trading enabled that haven't been used for 90 days.

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.

  1. Click the + button at the bottom of the accounts list (on an empty page it reads Add account)
  2. Select Exchange account
  3. In Connect an exchange account, click Binance
  4. Under What should this account trade?, choose Binance.US under Spot, then click Continue with Binance.US

    What should this account trade, with Binance.US selected under Spot.

  5. Enter an Account name, then paste the values from Binance US:

    • Public key → the Binance US API Key
    • Private key → the Binance US Secret Key

    Binance.US account setup form with the IP whitelist, account name, public key and private key fields.

    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.

  6. Click Test keys. When the test passes, click Save account

If the test fails, check that Enable Spot Trading is ticked on the key and that the trusted IP addresses match the ones shown in HaasOnline. If it still fails, contact Support.