wiki/exchanges/bydfi.md
<a name="bydfi" id="bydfi"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchMarkets" id="fetchmarkets"></a>
retrieves data on all markets for bydfi
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchMarkets ([params])
<a name="fetchOrderBook" id="fetchorderbook"></a>
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return, could be 5, 10, 20, 50, 100, 500 or 1000 (default 500) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.loc | <code>string</code> | No | crypto location, default: us |
bydfi.fetchOrderBook (symbol[, limit, params])
<a name="fetchTrades" id="fetchtrades"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://developers.bydfi.com/en/futures/market#recent-trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum amount of trades to fetch (default 500, max 1000) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.fromId | <code>int</code> | No | retrieve from which trade ID to start. Default to retrieve the most recent trade records |
bydfi.fetchTrades (symbol[, since, limit, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
fetch all trades made by the user
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://developers.bydfi.com/en/futures/trade#historical-trades-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trades structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | the latest time in ms to fetch trades for |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | No | The unique code of a sub-wallet |
| params.orderType | <code>string</code> | 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])
<a name="fetchOHLCV" id="fetchohlcv"></a>
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Array<int>></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch (max 500) |
| params | <code>object</code> | No | extra parameters specific to the bitteam api endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest candle to fetch |
bydfi.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchTickers" id="fetchtickers"></a>
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a dictionary of ticker structures
See: https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchTickers (symbols[, params])
<a name="fetchTicker" id="fetchticker"></a>
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a ticker structure
See: https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchTicker (symbol[, params])
<a name="fetchFundingRate" id="fetchfundingrate"></a>
fetch the current funding rate
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a funding rate structure
See: https://developers.bydfi.com/en/futures/market#recent-funding-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchFundingRate (symbol[, params])
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
fetches historical funding rate prices
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of funding rate structures
See: https://developers.bydfi.com/en/futures/market#historical-funding-rates
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the funding rate history for |
| since | <code>int</code> | No | timestamp in ms of the earliest funding rate to fetch |
| limit | <code>int</code> | No | the maximum amount of funding rate structures to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest funding rate to fetch |
bydfi.fetchFundingRateHistory (symbol[, since, limit, params])
<a name="createOrder" id="createorder"></a>
create a trade order
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - an order structure
See: https://developers.bydfi.com/en/futures/trade#placing-an-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| type | <code>string</code> | Yes | 'market' or 'limit' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | how much of currency you want to trade in units of base currency |
| price | <code>float</code> | No | the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.hedged | <code>bool</code> | No | true for hedged mode, false for one way mode, default is false |
| params.clientOrderId | <code>string</code> | No | Custom order ID, must be unique for open orders |
| params.timeInForce | <code>string</code> | No | 'GTC' (Good Till Cancelled), 'FOK' (Fill Or Kill), 'IOC' (Immediate Or Cancel), 'PO' (Post Only) |
| params.postOnly | <code>bool</code> | No | true or false, whether the order is post-only |
| params.reduceOnly | <code>bool</code> | No | true or false, true or false whether the order is reduce-only |
| params.stopLossPrice | <code>float</code> | No | The price a stop loss order is triggered at |
| params.takeProfitPrice | <code>float</code> | No | The price a take profit order is triggered at |
| params.trailingTriggerPrice | <code>float</code> | No | the price to activate a trailing order, default uses the price argument or market price if price is not provided |
| params.trailingPercent | <code>float</code> | No | the percent to trail away from the current market price |
| params.triggerPriceType | <code>string</code> | No | 'MARK_PRICE' or 'CONTRACT_PRICE', default is 'CONTRACT_PRICE', the price type used to trigger stop orders |
| params.closePosition | <code>bool</code> | 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])
<a name="createOrders" id="createorders"></a>
create a list of trade orders
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - an order structure
See: https://developers.bydfi.com/en/futures/trade#batch-order-placement
| Param | Type | Required | Description |
|---|---|---|---|
| orders | <code>Array</code> | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | 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])
<a name="editOrder" id="editorder"></a>
edit a trade order
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - an order structure
See: https://developers.bydfi.com/en/futures/trade#order-modification
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id (mandatory if params.clientOrderId is not provided) |
| symbol | <code>string</code> | No | unified symbol of the market to create an order in |
| type | <code>string</code> | No | not used by bydfi editOrder |
| side | <code>string</code> | No | 'buy' or 'sell' |
| amount | <code>float</code> | No | how much of the currency you want to trade in units of the base currency |
| price | <code>float</code> | No | the price for the order, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | a unique identifier for the order (could be alternative to id) |
| params.wallet | <code>string</code> | 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])
<a name="editOrders" id="editorders"></a>
edit a list of trade orders
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - an order structure
See: https://developers.bydfi.com/en/futures/trade#batch-order-modification
| Param | Type | Required | Description |
|---|---|---|---|
| orders | <code>Array</code> | Yes | list of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | 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])
<a name="cancelAllOrders" id="cancelallorders"></a>
cancel all open orders in a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developers.bydfi.com/en/futures/trade#complete-order-cancellation
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market to cancel orders in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | 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])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetch all unfilled currently open orders
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Order></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.trigger | <code>bool</code> | No | true or false, whether to fetch conditional orders only |
| params.wallet | <code>string</code> | 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])
<a name="fetchOpenOrder" id="fetchopenorder"></a>
fetch an open order by the id
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id (mandatory if params.clientOrderId is not provided) |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.trigger | <code>bool</code> | No | true or false, whether to fetch conditional orders only |
| params.clientOrderId | <code>string</code> | No | a unique identifier for the order (could be alternative to id) |
| params.wallet | <code>string</code> | 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])
<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>
fetches information on multiple canceled and closed orders made by the user
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developers.bydfi.com/en/futures/trade#historical-orders-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the closed orders |
| since | <code>int</code> | No | timestamp in ms of the earliest order |
| limit | <code>int</code> | No | the max number of closed orders to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest order |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | No | The unique code of a sub-wallet |
| params.orderType | <code>string</code> | 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])
<a name="setLeverage" id="setleverage"></a>
set the level of leverage for a market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - response from the exchange
See: https://developers.bydfi.com/en/futures/trade#set-leverage-for-single-trading-pair
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | <code>float</code> | Yes | the rate of leverage |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | 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])
<a name="fetchLeverage" id="fetchleverage"></a>
fetch the set leverage for a market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a leverage structure
See: https://developers.bydfi.com/en/futures/trade#get-leverage-for-single-trading-pair
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.wallet | <code>string</code> | 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])
<a name="fetchPositions" id="fetchpositions"></a>
fetch all open positions
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of position structure
See: https://developers.bydfi.com/en/futures/trade#positions-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.settleCoin | <code>string</code> | No | the settlement currency (USDT or USDC or USD) |
bydfi.fetchPositions ([symbols, params])
<a name="fetchPositionsForSymbol" id="fetchpositionsforsymbol"></a>
fetch all open positions for specific symbol
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of position structure
See: https://developers.bydfi.com/en/futures/trade#positions-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
bydfi.fetchPositionsForSymbol (symbol[, params])
<a name="fetchPositionHistory" id="fetchpositionhistory"></a>
fetches historical positions
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - 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 | <code>string</code> | Yes | a unified market symbol |
| since | <code>int</code> | No | timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days |
| limit | <code>int</code> | No | the maximum amount of records to fetch (default 500, max 500) |
| params | <code>object</code> | Yes | extra parameters specific to the exchange api endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest position to fetch , params["until"] - since <= 7 days |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | 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])
<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>
fetches historical positions
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - 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 | <code>Array<string></code> | Yes | a list of unified market symbols |
| since | <code>int</code> | No | timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days |
| limit | <code>int</code> | No | the maximum amount of records to fetch (default 500, max 500) |
| params | <code>object</code> | Yes | extra parameters specific to the exchange api endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest position to fetch , params["until"] - since <= 7 days |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | 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])
<a name="fetchMarginMode" id="fetchmarginmode"></a>
fetches the margin mode of a trading pair
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a margin mode structure
See: https://developers.bydfi.com/en/futures/user#margin-mode-query
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the margin mode for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | 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])
<a name="setMarginMode" id="setmarginmode"></a>
set margin mode to 'cross' or 'isolated'
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - response from the exchange
See: https://developers.bydfi.com/en/futures/user#change-margin-type-cross-margin
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | <code>string</code> | Yes | 'cross' or 'isolated' |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | 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])
<a name="setPositionMode" id="setpositionmode"></a>
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 <code>bydfi</code>
Returns: <code>object</code> - response from the exchange
See: https://developers.bydfi.com/en/futures/user#change-position-mode-dual
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | <code>bool</code> | Yes | set to true to use dualSidePosition |
| symbol | <code>string</code> | No | not used by bydfi setPositionMode () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.settleCoin | <code>string</code> | No | The settlement currency - USDT or USDC or USD (default is USDT) |
bydfi.setPositionMode (hedged[, symbol, params])
<a name="fetchPositionMode" id="fetchpositionmode"></a>
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 <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>string</code> | No | unified symbol of the market to fetch the order book for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.contractType | <code>string</code> | No | FUTURE or DELIVERY, default is FUTURE |
| params.wallet | <code>string</code> | No | The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract |
| params.settleCoin | <code>string</code> | 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])
<a name="fetchBalance" id="fetchbalance"></a>
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a balance structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.account | <code>string</code> | 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 | <code>string</code> | 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 | <code>string</code> | No | currency id for the balance to fetch |
bydfi.fetchBalance ([params])
<a name="fetchTransfers" id="fetchtransfers"></a>
fetch a history of internal transfers made on an account
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of transfer structures
See: https://developers.bydfi.com/en/account#query-wallet-transfer-records
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code of the currency transferred |
| since | <code>int</code> | No | the earliest time in ms to fetch transfers for |
| limit | <code>int</code> | No | the maximum number of transfers structures to retrieve (default 10) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | the latest time in ms to fetch entries for |
bydfi.fetchTransfers (code[, since, limit, params])
<a name="fetchDeposits" id="fetchdeposits"></a>
fetch all deposits made to an account
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://developers.bydfi.com/en/spot/account#query-deposit-records
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code (mandatory) |
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
| limit | <code>int</code> | No | the maximum number of deposits structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchDeposits (code[, since, limit, params])
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
fetch all withdrawals made from an account
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://developers.bydfi.com/en/spot/account#query-withdrawal-records
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code (mandatory) |
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
| limit | <code>int</code> | No | the maximum number of withdrawal structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.fetchWithdrawals (code[, since, limit, params])
<a name="watchTicker" id="watchticker"></a>
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a ticker structure
See: https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchTicker (symbol[, params])
<a name="unWatchTicker" id="unwatchticker"></a>
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a ticker structure
See: https://developers.bydfi.com/en/futures/websocket-market#ticker-by-symbol
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.unWatchTicker (symbol[, params])
<a name="watchTickers" id="watchtickers"></a>
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 <code>bydfi</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchTickers (symbols[, params])
<a name="unWatchTickers" id="unwatchtickers"></a>
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 <code>bydfi</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.unWatchTickers (symbols[, params])
<a name="watchOHLCV" id="watchohlcv"></a>
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Array<int>></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOHLCV (symbol, timeframe[, since, limit, params])
<a name="unWatchOHLCV" id="unwatchohlcv"></a>
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Array<int>></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.unWatchOHLCV (symbol, timeframe[, params])
<a name="watchOHLCVForSymbols" id="watchohlcvforsymbols"></a>
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Array<int>></code> - 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 | <code>Array<Array<string>></code> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOHLCVForSymbols (symbolsAndTimeframes[, since, limit, params])
<a name="unWatchOHLCVForSymbols" id="unwatchohlcvforsymbols"></a>
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<Array<int>></code> - 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 | <code>Array<Array<string>></code> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.unWatchOHLCVForSymbols (symbolsAndTimeframes[, params])
<a name="watchOrderBook" id="watchorderbook"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return (default and maxi is 100) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOrderBook (symbol[, limit, params])
<a name="unWatchOrderBook" id="unwatchorderbook"></a>
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>string</code> | Yes | unified array of symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.unWatchOrderBook (symbol[, params])
<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>Array<string></code> | Yes | unified array of symbols |
| limit | <code>int</code> | No | the maximum amount of order book entries to return (default and max is 100) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOrderBookForSymbols (symbols[, limit, params])
<a name="unWatchOrderBookForSymbols" id="unwatchorderbookforsymbols"></a>
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - 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 | <code>Array<string></code> | Yes | unified array of symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.method | <code>string</code> | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2' |
bydfi.unWatchOrderBookForSymbols (symbols[, params])
<a name="watchOrders" id="watchorders"></a>
watches information on multiple orders made by the user
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOrders (symbol[, since, limit, params])
<a name="watchOrdersForSymbols" id="watchordersforsymbols"></a>
watches information on multiple orders made by the user
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://developers.bydfi.com/en/futures/websocket-account#order-trade-update-push
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch orders for |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of trade structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchOrdersForSymbols (symbols[, since, limit, params])
<a name="watchPositions" id="watchpositions"></a>
watch all open positions
Kind: instance method of <code>bydfi</code>
Returns: <code>Array<object></code> - a list of position structure
See: https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| since | <code>int</code> | No | the earliest time in ms to fetch positions for |
| limit | <code>int</code> | No | the maximum number of positions to retrieve |
| params | <code>object</code> | Yes | extra parameters specific to the exchange API endpoint |
bydfi.watchPositions ([symbols, since, limit, params])
<a name="watchBalance" id="watchbalance"></a>
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>bydfi</code>
Returns: <code>object</code> - a balance structure
See: https://developers.bydfi.com/en/futures/websocket-account#balance-and-position-update-push
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
bydfi.watchBalance ([params])