CCXT

bitmex

bitmex cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

bitmex

Kind: global class
Extends: Exchange

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of bitmex
Returns: object - an associative dictionary of currencies

See: https://www.bitmex.com/api/explorer/#!/Wallet/Wallet_getAssetsConfig

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchCurrencies (params?)

fetchMarkets

retrieves data on all markets for bitmex

Kind: instance method of bitmex
Returns: Array<object> - an array of objects representing market data

See: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_getActive

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchMarkets (params?)

fetchBalance

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of bitmex
Returns: object - a balance structure

See: https://www.bitmex.com/api/explorer/#!/User/User_getMargin

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchBalance (params?)

fetchOrderBook

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of bitmex
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://www.bitmex.com/api/explorer/#!/OrderBook/OrderBook_getL2

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchOrderBook (symbol, limit?, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of bitmex
Returns: object - An order structure

See: https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchOrder (id, symbol, params?)

fetchOrders

fetches information on multiple orders made by the user

Kind: instance method of bitmex
Returns: Array<Order> - a list of order structures

See: https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe earliest time in ms to fetch orders for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitmex.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of bitmex
Returns: Array<Order> - a list of order structures

See: https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchOpenOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of bitmex
Returns: Array<Order> - a list of order structures

See: https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchClosedOrders (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of bitmex
Returns: Array<Trade> - a list of trade structures

See: https://www.bitmex.com/api/explorer/#!/Execution/Execution_getTradeHistory

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitmex.fetchMyTrades (symbol, since?, limit?, params?)

fetchLedger

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of bitmex
Returns: object - a ledger structure

See: https://www.bitmex.com/api/explorer/#!/User/User_getWalletHistory

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined
sinceintNotimestamp in ms of the earliest ledger entry, default is undefined
limitintNomax number of ledger entries to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchLedger (code?, since?, limit?, params?)

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

Kind: instance method of bitmex
Returns: object - a list of transaction structure

See: https://www.bitmex.com/api/explorer/#!/User/User_getWalletHistory

ParamTypeRequiredDescription
codestringNounified currency code for the currency of the deposit/withdrawals, default is undefined
sinceintNotimestamp in ms of the earliest deposit/withdrawal, default is undefined
limitintNomax number of deposit/withdrawals to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchDepositsWithdrawals (code?, since?, limit?, params?)

fetchTicker

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of bitmex
Returns: object - a ticker structure

See: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_get

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchTicker (symbol, params?)

fetchTickers

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of bitmex
Returns: object - a dictionary of ticker structures

See: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_getActiveAndIndices

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchTickers (symbols, params?)

fetchOHLCV

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of bitmex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://www.bitmex.com/api/explorer/#!/Trade/Trade_getBucketed

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitmex.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of bitmex
Returns: Array<Trade> - a list of trade structures

See: https://www.bitmex.com/api/explorer/#!/Trade/Trade_get

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitmex.fetchTrades (symbol, since?, limit?, params?)

createOrder

create a trade order

Kind: instance method of bitmex
Returns: object - an order structure

See: https://www.bitmex.com/api/explorer/#!/Order/Order_new

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPriceobjectNothe price at which a trigger order is triggered at
params.triggerDirectionobjectNothe direction whenever the trigger happens with relation to price - 'ascending' or 'descending'
params.trailingAmountfloatNothe quote amount to trail away from the current market price
bitmex.createOrder (symbol, type, side, amount, price?, params?)

cancelOrder

cancels an open order

Kind: instance method of bitmex
Returns: object - An order structure

See: https://www.bitmex.com/api/explorer/#!/Order/Order_cancel

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesnot used by bitmex cancelOrder ()
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of bitmex
Returns: object - an list of order structures

See: https://www.bitmex.com/api/explorer/#!/Order/Order_cancel

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesnot used by bitmex cancelOrders ()
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.cancelOrders (ids, symbol, params?)

cancelAllOrders

cancel all open orders

Kind: instance method of bitmex
Returns: Array<object> - a list of order structures

See: https://www.bitmex.com/api/explorer/#!/Order/Order_cancelAll

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.cancelAllOrders (symbol, params?)

cancelAllOrdersAfter

dead man's switch, cancel all orders after the given timeout

Kind: instance method of bitmex
Returns: object - the api result

See: https://www.bitmex.com/api/explorer/#!/Order/Order_cancelAllAfter

ParamTypeRequiredDescription
timeoutnumberYestime in milliseconds, 0 represents cancel the timer
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.cancelAllOrdersAfter (timeout, params?)

fetchLeverages

fetch the set leverage for all contract markets

Kind: instance method of bitmex
Returns: object - a list of leverage structures

See: https://www.bitmex.com/api/explorer/#!/Position/Position_get

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchLeverages (symbols?, params?)

fetchPositions

fetch all open positions

Kind: instance method of bitmex
Returns: Array<object> - a list of position structure

See: https://www.bitmex.com/api/explorer/#!/Position/Position_get

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchPositions (symbols, params?)

withdraw

make a withdrawal

Kind: instance method of bitmex
Returns: object - a transaction structure

See: https://www.bitmex.com/api/explorer/#!/User/User_requestWithdrawal

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.withdraw (code, amount, address, tag, params?)

fetchFundingRates

fetch the funding rate for multiple markets

Kind: instance method of bitmex
Returns: Array<object> - a list of funding rate structures, indexed by market symbols

See: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_getActiveAndIndices

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchFundingRates (symbols, params?)

fetchFundingRateHistory

Fetches the history of funding rates

Kind: instance method of bitmex
Returns: Array<object> - a list of funding rate structures

See: https://www.bitmex.com/api/explorer/#!/Funding/Funding_get

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms for ending date filter
params.reverseboolNoif true, will sort results newest first
params.startintNostarting point for results
params.columnsstringNoarray of column names to fetch in info, if omitted, will return all columns
params.filterstringNogeneric table filter, send json key/value pairs, such as {"key": "value"}, you can key on individual fields, and do more advanced querying on timestamps, see the timestamp docs for more details
bitmex.fetchFundingRateHistory (symbol, since?, limit?, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of bitmex
Returns: object - response from the exchange

See: https://www.bitmex.com/api/explorer/#!/Position/Position_updateLeverage

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.setLeverage (leverage, symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance method of bitmex
Returns: object - response from the exchange

See: https://www.bitmex.com/api/explorer/#!/Position/Position_isolateMargin

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.setMarginMode (marginMode, symbol, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of bitmex
Returns: object - an address structure

See: https://www.bitmex.com/api/explorer/#!/User/User_getDepositAddress

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNodeposit chain, can view all chains via this.publicGetWalletAssets, default is eth, unless the currency has a default chain within this.options['networks']
bitmex.fetchDepositAddress (code, params?)

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of bitmex
Returns: object - a list of fee structures

See: https://www.bitmex.com/api/explorer/#!/Wallet/Wallet_getAssetsConfig

ParamTypeRequiredDescription
codesArray<string>, undefinedYeslist of unified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchDepositWithdrawFees (codes, params?)

fetchOpenInterests

Retrieves the open interest for a list of symbols

Kind: instance method of bitmex
Returns: Array<object> - a list of open interest structures

See: https://docs.bitmex.com/api-explorer/get-stats

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified CCXT market symbols
paramsobjectNoexchange specific parameters
bitmex.fetchOpenInterests (symbols?, params?)

fetchLiquidations

retrieves the public liquidations of a trading pair

Kind: instance method of bitmex
Returns: object - an array of liquidation structures

See: https://www.bitmex.com/api/explorer/#!/Liquidation/Liquidation_get

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
params.untilintNotimestamp in ms of the latest liquidation
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitmex.fetchLiquidations (symbol, since?, limit?, params?)

fetchPositionsADLRank

fetches the auto deleveraging rank and risk percentage for a list of symbols

Kind: instance method of bitmex
Returns: Array<object> - an auto de leverage structure

See: https://www.bitmex.com/api/explorer/#!/Position/Position_get

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.fetchPositionsADLRank (symbols?, params?)

fetchSettlementHistory

fetches historical settlement records

Kind: instance method of bitmex
Returns: Array<object> - a list of settlement history objects

See: https://docs.bitmex.com/api-explorer/get-settlements

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the settlement history
sinceintNotimestamp in ms
limitintNonumber of records
paramsobjectNoexchange specific params
params.untilintNotimestamp in ms EXCHANGE SPECIFIC PARAMETERS
params.filterstringNogeneric table filter, send json key/value pairs, such as {"key": "value"}, you can key on individual fields, and do more advanced querying on timestamps, see the timestamp docs for more details, default value = {}
params.columnsstringNoarray of column names to fetch, if omitted, will return all columns, note that this method will always return item keys, even when not specified, so you may receive more columns that you expect
params.startintNopossible values are >= 0 starting point for results, default value = 0
params.reversebooleanNoif true, will sort results newest first, default value = false
bitmex.fetchSettlementHistory (symbol, since?, limit?, params?)

closePosition

closes open positions for a market

Kind: instance method of bitmex
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
sidestringYesthe buy or sell side of the closing order, if the position is long set the side to sell, reduceOnly is implied
paramsobjectNoextra parameters specific to the bingx api endpoint
bitmex.closePosition (symbol, side, 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 bitmex
Returns: object - a ticker structure

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchTicker (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 bitmex
Returns: object - a ticker structure

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchTickers (symbols, params?)

watchLiquidations

watch the public liquidations of a trading pair

Kind: instance method of bitmex
Returns: object - an array of liquidation structures

See: https://www.bitmex.com/app/wsAPI#Liquidation

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
bitmex.watchLiquidations (symbol, since?, limit?, params?)

watchLiquidationsForSymbols

watch the public liquidations of a trading pair

Kind: instance method of bitmex
Returns: object - an array of liquidation structures

See: https://www.bitmex.com/app/wsAPI#Liquidation

ParamTypeRequiredDescription
symbolsArray<string>Yes
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
bitmex.watchLiquidationsForSymbols (symbols, since?, limit?, params?)

watchBalance

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of bitmex
Returns: object - a balance structure

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchBalance (params?)

watchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of bitmex
Returns: Array<object> - a list of trade structures

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchTrades (symbol, since?, limit?, params?)

watchPositions

watch all open positions

Kind: instance method of bitmex
Returns: Array<object> - a list of position structure

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sinceintNothe earliest time in ms to watch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
bitmex.watchPositions (symbols, since?, limit?, params)

watchOrders

watches information on multiple orders made by the user

Kind: instance method of bitmex
Returns: Array<object> - a list of order structures

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

Kind: instance method of bitmex
Returns: Array<object> - a list of trade structures

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchMyTrades (symbol, since?, limit?, params?)

watchOrderBook

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of bitmex
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://www.bitmex.com/app/wsAPI#OrderBookL2

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.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 bitmex
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://www.bitmex.com/app/wsAPI#OrderBookL2

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchOrderBookForSymbols (symbols, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a list of symbols

Kind: instance method of bitmex
Returns: Array<object> - a list of trade structures

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchTradesForSymbols (symbols, since?, limit?, params?)

watchOHLCV

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of bitmex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://www.bitmex.com/app/wsAPI#Subscriptions

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bitmex.watchOHLCV (symbol, timeframe, since?, limit?, params?)

On this page