Skip to content

Poloniex

HaasOnline connects to Poloniex (spot) and Poloniex Futures (perpetual futures). One Poloniex key covers both if it has spot and futures trading enabled. Poloniex only allows trading on a key that is restricted to trusted IP addresses.

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

Obtaining the API Key

Log in to Poloniex, open the account menu at the top right and click API Keys.

Poloniex account menu with API Keys.

On API Management, check that API access is switched on, then click Create API Key.

Poloniex API Management page with the Create API Key button and API access switched on.

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

Poloniex Select API Key Type dialog with System generated and Self-generated.

Fill in the key

  • API Name: any name that identifies the key (for example HaasOnline API).
  • API Permissions: tick Spot and margin trading for Poloniex spot and Futures trading for Poloniex Futures (Read-only is always on). Leave Withdrawal unticked.
  • Spot and Margin Trading Pair Whitelist and Futures Trading Pair Whitelist: keep No restrictions, so bots can trade every pair.
  • IP Address Restrictions: choose Restrict access to trusted IPs only and add the IP addresses shown in HaasOnline (or your server's IP on a self-hosted license, see below), separated by spaces.

Poloniex Create API Key form with Spot and margin trading and Futures trading ticked, Withdrawal unticked, no trading pair restrictions, and Restrict access to trusted IPs only with three IP addresses.

Click Add.

Danger

Do not tick Withdrawal. HaasOnline never needs it 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.

Poloniex's Unrestricted option doesn't allow trading, so the IP restriction is required.

Verify

Click Send Code and enter the code Poloniex emails you, enter the code from your authenticator app, then click Submit.

Poloniex Security Verification with the email code and Google Authenticator code fields.

Copy the keys

API Details shows the new key with its permissions and IP addresses:

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

Poloniex API Details with the API Name, API Key, Secret Key, the Reading, Spot and margin trading and Futures trading permissions, and the IP address restrictions.

Danger

Copy the Secret Key now before you click OK. 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.

  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 Poloniex
  4. Under What should this account trade?, choose Poloniex for spot trading, or Poloniex Futures under Derivatives, then click Continue with .... Each market is its own HaasOnline account, so repeat these steps with the same key to add the other market.

    What should this account trade, with Poloniex selected under Spot and Poloniex Futures under Derivatives.

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

    • Public key → the Poloniex API Key
    • Private key → the Poloniex Secret Key

    Poloniex 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 the key has Spot and margin trading (Poloniex) or Futures trading (Poloniex Futures) ticked, and that the trusted IP addresses match the ones shown in HaasOnline. If it still fails, contact Support.