Bitget¶
HaasOnline connects to Bitget (spot), Bitget USDT Futures and Bitget COIN Futures. The key needs Read-write with Manage and Trade, and it should be bound to HaasOnline's IP addresses. HaasOnline asks for three values: the API key, the secret key and the passphrase you set when creating the key.
If you don't have a Bitget account yet, sign up at Bitget.
Obtaining the API Key¶
Log in to Bitget, open the account menu and click API keys.

On the API keys page, click Create API key.

Bitget asks which type of key to create. Choose System-generated API key. HaasOnline signs its requests with HMAC, which is what this type uses; a User-generated API key (RSA) does not work with HaasOnline.

Configure the key¶
Fill in the Create API key form:
- Note: any name that identifies the key (for example
HaasOnline API). - Passphrase (API token): a passphrase of your choice. You will enter it in HaasOnline later, so note it down now: Bitget does not show it again.
-
Permissions: choose Read-write, then under Unified trading account tick both:
- Manage: HaasOnline reads your balances and sets leverage and position mode on futures.
- Trade: HaasOnline places and cancels orders and reads your orders and positions.
Leave Search (P2P) and Withdraw (Wallet) unticked. - Bind IP addresses: paste the IP addresses shown in HaasOnline (or your server's IP on a self-hosted license, see below), separated by commas. Bitget marks this optional, but a bound key can't be used from anywhere else.

Danger
Do not tick Withdraw. HaasOnline never needs it to trade for you, and a trading-only key limits what a leaked key could do.
Info
For the IP binding:
- 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.
Classic accounts
These steps are for a Bitget Unified trading account, the default for new accounts. On an older Classic account the form lists other permissions: choose Read-write, then tick spot Trade and futures Orders and Holdings, and leave withdrawals and transfers off. HaasOnline works out which kind of key it is by itself.
Click Create.
Verify¶
In Security verification, enter the code Bitget emails you and your Google Authenticator verification code, then click Confirm.

Copy the keys¶
Create Succeeded shows the new key:

- Access APIKey: starts with
bg_and goes in the HaasOnline Public key field. - SecretKey: goes in the HaasOnline Private key field.
- The passphrase you typed in the form goes in the HaasOnline Passphrase field. It isn't shown on this page.
Danger
Copy the SecretKey now and keep the passphrase. If you lose either, delete the key and create a new one.
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 Bitget
-
Under What should this account trade?, choose Bitget for spot trading, or Bitget USDT Futures or Bitget COIN 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.

-
Enter an Account name, then paste the values from Bitget:
- Public key → the Bitget
Access APIKey - Private key → the Bitget
SecretKey - Passphrase → the passphrase you set when creating the 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 Bitget
-
Click Test keys. When the test passes, click Save account
If the test fails, check that the key is Read-write with Manage and Trade, that the passphrase is exactly the one you set, and that the bound IP addresses match the ones shown in HaasOnline. If it still fails, contact Support.