bydfi
bydfi cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
bydfi
Kind: global class
Extends: Exchange
- fetchMarkets
- fetchOrderBook
- fetchTrades
- fetchMyTrades
- fetchOHLCV
- fetchTickers
- fetchTicker
- fetchFundingRate
- fetchFundingRateHistory
- createOrder
- createOrders
- editOrder
- editOrders
- cancelAllOrders
- fetchOpenOrders
- fetchOpenOrder
- fetchCanceledAndClosedOrders
- setLeverage
- fetchLeverage
- fetchPositions
- fetchPositionsForSymbol
- fetchPositionHistory
- fetchPositionsHistory
- fetchMarginMode
- setMarginMode
- setPositionMode
- fetchPositionMode
- fetchBalance
- fetchTransfers
- fetchDeposits
- fetchWithdrawals
- watchTicker
- unWatchTicker
- watchTickers
- unWatchTickers
- watchOHLCV
- unWatchOHLCV
- watchOHLCVForSymbols
- unWatchOHLCVForSymbols
- watchOrderBook
- unWatchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBookForSymbols
- watchOrders
- watchOrdersForSymbols
- watchPositions
- watchBalance
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| 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, could be 5, 10, 20, 50, 100, 500 or 1000 (default 500) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.loc | string | No | crypto 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
| 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 (default 500, max 1000) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.fromId | int | No | retrieve 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades 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 trades for |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The unique code of a sub-wallet |
| params.orderType | string | No | order 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
| 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 (max 500) |
| params | object | No | extra parameters specific to the bitteam api endpoint |
| params.until | int | No | timestamp 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
| 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 |
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
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| 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 to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp 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
| 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 | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.wallet | string | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.hedged | bool | No | true for hedged mode, false for one way mode, default is false |
| params.clientOrderId | string | No | Custom order ID, must be unique for open orders |
| params.timeInForce | string | No | 'GTC' (Good Till Cancelled), 'FOK' (Fill Or Kill), 'IOC' (Immediate Or Cancel), 'PO' (Post Only) |
| params.postOnly | bool | No | true or false, whether the order is post-only |
| params.reduceOnly | bool | No | true or false, true or false whether the order is reduce-only |
| params.stopLossPrice | float | No | The price a stop loss order is triggered at |
| params.takeProfitPrice | float | No | The price a take profit order is triggered at |
| params.trailingTriggerPrice | float | No | the price to activate a trailing order, default uses the price argument or market price if price is not provided |
| params.trailingPercent | float | No | the percent to trail away from the current market price |
| params.triggerPriceType | string | No | 'MARK_PRICE' or 'CONTRACT_PRICE', default is 'CONTRACT_PRICE', the price type used to trigger stop orders |
| params.closePosition | bool | No | true 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
| 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.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id (mandatory if params.clientOrderId is not provided) |
| symbol | string | No | unified symbol of the market to create an order in |
| type | string | No | not used by bydfi editOrder |
| side | string | No | 'buy' or 'sell' |
| amount | float | No | how much of the currency you want to trade in units of the base currency |
| price | float | No | the price for the order, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a unique identifier for the order (could be alternative to id) |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market to cancel orders in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.wallet | string | No | The 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
- https://developers.bydfi.com/en/futures/trade#pending-order-query
- https://developers.bydfi.com/en/futures/trade#planned-order-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | 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.trigger | bool | No | true or false, whether to fetch conditional orders only |
| params.wallet | string | No | The 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
- https://developers.bydfi.com/en/futures/trade#pending-order-query
- https://developers.bydfi.com/en/futures/trade#planned-order-query
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id (mandatory if params.clientOrderId is not provided) |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.trigger | bool | No | true or false, whether to fetch conditional orders only |
| params.clientOrderId | string | No | a unique identifier for the order (could be alternative to id) |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the closed orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of closed orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest order |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The unique code of a sub-wallet |
| params.orderType | string | No | order 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
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float | Yes | the rate of leverage |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.settleCoin | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | a unified market symbol |
| since | int | No | timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days |
| limit | int | No | the maximum amount of records to fetch (default 500, max 500) |
| params | object | Yes | extra parameters specific to the exchange api endpoint |
| params.until | int | No | timestamp in ms of the latest position to fetch , params["until"] - since <= 7 days |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | a list of unified market symbols |
| since | int | No | timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days |
| limit | int | No | the maximum amount of records to fetch (default 500, max 500) |
| params | object | Yes | extra parameters specific to the exchange api endpoint |
| params.until | int | No | timestamp in ms of the latest position to fetch , params["until"] - since <= 7 days |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the margin mode for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool | Yes | set to true to use dualSidePosition |
| symbol | string | No | not used by bydfi setPositionMode () |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.settleCoin | string | No | The 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified symbol of the market to fetch the order book for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.contractType | string | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | string | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.settleCoin | string | No | The 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
- https://developers.bydfi.com/en/account#asset-inquiry
- https://developers.bydfi.com/en/futures/user#asset-query
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.account | string | No | the type of account to fetch the balance for, either 'SPOT' or 'UMFUTURE' or 'CMFUTURE' or 'COPY' or 'GRID' or 'FUNDING' (default is 'SPOT') |
| params.wallet | string | No | swap only The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.asset | string | No | currency 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
| 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 |
| limit | int | No | the maximum number of transfers structures to retrieve (default 10) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code (mandatory) |
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code (mandatory) |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of withdrawal structures to retrieve |
| params | object | No | extra 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
| 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 |
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
| 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 |
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
- https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
- https://developers.bydfi.com/en/futures/websocket-market#market-wide-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 |
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
- https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
- https://developers.bydfi.com/en/futures/websocket-market#market-wide-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 |
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
| 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 |
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
| 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 |
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
| 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 |
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
| 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 |
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
| 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 and maxi is 100) |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified array of symbols |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| limit | int | No | the maximum amount of order book entries to return (default and max is 100) |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.method | string | No | either '/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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch orders for |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
bydfi.watchBalance (params?)