backpack
backpack cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
🔌 Looking for raw exchange endpoints? See the backpack implicit API — every endpoint in this exchange's API exposed as an implicit method.
backpack
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchConvertQuote
- createConvertTrade
- fetchTickers
- fetchTicker
- fetchOrderBook
- fetchOHLCV
- fetchFundingRate
- fetchOpenInterest
- fetchFundingRateHistory
- fetchTrades
- fetchMyTrades
- fetchStatus
- fetchTime
- fetchBalance
- fetchDeposits
- fetchWithdrawals
- withdraw
- fetchDepositAddress
- createOrder
- createOrders
- fetchOpenOrders
- fetchOpenOrder
- fetchOrder
- cancelOrder
- cancelAllOrders
- fetchOrders
- fetchPositions
- fetchFundingHistory
- watchTicker
- unWatchTicker
- watchTickers
- unWatchTickers
- watchBidsAsks
- unWatchBidsAsks
- watchOHLCV
- unWatchOHLCV
- watchOHLCVForSymbols
- unWatchOHLCVForSymbols
- watchTrades
- unWatchTrades
- watchTradesForSymbols
- unWatchTradesForSymbols
- watchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBook
- unWatchOrderBookForSymbols
- watchOrders
- unWatchOrders
- watchBalance
- unWatchBalance
- watchPositions
- unWatchPositions
fetchCurrencies
fetches available crypto and tokenized stock currencies from the assets endpoint
Kind: instance method of backpack
Returns: object - an associative dictionary of currencies
See: https://docs.backpack.exchange/#tag/Assets
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | return tokenized stock assets only |
backpack.fetchCurrencies (params?)fetchMarkets
retrieves venue markets and tokenized stock RFQ markets discovered from securities
Kind: instance method of backpack
Returns: Array<object> - an array of objects representing market data
See
- https://docs.backpack.exchange/#tag/Markets/operation/get_markets
- https://docs.backpack.exchange/#tag/Stocks/operation/get_securities
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | return tokenized stock markets only |
| params.marketType | string, Array<string> | No | market types to discover: spot, swap or stock |
backpack.fetchMarkets (params?)fetchConvertQuote
fetches an indicative quote for converting between a tokenized stock and its quote currency
Kind: instance method of backpack
Returns: object - indicative conversion estimate; the price is a bound and is not guaranteed
See: https://docs.backpack.exchange/#tag/Stocks/operation/get_stock_indicative_quote
| Param | Type | Required | Description |
|---|---|---|---|
| fromCode | string | Yes | the currency to convert from |
| toCode | string | Yes | the currency to convert to |
| amount | float | Yes | amount in units of the from currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.price | float | No | optional limit price when converting quote currency to stock |
backpack.fetchConvertQuote (fromCode, toCode, amount, params?)createConvertTrade
converts between a tokenized stock and its quote currency through a bounded RFQ
Kind: instance method of backpack
Returns: object - conversion result; RFQ submission may remain open and is not necessarily a fill
See
- https://docs.backpack.exchange/#tag/RFQ/operation/submit_rfq
- https://docs.backpack.exchange/#tag/RFQ/operation/accept_quote
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | RFQ identifier when accepting a quote, or a numeric client identifier for a new RFQ |
| fromCode | string | Yes | the currency to convert from |
| toCode | string | Yes | the currency to convert to |
| amount | float | No | amount in units of the from currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.quoteId | string | No | accept this quote for RFQ id supplied as id |
| params.price | float | No | price bound from fetchConvertQuote; required when buying stock |
| params.baseAmount | float | No | stock quantity when converting quote currency to stock |
| params.clientOrderId | int | No | requester client identifier for a newly submitted RFQ |
backpack.createConvertTrade (id, fromCode, toCode, amount?, params?)fetchTickers
fetches venue or external provider statistics, not executable RFQ prices
Kind: instance method of backpack
Returns: object - a dictionary of ticker structures
See: https://docs.backpack.exchange/#tag/Markets/operation/get_tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | return tokenized stock tickers only; inferred from requested symbols when omitted |
| params.source | string | No | Venue or External; RFQ symbols default to External, other symbols default to Venue |
| params.interval | string | No | ticker interval, External requires 1d |
backpack.fetchTickers (symbols, params?)fetchTicker
fetches underlying venue or external stock statistics, not an executable RFQ quote
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Markets/operation/get_ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock data; inferred from symbol when omitted |
| params.source | string | No | Venue or External; RFQ symbols default to External |
| params.interval | string | No | ticker interval, External requires 1d |
backpack.fetchTicker (symbol, params?)fetchOrderBook
fetches venue order-book depth, RFQ and external provider depth are not supported
Kind: instance method of backpack
Returns: object - an order book structure
See: https://docs.backpack.exchange/#tag/Markets/operation/get_depth
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return (default 100, max 500) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects a tokenized stock spot order book; inferred from symbol when omitted |
| params.source | string | No | Venue, External provider depth is not supported |
backpack.fetchOrderBook (symbol, limit?, params?)fetchOHLCV
fetches venue or external stock candlestick data for the underlying market
Kind: instance method of backpack
Returns: Array<Array<int>> - a list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.backpack.exchange/#tag/Markets/operation/get_klines
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in milliseconds of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch (default 100) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock data; inferred from symbol when omitted |
| params.source | string | No | Venue or External; RFQ symbols default to External |
| params.price | string | No | last, mark or index, External requires last |
| params.priceType | string | No | Last, Mark or Index, External requires Last |
| params.until | int | No | latest candle timestamp in milliseconds |
backpack.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of backpack
Returns: object - a funding rate structure
See: https://docs.backpack.exchange/#tag/Markets/operation/get_mark_prices
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
backpack.fetchFundingRate (symbol, params?)fetchOpenInterest
Retrieves the open interest of a derivative trading pair
Kind: instance method of backpack
Returns: object - an open interest structure/docs/manual#interest-history-structure
See: https://docs.backpack.exchange/#tag/Markets/operation/get_open_interest
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| params | object | No | exchange specific parameters |
backpack.fetchOpenInterest (symbol, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of backpack
Returns: Array<object> - a list of funding rate structures
See: https://docs.backpack.exchange/#tag/Markets/operation/get_funding_interval_rates
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the funding rate history for |
| since | int | No | timestamp in ms of the earliest funding rate to fetch |
| limit | int | No | the maximum amount of funding rate structures |
| params | object | No | extra parameters specific to the exchange API endpoint |
backpack.fetchFundingRateHistory (symbol, since?, limit?, params?)fetchTrades
gets recent venue order-book trades, not public RFQ or external provider fills
Kind: instance method of backpack
Returns: Array<Trade> - a list of trade structures
See
- https://docs.backpack.exchange/#tag/Trades/operation/get_recent_trades
- https://docs.backpack.exchange/#tag/Trades/operation/get_historical_trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.offset | int | No | the number of trades to skip, default is 0 |
| params.stock | boolean | No | selects tokenized stock spot trades; inferred from symbol when omitted |
backpack.fetchTrades (symbol, since?, limit?, params?)fetchMyTrades
fetches venue fills or requester RFQ fills, combining stock records when no symbol is supplied
Kind: instance method of backpack
Returns: Array<Trade> - a list of trade structures
See
- https://docs.backpack.exchange/#tag/History/operation/get_fills
- https://docs.backpack.exchange/#tag/RFQ/operation/get_rfq_fill_history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for, locally filtered for RFQ history pages |
| limit | int | No | the maximum number of trades structures to retrieve (default 100, max 1000) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch trades for, locally filtered for RFQ history pages |
| params.stock | boolean | No | selects tokenized stock fills; inferred from symbol when omitted |
| params.rfq | boolean | No | selects requester RFQ fills only, inferred from RFQ symbols |
| params.offset | int | No | exchange history pagination offset |
| params.sortDirection | string | No | Asc or Desc |
| params.deferredSettlement | boolean | No | selects deferred or immediate RFQ settlement records |
| params.fillType | string | No | User or CollateralConversion for RFQs, additional exchange-specific types for venue fills |
backpack.fetchMyTrades (symbol, since?, limit?, params?)fetchStatus
the latest known information on the availability of the exchange API
Kind: instance method of backpack
Returns: object - a status structure
See: https://docs.backpack.exchange/#tag/System/operation/get_status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
backpack.fetchStatus (params?)fetchTime
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of backpack
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://developer-pro.bitmart.com/en/spot/#get-system-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
backpack.fetchTime (params?)fetchBalance
queries the capital account, optionally filtering tokenized stock assets locally
Kind: instance method of backpack
Returns: object - a balance structure
See: https://docs.backpack.exchange/#tag/Capital/operation/get_balances
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | return tokenized stock holdings only, without quote-currency cash |
backpack.fetchBalance (params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of backpack
Returns: Array<object> - a list of transaction structures
See: https://docs.backpack.exchange/#tag/Capital/operation/get_deposits
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of deposits structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch entries for |
backpack.fetchDeposits (code, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of backpack
Returns: Array<object> - a list of transaction structures
See: https://docs.backpack.exchange/#tag/Capital/operation/get_withdrawals
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency transferred |
| since | int | No | the earliest time in ms to fetch transfers for (default 24 hours ago) |
| limit | int | No | the maximum number of transfer structures to retrieve (default 50, max 200) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch transfers for (default time now) |
backpack.fetchWithdrawals (code, since?, limit?, params?)withdraw
make a withdrawal
Kind: instance method of backpack
Returns: object - a transaction structure
See: https://docs.backpack.exchange/#tag/Capital/operation/request_withdrawal
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tag | string | No | memo / destination tag, required for currencies in options['withdrawTagRequiredCurrencies'] |
| params.network | string | Yes | the network to withdraw on (mandatory) |
backpack.withdraw (code, amount, address, params?)fetchDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of backpack
Returns: object - an address structure
See: https://docs.backpack.exchange/#tag/Capital/operation/get_deposit_address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.networkCode | string | No | the network to fetch the deposit address (mandatory) |
backpack.fetchDepositAddress (code, params?)createOrder
creates a venue order or bounded requester RFQ for a tokenized stock
Kind: instance method of backpack
Returns: object - an order structure
See
- https://docs.backpack.exchange/#tag/Order/operation/execute_order
- https://docs.backpack.exchange/#tag/RFQ/operation/submit_rfq
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | quantity in base currency, RFQs require base quantity |
| price | float | No | limit price, ignored for venue market orders but an optional execution bound for market RFQs |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.cost | float | No | venue market orders only, quote-currency cost instead of amount |
| params.stock | boolean | No | selects tokenized stock spot or RFQ execution; inferred from symbol when omitted |
| params.executionMode | string | No | RFQ only, Immediate (default) or AwaitAccept for manually accepted limit RFQs |
| params.orderExpiryTime | int | No | RFQ only, resting Immediate RFQ expiry in milliseconds |
| params.clientOrderId | int | No | a unique id for the order |
| params.postOnly | boolean | No | venue orders only, true to place a post only order |
| params.timeInForce | string | No | venue orders only, GTC, IOC, FOK or PO |
| params.reduceOnly | bool | No | contracts only, reduces a position |
| params.selfTradePrevention | string | No | venue orders only, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH |
| params.autoLend | bool | No | lend if required |
| params.autoLendRedeem | bool | No | redeem a lend if required |
| params.autoBorrow | bool | No | borrow if required |
| params.autoBorrowRepay | bool | No | repay a borrow if required |
| params.triggerPrice | float | No | venue orders only, trigger price |
| params.takeProfit | object | No | swap markets only, attached take profit order |
| params.takeProfit.triggerPrice | float | No | take profit trigger price |
| params.takeProfit.price | float | No | take profit limit price, omitted for a market order |
| params.stopLoss | object | No | swap markets only, attached stop loss order |
| params.stopLoss.triggerPrice | float | No | stop loss trigger price |
| params.stopLoss.price | float | No | stop loss limit price, omitted for a market order |
backpack.createOrder (symbol, type, side, amount, price?, params?)createOrders
creates venue order-book orders, RFQ batches are not supported
Kind: instance method of backpack
Returns: Array<object> - a list of order structures
See: https://docs.backpack.exchange/#tag/Order/operation/execute_order_batch
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock spot execution for all orders, otherwise inferred per symbol |
backpack.createOrders (orders, params?)fetchOpenOrders
fetches open venue orders or RFQs with their candidate quotes
Kind: instance method of backpack
Returns: Array<Order> - a list of order structures
See
- https://docs.backpack.exchange/#tag/Order/operation/get_open_orders
- https://docs.backpack.exchange/#tag/RFQ/operation/get_open_rfqs
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch open orders for |
| limit | int | No | the maximum number of open orders structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when provided, otherwise selects both venue/RFQ records |
| params.rfq | boolean | No | selects requester RFQs only, inferred from RFQ symbols |
| params.deferredSettlement | boolean | No | selects deferred or immediate RFQ records |
backpack.fetchOpenOrders (symbol, since?, limit?, params?)fetchOpenOrder
fetches an open venue order or requester RFQ by identifier
Kind: instance method of backpack
Returns: object - an order structure
See
- https://docs.backpack.exchange/#tag/Order/operation/get_order
- https://docs.backpack.exchange/#tag/RFQ/operation/get_open_rfqs
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order or requester RFQ identifier |
| symbol | string | Yes | unified market symbol, required |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when omitted |
backpack.fetchOpenOrder (id, symbol, params?)fetchOrder
fetches an order from filtered history with an open-order fallback
Kind: instance method of backpack
Returns: object - an order structure
See
- https://docs.backpack.exchange/#tag/History
- https://docs.backpack.exchange/#tag/RFQ/operation/get_rfq_history
- https://docs.backpack.exchange/#tag/RFQ/operation/get_open_rfqs
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order or requester RFQ identifier |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra exchange-specific parameters |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when omitted |
backpack.fetchOrder (id, symbol, params?)cancelOrder
cancels a venue order or requests RFQ cancellation without assuming immediate cancellation
Kind: instance method of backpack
Returns: object - an order structure
See
- https://docs.backpack.exchange/#tag/Order/operation/cancel_order
- https://docs.backpack.exchange/#tag/RFQ/operation/cancel_rfq
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order or requester RFQ identifier |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when omitted |
| params.clientOrderId | int | No | RFQ client identifier instead of id |
backpack.cancelOrder (id, symbol, params?)cancelAllOrders
cancels venue orders, bulk RFQ cancellation is not supported
Kind: instance method of backpack
Returns: Array<object> - a list of order structures
See
- https://docs.backpack.exchange/#tag/Order/operation/cancel_open_orders
- https://docs.backpack.exchange/#tag/RFQ
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol, required |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when omitted |
backpack.cancelAllOrders (symbol, params?)fetchOrders
fetches venue or requester RFQ order history
Kind: instance method of backpack
Returns: Array<Order> - a list of order structures
See
- https://docs.backpack.exchange/#tag/History/operation/get_order_history
- https://docs.backpack.exchange/#tag/RFQ/operation/get_rfq_history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for, locally filtered on retrieved pages |
| limit | int | No | the maximum number of order structures to retrieve (default 100, max 1000) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders; inferred from symbol when provided, otherwise selects both venue/RFQ records |
| params.rfq | boolean | No | selects requester RFQ history only, inferred from RFQ symbols |
| params.offset | int | No | exchange history pagination offset |
| params.sortDirection | string | No | Asc or Desc |
| params.deferredSettlement | boolean | No | selects deferred or immediate RFQ history |
backpack.fetchOrders (symbol?, since?, limit?, params?)fetchPositions
fetches derivative positions
Kind: instance method of backpack
Returns: Array<object> - a list of position structure
See: https://docs.backpack.exchange/#tag/Futures/operation/get_positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
backpack.fetchPositions (symbols, params?)fetchFundingHistory
fetches the history of funding payments
Kind: instance method of backpack
Returns: Array<Trade> - a list of trade structures
See: https://docs.backpack.exchange/#tag/History/operation/get_funding_payments
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch (default 24 hours ago) |
| limit | int | No | the maximum amount of trades to fetch (default 200, max 500) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest trade to fetch (default now) |
backpack.fetchFundingHistory (symbol, since?, limit?, params?)watchTicker
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock data; inferred from symbol when omitted |
| params.source | string | No | Venue or External; RFQ ticker symbols default to External |
| params.interval | string | No | External ticker interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote for quotes instead of statistics |
backpack.watchTicker (symbol, params?)unWatchTicker
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock data; inferred from symbol when omitted |
| params.source | string | No | Venue or External, matching the subscription |
| params.interval | string | No | External ticker interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote, matching the subscription |
backpack.unWatchTicker (symbol, params?)watchTickers
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock markets only; inferred from symbols when omitted |
| params.source | string | No | Venue or External; RFQ ticker symbols default to External |
| params.interval | string | No | External ticker interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote for quotes instead of statistics |
backpack.watchTickers (symbols, params?)unWatchTickers
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock markets only; inferred from symbols when omitted |
| params.source | string | No | Venue or External, matching the subscription |
| params.interval | string | No | External ticker interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote, matching the subscription |
backpack.unWatchTickers (symbols, params?)watchBidsAsks
watches best bid & ask for symbols
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Book-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock quotes; inferred from symbols when omitted |
| params.source | string | No | Venue or External; RFQ quotes default to indicative quotes |
| params.interval | string | No | External data interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote, unavailable prices remain undefined |
backpack.watchBidsAsks (symbols, params?)unWatchBidsAsks
unWatches best bid & ask for symbols
Kind: instance method of backpack
Returns: object - a ticker structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock markets only; inferred from symbols when omitted |
| params.source | string | No | Venue or External, matching the subscription |
| params.interval | string | No | External data interval, must be 1d |
| params.channel | string | No | stockPrice or stockIndicativeQuote, matching the subscription |
backpack.unWatchBidsAsks (symbols, params?)watchOHLCV
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
Kind: instance method of backpack
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.backpack.exchange/#tag/Streams/Public/K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects stock spot order-book candles, RFQ candles are unsupported |
| params.source | string | No | Venue only |
backpack.watchOHLCV (symbol, timeframe, since?, limit?, params?)unWatchOHLCV
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of backpack
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.backpack.exchange/#tag/Streams/Public/K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects stock spot order-book candles |
| params.source | string | No | Venue only |
backpack.unWatchOHLCV (symbol, timeframe, params?)watchOHLCVForSymbols
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
Kind: instance method of backpack
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.backpack.exchange/#tag/Streams/Public/K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | Array<Array<string>> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets, not RFQ markets |
| params.source | string | No | Venue only |
backpack.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)unWatchOHLCVForSymbols
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of backpack
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.backpack.exchange/#tag/Streams/Public/K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | Array<Array<string>> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets |
| params.source | string | No | Venue only |
backpack.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?)watchTrades
watches information on multiple trades made in a market
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires a stock spot order-book market, RFQ public trades are unsupported |
| params.source | string | No | Venue only |
backpack.watchTrades (symbol, since?, limit?, params?)unWatchTrades
unWatches from the stream channel
Kind: instance method of backpack
Returns: Array<object> - a list of trade structures
See: https://docs.backpack.exchange/#tag/Streams/Public/Trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires a stock spot order-book market |
| params.source | string | No | Venue only |
backpack.unWatchTrades (symbol, params?)watchTradesForSymbols
watches information on multiple trades made in a market
Kind: instance method of backpack
Returns: object - a ticker structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch trades for |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets, not RFQ markets |
| params.source | string | No | Venue only |
backpack.watchTradesForSymbols (symbols, since?, limit?, params?)unWatchTradesForSymbols
unWatches from the stream channel
Kind: instance method of backpack
Returns: Array<object> - a list of trade structures
See: https://docs.backpack.exchange/#tag/Streams/Public/Trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch trades for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets |
| params.source | string | No | Venue only |
backpack.unWatchTradesForSymbols (symbols, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of backpack
Returns: object - A dictionary of order book structures
See: https://docs.backpack.exchange/#tag/Streams/Public/Depth
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires a stock spot order-book market, not an RFQ market |
| params.source | string | No | Venue only |
backpack.watchOrderBook (symbol, limit?, params?)watchOrderBookForSymbols
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of backpack
Returns: object - an order book structure
See: https://docs.backpack.exchange/#tag/Streams/Public/Depth
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets, not RFQ markets |
| params.source | string | No | Venue only |
| params.method | string | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2' |
backpack.watchOrderBookForSymbols (symbols, limit?, params?)unWatchOrderBook
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of backpack
Returns: object - A dictionary of order book structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified array of symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires a stock spot order-book market |
| params.source | string | No | Venue only |
backpack.unWatchOrderBook (symbol, params?)unWatchOrderBookForSymbols
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of backpack
Returns: object - A dictionary of order book structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | requires stock spot order-book markets |
| params.source | string | No | Venue only |
| params.method | string | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2' |
backpack.unWatchOrderBookForSymbols (symbols, params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of backpack
Returns: Array<object> - a list of order structures
See: https://docs.backpack.exchange/#tag/Streams/Private/Order-update
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock orders, RFQ markets use account.rfqUpdate |
backpack.watchOrders (symbol?, since?, limit?, params?)unWatchOrders
unWatches information on multiple orders made by the user
Kind: instance method of backpack
Returns: Array<object> - a list of order structures
See: https://docs.backpack.exchange/#tag/Streams/Private/Order-update
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market orders were made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.stock | boolean | No | selects tokenized stock order subscriptions |
backpack.unWatchOrders (symbol?, params?)watchBalance
watches absolute capital-account asset updates accumulated since subscription, without an initial snapshot
Kind: instance method of backpack
Returns: object - a balance structure
See: https://docs.backpack.exchange/#tag/Streams/Private/Balance-update
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra exchange-specific parameters |
| params.stock | boolean | No | return tokenized stock assets only; explicit because this method has no symbol |
backpack.watchBalance (params?)unWatchBalance
unsubscribes from all capital-account asset updates
Kind: instance method of backpack
Returns: object - unsubscription result
See: https://docs.backpack.exchange/#tag/Streams/Private/Balance-update
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra exchange-specific parameters |
| params.stock | boolean | No | accepts the tokenized stock view selector; explicit because this method has no symbol |
backpack.unWatchBalance (params?)watchPositions
watch all open positions
Kind: instance method of backpack
Returns: Array<object> - a list of position structure
See: https://docs.backpack.exchange/#tag/Streams/Private/Position-update
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols to watch positions for |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum number of positions to retrieve |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
backpack.watchPositions (symbols?, since?, limit?, params)unWatchPositions
unWatches from the stream channel
Kind: instance method of backpack
Returns: Array<object> - a list of position structure
See: https://docs.backpack.exchange/#tag/Streams/Private/Position-update
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols to watch positions for |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
backpack.unWatchPositions (symbols?, params)