FAQs
What APIs does Backpack support?
Backpack offers two ways to integrate, depending on whether you need request/response actions or real-time streaming data.
REST API
Use the REST API for on-demand actions like fetching market/account data and managing orders.
Common endpoints include:
GET /markets
GET /balances
POST /orders
DELETE /orders
WebSocket API
Use the WebSocket API for low-latency, real-time streams
Common use cases include:
Subscribing to order book updates
Subscribing to candlestick (kline) streams
Subscribing to authenticated account events (e.g., order and position updates)
Can the API be used for futures trading?
Yes. Backpack supports both spot and perpetual futures through the same order and account endpoints. To trade perps, use a perp market symbol For example: POST /orders - SOL_USDC_PERP
Can I withdraw assets using the API?
To enable withdrawals, strict security controls are required (including two-factor authentication).
To configure a withdrawal address with mandatory 2FA, please use: https://backpack.exchange/settings/withdrawal-addresses?twoFactorWithdrawalAddress=true
twoFactorToken parameter (https://docs.backpack.exchange/#tag/Capital/operation/request_withdrawal:~:text=asset%20to%20withdraw.-,twoFactorToken,-string)is currently disabled
What are the API rate limits? Are they different per server or per subaccount?
Rate limits are applied per subaccount, not per server. By default, each subaccount can make up to 2000 requests per minute across standard REST endpoints Historical market data endpoints are limited at 30 requests per minute per subaccount. (“Historical endpoints” refers to REST routes that return time-range data such as candles/trades.)
If you hit a limit, you’ll receive HTTP 429 responses. Consider using WebSocket streams for high-frequency market data.
What are the common errors when placing orders?
Error Code
Description
Resolution
INVALID_CLIENT_REQUEST'
Invalid signature
Verify query string construction method (sorting, instruction value). Also verify that your boolean values in query string are lowercase. “True” should be “true”.
INVALID_CLIENT_REQUEST'
Request has expired
Time that took request to reach exchange servers exceeded X-Window and window value. Try to increase the window
INVALID_CLIENT_REQUEST'
Quantity decimal too long
Adjust quantity to stepSize
INVALID_CLIENT_REQUEST'
Invalid X-Signature Header
Query string was signed with wrong keypair Verify that you use ED25519
429
Too many requests
Reduce request frequency; consider WebSocket streaming
Where can I find SDKs?
The official SDK is currently available only in Rust: https://github.com/backpack-exchange/bpx-api-client Please refer to the following page for community-maintained examples in various languages: https://support.backpack.exchange/exchange/api-and-developer-docs/api-clients
How can I get real-time market data for a trading pair?
Use WebSocket streams for live market updates:
Book Ticker (bookTicker.<symbol>) Best bid/ask prices and quantities in real time. Ideal for top-of-book displays.
Depth (depth.<symbol>) Incremental order-book updates. Start by fetching an initial snapshot via REST, then apply depth deltas from the stream. Depth is available in real-time or aggregated modes (e.g., 200ms / 600ms / 1000ms) to reduce traffic. See the full list of streams here: https://docs.backpack.exchange/#tag/Streams
How can I improve the stability of my trading bot?
Recommended best practices:
Prefer WebSocket subscriptions for real-time order/trade updates instead of polling REST
Implement retry + exponential backoff for REST requests and WS reconnects
Keep a local cache of frequently used reference data (markets, symbols, filters) and refresh periodically
Monitor and alert on critical API errors (auth failures, expired requests, and 429 rate limits)
Last updated
