CCXT

CCXT vs the Backpack Exchange API and its SDKs

Backpack's only official client is Rust. CCXT compared with the community Python SDKs on ED25519 signing, language coverage, streaming and unified structures.

Backpack Exchange has an unusual client situation. Its own repository, backpack-exchange/bpx-api-client, is titled "Official API clients for Backpack Exchange" and states plainly: "Currently, only a Rust client is available." Backpack's API Clients page then lists clients for Python, JavaScript, TypeScript, Go and Rust, prefaced with a caveat — "Some of the SDKs listed below are community-built and are not officially maintained or endorsed by the Backpack team."

So unless you write Rust, the choice is between a community SDK and a unified library. The question that decides it: do you want a Backpack-shaped client, or do you want Backpack to look like the other venues you trade?

TL;DR

  • Pick a community SDK if Backpack is your only venue, you are in Python, and you want method and field names that match Backpack's own reference exactly — execute_order, Bid, SOL_USDC.
  • Pick CCXT if you want one maintained dependency covering Backpack's spot, margin and perpetual markets with the same 69 unified capabilities and the same method names you already use elsewhere, in seven languages.
  • Backpack's request signing is ED25519, not HMAC, over a payload prefixed with a per-endpoint instruction string. It is a small piece of code to get wrong, and CCXT has already written it.

At a glance

CCXTBackpack SDKs
Venues covered104 (Backpack is one of them)Backpack only
Official client languagesn/a — CCXT is third-party by designRust only (bpx-api-client)
Community client languagesn/aPython, JavaScript, TypeScript, Go — listed but unendorsed
Languages you can use it fromTypeScript, JavaScript, Python, PHP, C#/.NET, Go, Java — one APIwhichever client exists for your language
Packages to install1 (ccxt)1 per language, from a different author each time
Markets in one clientspot, margin and perpetualsper SDK
Unified market data + trading APIyes — 69 capabilities on backpackno — Backpack's own payload shapes
ED25519 request signingbuilt inbuilt in by each SDK
WebSocketsyes — 15 watch* / unWatch* methodsvaries: bpx-py's README documents REST only, backpack-exchange-sdk ships a WebSocketClient
Raw endpoint accessyes — 56 endpoints as implicit methodsyes
Built-in rate limiteryes, on by default (rateLimit 50 ms)not documented in either Python SDK README
Unified error typesyes — 41 typed exceptions in one hierarchyHTTP status plus Backpack error payloads
Testnet / sandboxnone — Backpack publishes no sandbox in CCXTnone
Popularity43.8k GitHub stars · 4.8M PyPI + 494k npm installs/month (one package, every venue)bpx-api-client (Rust, official) 46 stars; bpx-py 29 stars · 974 PyPI installs/month; backpack_exchange_sdk 42 stars · 162 PyPI installs/month
LicenceMITbpx-api-client Apache-2.0; bpx-py Apache-2.0; backpack_exchange_sdk MIT
SupportDiscord, Telegram, GitHub — usually same-dayeach SDK's own GitHub issues; Backpack's Discord for the API itself

Figures verified September 2026 against CCXT v4.5.77, the backpack-exchange/bpx-api-client, sndmndss/bpx-py and solomeowl/backpack_exchange_sdk repositories, Backpack's API Clients support page, and install counts from PyPI and npm.

The same job, written both ways

The Python side below uses backpack-exchange-sdk, the community SDK that documents both REST and WebSocket coverage.

Fetch a ticker

import ccxt

exchange = ccxt.backpack()
ticker = exchange.fetch_ticker('SOL/USDC')
print(ticker['last'], ticker['baseVolume'])

Backpack's market ids are underscore-separated — SOL_USDC for spot and SOL_USDC_PERP for the perpetual. CCXT translates those into unified symbols, 'SOL/USDC' and 'SOL/USDC:USDC', and returns a unified ticker structure whose keys are the same on every venue.

Place a limit order

import ccxt

exchange = ccxt.backpack({'apiKey': '...', 'secret': '...'})
order = exchange.create_order('SOL/USDC', 'limit', 'buy', 1, 100)
print(order['id'], order['status'])

Backpack's own vocabulary is Bid/Ask rather than buy/sell, orderType rather than type, and quantities as strings. CCXT maps those onto the unified create_order(symbol, type, side, amount, price) signature and returns a unified order structure, so the call is the same one you make on Binance or Bybit.

Stream an order book

import ccxt.pro
import asyncio

async def main():
    exchange = ccxt.pro.backpack()
    while True:
        orderbook = await exchange.watch_order_book('SOL/USDC')
        print(orderbook['bids'][0], orderbook['asks'][0])

asyncio.run(main())

The SDK hands you raw stream messages through a callback. CCXT hands you a maintained order book: the REST snapshot is fetched and aligned with the stream, updates arriving during the fetch are buffered and replayed, sequence gaps trigger a re-sync, and the socket reconnects and resubscribes after a drop. watch_order_book returns the same structure as fetch_order_book, so swapping polling for streaming does not change the code downstream.

CCXT also implements watchOrderBookForSymbols, watchTradesForSymbols and watchOHLCVForSymbols for multiplexing several symbols onto one connection, plus unWatchTrades, unWatchTradesForSymbols, unWatchOrders and unWatchPositions for tearing a subscription down without dropping the socket.

Where the differences actually bite

ED25519 signing, with an instruction prefix

Backpack does not sign with HMAC. Each private request is signed with ED25519 over a payload that begins with a per-endpoint instruction string — orderExecute, balanceQuery, orderCancelAll and so on — followed by the request parameters in sorted order, a millisecond timestamp and a window. The signature goes out as X-Signature alongside X-Timestamp, X-Window and X-API-Key, and your secret is a base64-encoded seed rather than a shared HMAC key.

None of that is hard, and all of it is easy to get subtly wrong — a parameter sorted in the wrong order or a missing instruction produces the same unhelpful rejection. CCXT carries the instruction map for every endpoint and does the signing in all seven languages.

Spot, margin and perpetuals in one client

backpack in CCXT declares spot, margin and swap, and the derivatives capabilities are unified methods rather than raw calls: fetch_positions, fetch_funding_rate, fetch_funding_rate_history, fetch_funding_history, fetch_open_interest, fetch_open_interest_history, fetch_mark_ohlcv and fetch_index_ohlcv. Order entry covers create_orders for batching, create_order_with_take_profit_and_stop_loss, create_trigger_order, create_post_only_order and create_reduce_only_order — 69 capabilities in total, with the same names on the next venue.

Seven languages, one API

Backpack's only official client is Rust. CCXT does not target Rust, and this page will not pretend otherwise — but if your service is in TypeScript, Python, PHP, C#, Go or Java, CCXT is a maintained first-party-quality client where otherwise you would pick a community project or write your own:

import ccxt
exchange = ccxt.backpack()
ticker = exchange.fetch_ticker('SOL/USDC')

Rate limits you do not have to model

CCXT sets rateLimit = 50 ms for backpack — the exchange file records the venue's allowance of twenty requests per second — and ships a token-bucket throttler that is on by default. You call methods in a loop; the library paces them. Neither Python SDK's README documents a rate limiter, so with those the pacing and the back-off are yours to write.

Precision, rounding and string math

load_markets() reads Backpack's market metadata and exposes tick size, step size and minimum order size through amount_to_precision, price_to_precision and cost_to_precision, backed by the Precise string-arithmetic class. Backpack expects prices and quantities as strings anyway, which is exactly where float formatting quietly ruins an order:

amount = exchange.amount_to_precision('SOL/USDC', 1.23456789)
price = exchange.price_to_precision('SOL/USDC', 100.987654321)

One error hierarchy

CCXT maps Backpack's error payloads onto a typed exception treeInsufficientFunds, InvalidOrder, OrderNotFound, RateLimitExceeded, AuthenticationError, NetworkError, ExchangeNotAvailable and 34 more, all descending from BaseError.

Nothing is hidden — the implicit API

Alongside the 69 unified capabilities, all 56 endpoints CCXT defines for Backpack are generated as callable implicit methods, signed and rate-limited:

# any raw Backpack endpoint, camelCased from its path
markets = exchange.public_get_api_v1_markets()

Browse them on the backpack implicit API page.

What the Backpack SDKs do better

An honest list, because these are real:

  • A Rust client, which CCXT does not have. bpx-api-client is first-party and Apache-2.0. CCXT targets seven languages and Rust is not one of them. If your service is Rust, the official client is the only maintained option.
  • Endpoint coverage. backpack_exchange_sdk describes itself as supporting "all 70 API endpoints including REST and WebSocket", including RFQ and strategy endpoints. CCXT defines 56 endpoints for backpack, so a handful of Backpack's newer surfaces are not reachable even as implicit methods.
  • Lend and borrow. Backpack's borrow/lend product is present in CCXT only as raw implicit endpoints (api/v1/borrowLend, api/v1/borrowLend/positions) — the source file marks the unified wrappers as still to do. If lending is central to your integration, a Backpack-specific SDK models it directly.
  • Field-for-field fidelity. Bid, orderType, SOL_USDC_PERP, TimeInForce.GTC — when you are reading Backpack's docs while debugging, an SDK that uses those exact names removes a translation step. CCXT's unified names are a deliberate abstraction.
  • Typed enums and hints. backpack_exchange_sdk ships enums for order type, side, time in force and self-trade prevention with full type annotations, which is a nicer editing experience than passing unified strings if you only ever target this venue.

If Backpack is your only venue and you work in Rust — or you need its RFQ, strategy or lending endpoints — a Backpack-specific client is the better dependency.

Migrating from a Backpack SDK to CCXT

What you are doingBackpack SDKCCXT
Symbols"SOL_USDC", "SOL_USDC_PERP"'SOL/USDC', 'SOL/USDC:USDC'
ClientPublicClient + AuthenticationClientone ccxt.backpack({'apiKey': ..., 'secret': ...})
Marketsget_markets()load_markets()
Tickerget_ticker(symbol) / get_tickers()fetch_ticker() / fetch_tickers()
Order bookget_depth(symbol)fetch_order_book()
Candlesget_klines(...)fetch_ohlcv()
Mark price / open interestget_mark_price(), get_open_interest()fetch_funding_rate(), fetch_open_interest()
New orderexecute_order(orderType=..., side=...)create_order()
Batch ordersper-SDKcreate_orders()
Cancel ordercancel-order callcancel_order() / cancel_all_orders()
Open ordersopen-orders callfetch_open_orders()
Order historyget_order_history(symbol=...)fetch_orders()
Fillsget_fill_history(...)fetch_my_trades()
Balancesget_balances()fetch_balance()
Positionspositions callfetch_positions()
StreamsWebSocketClient.subscribe(streams=[...], callback=...)watch_* on ccxt.pro.backpack
Anything not listednative SDK methodthe same endpoint as an implicit method

Start with Install, then the Manual, then the backpack unified API reference.

FAQ

Is there an official Backpack Python SDK? No. Backpack's own repository says only a Rust client is available, and its API Clients page warns that "Some of the SDKs listed below are community-built and are not officially maintained or endorsed by the Backpack team." The Python options — bpx-py and backpack-exchange-sdk — are community projects. CCXT is a third-party library too, but one maintained across 104 venues in seven languages.

How does CCXT sign Backpack requests? With ED25519. Your secret is a base64-encoded seed; CCXT builds a payload of instruction=<per-endpoint instruction>&<sorted params>&timestamp=<ms>&window=<ms>, signs it, and sends X-API-Key, X-Timestamp, X-Window and X-Signature. You never write that code.

Does CCXT support Backpack WebSockets? Yes. ccxt.pro.backpack implements 15 streaming methods, including watchOrderBook, watchOrderBookForSymbols, watchTicker, watchTickers, watchBidsAsks, watchTrades, watchTradesForSymbols, watchOHLCV, watchOHLCVForSymbols, watchOrders and watchPositions, plus four unWatch* counterparts.

Does Backpack have a testnet? Not one CCXT can point at. There is no sandbox URL for backpack, so set_sandbox_mode(True) has nothing to swap in. Test against CCXT's offline static fixtures and small live orders.

Does CCXT cover Backpack perpetuals? Yes. backpack declares spot, margin and swap, with fetch_positions, funding-rate methods, open interest, mark and index candles, reduce-only and trigger orders all as unified methods.

Is CCXT free? Yes. MIT-licensed, including the WebSocket support.

Next steps

On this page