Skip to main content

Connect Backpack

Trade uses Backpack’s unified cross-margin account to trade spot, cross margin and perpetuals. This guide covers what to prepare on Backpack and what to enter in Trade.

Prepare on Backpack

  1. On the API Keys page in your Backpack settings, generate a key pair: a public key and a private key.

  2. Leave Read Only off: while it’s on, the key pair can only view and can’t place orders. Backpack API keys have no other permission switches.

  3. If you set an IP allowlist on the key, add your Trade server’s egress IP addresses. The Add account window lists them under Server egress IPs. Choose Copy all egress IPs.

Account mode

The only account mode is Unified cross-margin account: spot, cross margin and perpetual contracts share collateral. For cross margin, the exchange borrows and repays automatically when orders are placed.

To run a spot leg on Backpack, first turn off Auto Lend for that subaccount in Backpack: while it is on, idle coins are lent out automatically, spot orders cannot use lent coins, and closing sells are rejected by the exchange for insufficient balance. Cross margin legs are not affected: the exchange redeems lent coins automatically when the order needs them.

Contract leverage is set in the combo, and Trade applies it on the exchange.

Enter it in Trade

In Trade, open Accounts, choose Add account and select Backpack Exchange. For the general steps, see Connect an exchange.

FieldWhat to enter
API keyThe base64 public key from the API Keys page
Secret KeyThe base64 private key of the same key pair
Account nameA name of your choice
Account modeUnified cross-margin account
Supported marketsSpot, cross margin and perpetuals. Select the ones you trade; selecting spot also adds cross margin

Choose Verify and add.

Common questions

The API key or API secret has the wrong format

Both are base64 strings of about 44 characters. Check that each was copied in full and that the public and private keys aren’t swapped.

Was this article helpful?