Bitfinex¶
HaasOnline connects to Bitfinex spot trading. The key needs the read permissions and Create and cancel orders, and it should be restricted to HaasOnline's IP addresses.
If you don't have a Bitfinex account yet, sign up at Bitfinex.
Danger
Create a separate key for HaasOnline. Bitfinex keys can't be shared between programs: each request carries an increasing number (nonce), so two programs using the same key reject each other's requests.
Obtaining the API Key¶
Log in to Bitfinex, open the account menu at the top right and click API Keys.

On the API page, click New API key.

Label and IP restriction¶
The Create a new API key dialog opens. Fill it in:
- Label: any name that identifies the key (for example
HaasOnline API). - Expiry date: the key stops working on this date, and HaasOnline can't trade after it. Pick a date far enough ahead.
- IP Access restrictions: choose Restrict access by IP and paste the IP addresses shown in HaasOnline, separated by commas.

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.
Click Next.
Read permissions¶
Click Allow all, then Next. Read permissions can't move funds. HaasOnline uses Get historical balances entries and trade information, Get orders and statuses and Get wallet balances and addresses; the others do no harm.

Write permissions¶
Switch on Create and cancel orders. Without it, HaasOnline can read your account but can't place or cancel orders.
Leave Create a new withdrawal and Transfer between your wallets off, along with Edit account information, Write account settings and Offer, cancel and close funding. Claim a position, switched on in the screenshot, is only used for margin positions and isn't needed: HaasOnline trades Bitfinex spot.

Danger
Do not enable Create a new withdrawal. HaasOnline never needs it to trade for you, and a trading-only key limits what a leaked key could do.
Click Generate API key.
Confirm¶
Enter the 6-digit code from your 2FA app.

Bitfinex then asks you to check your email. Open the email from Bitfinex and confirm the new key there.

Copy the keys¶
My new API key shows the new key:

- API Key: goes in the HaasOnline Public key field.
- API key secret: goes in the HaasOnline Private key field.
Danger
Copy both now. Bitfinex shows the key only once ("Your API key will NOT be shown again"). If you lose it, 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 Bitfinex. It has one market, so the setup form opens next
-
Enter an Account name, then paste the values from Bitfinex:
- Public key → the Bitfinex
API Key - Private key → the Bitfinex
API key secret

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 Bitfinex
-
Click Test keys. When the test passes, click Save account
If the test fails, check that Create and cancel orders is on, that the IP restriction matches the addresses shown in HaasOnline, and that the key hasn't passed its expiry date. If it still fails, contact Support.