CCXT

bydfi

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

bydfi

Kind: global class
Extends: Exchange

fetchMarkets

retrieves data on all markets for bydfi

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

See: https://developers.bydfi.com/en/futures/market#fetching-trading-rules-and-pairs

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

fetchOrderBook

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

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

See: https://developers.bydfi.com/en/futures/market#depth-information

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return, could be 5, 10, 20, 50, 100, 500 or 1000 (default 500)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.locstringNocrypto location, default: us
bydfi.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://developers.bydfi.com/en/futures/market#recent-trades

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 (default 500, max 1000)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.fromIdintNoretrieve from which trade ID to start. Default to retrieve the most recent trade records
bydfi.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://developers.bydfi.com/en/futures/trade#historical-trades-query

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.untilintNothe latest time in ms to fetch trades for
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet
params.orderTypestringNoorder type ('LIMIT', 'MARKET', 'LIQ', 'LIMIT_CLOSE', 'MARKET_CLOSE', 'STOP', 'TAKE_PROFIT', 'STOP_MARKET', 'TAKE_PROFIT_MARKET' or 'TRAILING_STOP_MARKET')
bydfi.fetchMyTrades (symbol, since?, limit?, params?)

fetchOHLCV

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

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

See: https://developers.bydfi.com/en/futures/market#candlestick-data

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 (max 500)
paramsobjectNoextra parameters specific to the bitteam api endpoint
params.untilintNotimestamp in ms of the latest candle to fetch
bydfi.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTickers

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

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

See: https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics

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
bydfi.fetchTickers (symbols, 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 bydfi
Returns: object - a ticker structure

See: https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics

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

fetchFundingRate

fetch the current funding rate

Kind: instance method of bydfi
Returns: object - a funding rate structure

See: https://developers.bydfi.com/en/futures/market#recent-funding-rate

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.fetchFundingRate (symbol, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://developers.bydfi.com/en/futures/market#historical-funding-rates

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 of the latest funding rate to fetch
bydfi.fetchFundingRateHistory (symbol, since?, limit?, params?)

createOrder

create a trade order

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

See: https://developers.bydfi.com/en/futures/trade#placing-an-order

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 fullfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
params.hedgedboolNotrue for hedged mode, false for one way mode, default is false
params.clientOrderIdstringNoCustom order ID, must be unique for open orders
params.timeInForcestringNo'GTC' (Good Till Cancelled), 'FOK' (Fill Or Kill), 'IOC' (Immediate Or Cancel), 'PO' (Post Only)
params.postOnlyboolNotrue or false, whether the order is post-only
params.reduceOnlyboolNotrue or false, true or false whether the order is reduce-only
params.stopLossPricefloatNoThe price a stop loss order is triggered at
params.takeProfitPricefloatNoThe price a take profit order is triggered at
params.trailingTriggerPricefloatNothe price to activate a trailing order, default uses the price argument or market price if price is not provided
params.trailingPercentfloatNothe percent to trail away from the current market price
params.triggerPriceTypestringNo'MARK_PRICE' or 'CONTRACT_PRICE', default is 'CONTRACT_PRICE', the price type used to trigger stop orders
params.closePositionboolNotrue or false, whether to close all positions after triggering, only supported in STOP_MARKET and TAKE_PROFIT_MARKET; not used with quantity;
bydfi.createOrder (symbol, type, side, amount, price?, params?)

createOrders

create a list of trade orders

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

See: https://developers.bydfi.com/en/futures/trade#batch-order-placement

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.createOrders (orders, params?)

editOrder

edit a trade order

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

See: https://developers.bydfi.com/en/futures/trade#order-modification

ParamTypeRequiredDescription
idstringYesorder id (mandatory if params.clientOrderId is not provided)
symbolstringNounified symbol of the market to create an order in
typestringNonot used by bydfi editOrder
sidestringNo'buy' or 'sell'
amountfloatNohow much of the currency you want to trade in units of the base currency
pricefloatNothe price for the order, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique identifier for the order (could be alternative to id)
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.editOrder (id, symbol?, type?, side?, amount?, price?, params?)

editOrders

edit a list of trade orders

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

See: https://developers.bydfi.com/en/futures/trade#batch-order-modification

ParamTypeRequiredDescription
ordersArrayYeslist of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.editOrders (orders, params?)

cancelAllOrders

cancel all open orders in a market

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

See: https://developers.bydfi.com/en/futures/trade#complete-order-cancellation

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.cancelAllOrders (symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See

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.triggerboolNotrue or false, whether to fetch conditional orders only
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchOpenOrders (symbol, since?, limit?, params?)

fetchOpenOrder

fetch an open order by the id

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

See

ParamTypeRequiredDescription
idstringYesorder id (mandatory if params.clientOrderId is not provided)
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerboolNotrue or false, whether to fetch conditional orders only
params.clientOrderIdstringNoa unique identifier for the order (could be alternative to id)
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchOpenOrder (id, symbol, params?)

fetchCanceledAndClosedOrders

fetches information on multiple canceled and closed orders made by the user

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

See: https://developers.bydfi.com/en/futures/trade#historical-orders-query

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the closed orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of closed orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest order
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet
params.orderTypestringNoorder type ('LIMIT', 'MARKET', 'LIQ', 'LIMIT_CLOSE', 'MARKET_CLOSE', 'STOP', 'TAKE_PROFIT', 'STOP_MARKET', 'TAKE_PROFIT_MARKET' or 'TRAILING_STOP_MARKET')
bydfi.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

setLeverage

set the level of leverage for a market

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

See: https://developers.bydfi.com/en/futures/trade#set-leverage-for-single-trading-pair

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.setLeverage (leverage, symbol, params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of bydfi
Returns: object - a leverage structure

See: https://developers.bydfi.com/en/futures/trade#get-leverage-for-single-trading-pair

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchLeverage (symbol, params?)

fetchPositions

fetch all open positions

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

See: https://developers.bydfi.com/en/futures/trade#positions-query

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.settleCoinstringNothe settlement currency (USDT or USDC or USD)
bydfi.fetchPositions (symbols?, params?)

fetchPositionsForSymbol

fetch all open positions for specific symbol

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

See: https://developers.bydfi.com/en/futures/trade#positions-query

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
bydfi.fetchPositionsForSymbol (symbol, params?)

fetchPositionHistory

fetches historical positions

Kind: instance method of bydfi
Returns: Array<object> - a list of position structures

See: https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records

ParamTypeRequiredDescription
symbolstringYesa unified market symbol
sinceintNotimestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
limitintNothe maximum amount of records to fetch (default 500, max 500)
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest position to fetch , params["until"] - since <= 7 days
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchPositionHistory (symbol, since?, limit?, params)

fetchPositionsHistory

fetches historical positions

Kind: instance method of bydfi
Returns: Array<object> - a list of position structures

See: https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records

ParamTypeRequiredDescription
symbolsArray<string>Yesa list of unified market symbols
sinceintNotimestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
limitintNothe maximum amount of records to fetch (default 500, max 500)
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest position to fetch , params["until"] - since <= 7 days
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchPositionsHistory (symbols, since?, limit?, params)

fetchMarginMode

fetches the margin mode of a trading pair

Kind: instance method of bydfi
Returns: object - a margin mode structure

See: https://developers.bydfi.com/en/futures/user#margin-mode-query

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the margin mode for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.fetchMarginMode (symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

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

See: https://developers.bydfi.com/en/futures/user#change-margin-type-cross-margin

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
bydfi.setMarginMode (marginMode, symbol, params?)

setPositionMode

set hedged to true or false for a market, hedged for bydfi is set identically for all markets with same settle currency

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

See: https://developers.bydfi.com/en/futures/user#change-position-mode-dual

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringNonot used by bydfi setPositionMode ()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
params.settleCoinstringNoThe settlement currency - USDT or USDC or USD (default is USDT)
bydfi.setPositionMode (hedged, symbol?, params?)

fetchPositionMode

fetchs the position mode, hedged or one way, hedged for bydfi is set identically for all markets with same settle currency

Kind: instance method of bydfi
Returns: object - an object detailing whether the market is in hedged or one-way mode

See: https://developers.bydfi.com/en/futures/user#get-position-mode

ParamTypeRequiredDescription
symbolstringNounified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
params.walletstringNoThe unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
params.settleCoinstringNoThe settlement currency - USDT or USDC or USD (default is USDT or settle currency of the market if market is provided)
bydfi.fetchPositionMode (symbol?, params?)

fetchBalance

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

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNothe type of account to fetch the balance for, either 'SPOT' or 'UMFUTURE' or 'CMFUTURE' or 'COPY' or 'GRID' or 'FUNDING' (default is 'SPOT')
params.walletstringNoswap only The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
params.assetstringNocurrency id for the balance to fetch
bydfi.fetchBalance (params?)

fetchTransfers

fetch a history of internal transfers made on an account

Kind: instance method of bydfi
Returns: Array<object> - a list of transfer structures

See: https://developers.bydfi.com/en/account#query-wallet-transfer-records

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve (default 10)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
bydfi.fetchTransfers (code, since?, limit?, params?)

fetchDeposits

fetch all deposits made to an account

Kind: instance method of bydfi
Returns: Array<object> - a list of transaction structures

See: https://developers.bydfi.com/en/spot/account#query-deposit-records

ParamTypeRequiredDescription
codestringYesunified currency code (mandatory)
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

Kind: instance method of bydfi
Returns: Array<object> - a list of transaction structures

See: https://developers.bydfi.com/en/spot/account#query-withdrawal-records

ParamTypeRequiredDescription
codestringYesunified currency code (mandatory)
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawal structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.fetchWithdrawals (code, 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 bydfi
Returns: object - a ticker structure

See: https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol

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

See: https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol

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

See

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

unWatchTickers

unWatches 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 bydfi
Returns: object - a ticker structure

See

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

watchOHLCV

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

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

See: https://developers.bydfi.com/en/futures/websocket-market#candlestick-data

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
bydfi.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 bydfi
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://developers.bydfi.com/en/futures/websocket-market#candlestick-data

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.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 bydfi
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://developers.bydfi.com/en/futures/websocket-market#candlestick-data

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.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 bydfi
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://developers.bydfi.com/en/futures/websocket-market#candlestick-data

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?)

watchOrderBook

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

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

See: https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return (default and maxi is 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.watchOrderBook (symbol, limit?, params?)

unWatchOrderBook

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

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

See: https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information

ParamTypeRequiredDescription
symbolstringYesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.unWatchOrderBook (symbol, params?)

watchOrderBookForSymbols

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

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

See: https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information

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

unWatchOrderBookForSymbols

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

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

See: https://developers.bydfi.com/en/futures/websocket-market#limited-depth-information

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.methodstringNoeither '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
bydfi.unWatchOrderBookForSymbols (symbols, params?)

watchOrders

watches information on multiple orders made by the user

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

See: https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push

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
bydfi.watchOrders (symbol, since?, limit?, params?)

watchOrdersForSymbols

watches information on multiple orders made by the user

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

See: https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch orders for
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bydfi.watchOrdersForSymbols (symbols, since?, limit?, params?)

watchPositions

watch all open positions

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

See: https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
bydfi.watchPositions (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 bydfi
Returns: object - a balance structure

See: https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push

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

On this page