wiki/exchanges/whitebit.md
<a name="whitebit" id="whitebit"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchMarkets" id="fetchmarkets"></a>
retrieves data on all markets for whitebit
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - an array of objects representing market data
See: https://docs.whitebit.com/public/http-v4/#market-info
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchMarkets ([params])
<a name="fetchCurrencies" id="fetchcurrencies"></a>
fetches all available currencies on an exchange
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an associative dictionary of currencies
See: https://docs.whitebit.com/public/http-v4/#asset-status-list
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchCurrencies ([params])
<a name="fetchTransactionFees" id="fetchtransactionfees"></a>
DEPRECATED
please use fetchDepositWithdrawFees instead
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a list of fee structures
See: https://docs.whitebit.com/public/http-v4/#fee
| Param | Type | Required | Description |
|---|---|---|---|
| codes | <code>Array<string></code>, <code>undefined</code> | Yes | not used by fetchTransactionFees () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchTransactionFees (codes[, params])
<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>
fetch deposit and withdraw fees
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a list of fee structures
See: https://docs.whitebit.com/public/http-v4/#fee
| Param | Type | Required | Description |
|---|---|---|---|
| codes | <code>Array<string></code>, <code>undefined</code> | Yes | not used by fetchDepositWithdrawFees () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchDepositWithdrawFees (codes[, params])
<a name="fetchTradingFees" id="fetchtradingfees"></a>
fetch the trading fees for multiple markets
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols
See: https://docs.whitebit.com/public/http-v4/#asset-status-list
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchTradingFees ([params])
<a name="fetchTradingLimits" id="fetchtradinglimits"></a>
fetch the trading limits for a market
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a trading limits structure
See: https://docs.whitebit.com/public/http-v4/#market-info
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchTradingLimits (symbols[, params])
<a name="fetchFundingLimits" id="fetchfundinglimits"></a>
fetch the deposit and withdrawal limits for a currency
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a funding limits structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| codes | <code>Array<string></code>, <code>undefined</code> | Yes | unified currency codes |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchFundingLimits (codes[, 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>whitebit</code>
Returns: <code>object</code> - a ticker structure
See: https://docs.whitebit.com/public/http-v4/#market-activity
| 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 |
whitebit.fetchTicker (symbol[, params])
<a name="fetchOrder" id="fetchorder"></a>
fetches information on an order by the id
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.checkActive | <code>boolean</code> | No | whether to check active orders (default: true) |
| params.checkExecuted | <code>boolean</code> | No | whether to check executed orders (default: true) |
whitebit.fetchOrder (id, symbol[, 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>whitebit</code>
Returns: <code>object</code> - a dictionary of ticker structures
See: https://docs.whitebit.com/public/http-v4/#market-activity
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | 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 |
| params.type | <code>string</code> | No | 'spot' or 'swap' - default is 'spot'. If type is 'swap', it will call v4PublicGetFutures |
| params.method | <code>string</code> | No | either v2PublicGetTicker or v4PublicGetTicker or v4PublicGetFutures - default is v4PublicGetTicker for spot and mixed markets, and v4PublicGetFutures for swap |
whitebit.fetchTickers ([symbols, 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>whitebit</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.whitebit.com/public/http-v4/#orderbook
| 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 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.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>whitebit</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://docs.whitebit.com/public/http-v4/#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 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchTrades (symbol[, since, limit, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
fetch all trades made by the user
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-history
| 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 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.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>whitebit</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.whitebit.com/public/http-v1/#kline
| 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 |
whitebit.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchStatus" id="fetchstatus"></a>
the latest known information on the availability of the exchange API
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a status structure
See: https://docs.whitebit.com/public/http-v4/#server-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchStatus ([params])
<a name="fetchTime" id="fetchtime"></a>
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of <code>whitebit</code>
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server
See: https://docs.whitebit.com/public/http-v4/#server-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchTime ([params])
<a name="createMarketOrderWithCost" id="createmarketorderwithcost"></a>
create a market order by providing the symbol, side and cost
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.createMarketOrderWithCost (symbol, side, cost[, params])
<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>
create a market buy order by providing the symbol and cost
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.createMarketBuyOrderWithCost (symbol, cost[, params])
<a name="createOrder" id="createorder"></a>
create a trade order
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure
See
| 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 fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.cost | <code>float</code> | No | market orders only the cost of the order in units of the base currency |
| params.triggerPrice | <code>float</code> | No | The price at which a trigger order is triggered at |
| params.postOnly | <code>bool</code> | No | If true, the order will only be posted to the order book and not executed immediately |
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
| params.marginMode | <code>string</code> | No | 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null |
whitebit.createOrder (symbol, type, side, amount[, price, params])
<a name="editOrder" id="editorder"></a>
edit a trade order
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure
See: https://docs.whitebit.com/private/http-trade-v4/#modify-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | cancel order id |
| 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> | Yes | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.editOrder (id, symbol, type, side, amount, price[, params])
<a name="cancelOrder" id="cancelorder"></a>
cancels an open order
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - An order structure
See: https://docs.whitebit.com/private/http-trade-v4/#cancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.cancelOrder (id, symbol[, params])
<a name="cancelAllOrders" id="cancelallorders"></a>
cancel all open orders
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://docs.whitebit.com/private/http-trade-v4/#cancel-all-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | market type, ['swap', 'spot'] |
| params.isMargin | <code>boolean</code> | No | cancel all margin orders |
whitebit.cancelAllOrders (symbol[, params])
<a name="fetchOrders" id="fetchorders"></a>
fetches information on multiple orders made by the user (combines open and closed orders)
Kind: instance method of <code>whitebit</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 |
whitebit.fetchOrders (symbol[, since, limit, params])
<a name="cancelAllOrdersAfter" id="cancelallordersafter"></a>
dead man's switch, cancel all orders after the given timeout
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - the api result
See: https://docs.whitebit.com/private/http-trade-v4/#sync-kill-switch-timer
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | <code>number</code> | Yes | time in milliseconds, 0 represents cancel the timer |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.types | <code>string</code> | No | Order types value. Example: "spot", "margin", "futures" or null |
| params.symbol | <code>string</code> | No | symbol unified symbol of the market the order was made in |
whitebit.cancelAllOrdersAfter (timeout[, 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>whitebit</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 |
whitebit.fetchBalance ([params])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetch all unfilled currently open orders
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.whitebit.com/private/http-trade-v4/#query-unexecutedactive-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch open orders for |
| limit | <code>int</code> | No | the maximum number of open order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchOpenOrders ([symbol, since, limit, params])
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
fetches information on multiple closed orders made by the user
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-orders
| 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 |
whitebit.fetchClosedOrders (symbol[, since, limit, params])
<a name="fetchOrderTrades" id="fetchordertrades"></a>
fetch all the trades made from a single order
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-deals
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| 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 to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchOrderTrades (id, symbol[, since, limit, params])
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
fetch all withdrawals made from an account
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
| limit | <code>int</code> | No | the maximum number of withdrawals structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.transactionMethod | <code>string</code> | No | transaction method (1=deposit, 2=withdrawal) - automatically set to '2' for withdrawals |
whitebit.fetchWithdrawals (code[, since, limit, params])
<a name="fetchTransactions" id="fetchtransactions"></a>
fetch history of deposits and withdrawals
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch transactions for |
| limit | <code>int</code> | No | the maximum number of transactions structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.transactionMethod | <code>string</code> | No | transaction method (1=deposit, 2=withdrawal) - automatically set to '1' for deposits |
whitebit.fetchTransactions ([code, since, limit, params])
<a name="fetchDepositAddress" id="fetchdepositaddress"></a>
fetch the deposit address for a currency associated with this account
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an address structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchDepositAddress (code[, params])
<a name="createDepositAddress" id="createdepositaddress"></a>
create a currency deposit address
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an address structure
See: https://docs.whitebit.com/private/http-main-v4/#create-new-address-for-deposit
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code of the currency for the deposit address |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.network | <code>string</code> | No | the blockchain network to create a deposit address on |
| params.type | <code>string</code> | No | address type, available for specific currencies |
whitebit.createDepositAddress (code[, params])
<a name="fetchAccounts" id="fetchaccounts"></a>
fetch all the accounts associated with a profile
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of account structures
See: https://docs.whitebit.com/private/http-main-v4/#sub-account-list
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchAccounts ([params])
<a name="setLeverage" id="setleverage"></a>
set the level of leverage for a market
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - response from the exchange
See: https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage
| 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 |
whitebit.setLeverage (leverage, symbol[, params])
<a name="transfer" id="transfer"></a>
transfer currency internally between wallets on the same account
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a transfer structure
See: https://docs.whitebit.com/private/http-main-v4/#transfer-between-main-and-trade-balances
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | amount to transfer |
| fromAccount | <code>string</code> | Yes | account to transfer from - main, spot, collateral |
| toAccount | <code>string</code> | Yes | account to transfer to - main, spot, collateral |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.transfer (code, amount, fromAccount, toAccount[, params])
<a name="withdraw" id="withdraw"></a>
make a withdrawal
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a transaction structure
See: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | the amount to withdraw |
| address | <code>string</code> | Yes | the address to withdraw to |
| tag | <code>string</code> | Yes | |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.withdraw (code, amount, address, tag[, params])
<a name="fetchDeposit" id="fetchdeposit"></a>
fetch information on a deposit
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a transaction structure
See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | deposit id |
| code | <code>string</code> | Yes | not used by whitebit fetchDeposit () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchDeposit (id, code[, params])
<a name="fetchDeposits" id="fetchdeposits"></a>
fetch all deposits made to an account
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| 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 |
whitebit.fetchDeposits (code[, since, limit, params])
<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>
fetch the interest owed by the user for borrowing currency for margin trading
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of borrow interest structures
See: https://docs.whitebit.com/private/http-trade-v4/#open-positions
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch borrrow interest for |
| limit | <code>int</code> | No | the maximum number of structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchBorrowInterest (code, symbol[, since, limit, params])
<a name="fetchFundingRate" id="fetchfundingrate"></a>
fetch the current funding rate
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a funding rate structure
See: https://docs.whitebit.com/public/http-v4/#available-futures-markets-list
| 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 |
whitebit.fetchFundingRate (symbol[, params])
<a name="fetchFundingRates" id="fetchfundingrates"></a>
fetch the funding rate for multiple markets
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of funding rate structures, indexed by market symbols
See: https://docs.whitebit.com/public/http-v4/#available-futures-markets-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchFundingRates (symbols[, params])
<a name="fetchFundingHistory" id="fetchfundinghistory"></a>
fetch the history of funding payments paid and received on this account
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of funding history structures
See: https://docs.whitebit.com/private/http-trade-v4/#funding-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol |
| since | <code>int</code> | No | the starting timestamp in milliseconds |
| limit | <code>int</code> | No | the number of entries to return |
| 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 funding history for |
whitebit.fetchFundingHistory ([symbol, since, limit, params])
<a name="fetchDepositsWithdrawals" id="fetchdepositswithdrawals"></a>
fetch history of deposits and withdrawals
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a list of transaction structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
| since | <code>int</code> | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
| limit | <code>int</code> | No | max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS |
| params.transactionMethod | <code>number</code> | No | Method. Example: 1 to display deposits / 2 to display withdraws. Do not send this parameter in order to receive both deposits and withdraws. |
| params.address | <code>string</code> | No | Can be used for filtering transactions by specific address or memo. |
| params.addresses | <code>Array<string></code> | No | Can be used for filtering transactions by specific addresses or memos (max: 20). |
| params.uniqueId | <code>string</code> | No | Can be used for filtering transactions by specific unique id |
| params.offset | <code>int</code> | No | If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000 |
| params.status | <code>Array<string></code> | No | Can be used for filtering transactions by status codes. Caution: You must use this parameter with appropriate transactionMethod and use valid status codes for this method. You can find them below. Example: "status": [3,7] |
whitebit.fetchDepositsWithdrawals ([code, since, limit, params])
<a name="fetchConvertQuote" id="fetchconvertquote"></a>
fetch a quote for converting from one currency to another
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a conversion structure
See: https://docs.whitebit.com/private/http-trade-v4/#convert-estimate
| Param | Type | Required | Description |
|---|---|---|---|
| fromCode | <code>string</code> | Yes | the currency that you want to sell and convert from |
| toCode | <code>string</code> | Yes | the currency that you want to buy and convert into |
| amount | <code>float</code> | Yes | how much you want to trade in units of the from currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchConvertQuote (fromCode, toCode, amount[, params])
<a name="createConvertTrade" id="createconverttrade"></a>
convert from one currency to another
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a conversion structure
See: https://docs.whitebit.com/private/http-trade-v4/#convert-confirm
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | the id of the trade that you want to make |
| fromCode | <code>string</code> | Yes | the currency that you want to sell and convert from |
| toCode | <code>string</code> | Yes | the currency that you want to buy and convert into |
| amount | <code>float</code> | No | how much you want to trade in units of the from currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.createConvertTrade (id, fromCode, toCode[, amount, params])
<a name="fetchConvertTradeHistory" id="fetchconverttradehistory"></a>
fetch the users history of conversion trades
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of conversion structures
See: https://docs.whitebit.com/private/http-trade-v4/#convert-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | the unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch conversions for |
| limit | <code>int</code> | No | the maximum number of conversion structures to retrieve, default 20, max 200 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>string</code> | No | the end time in ms |
| params.fromTicker | <code>string</code> | No | the currency that you sold and converted from |
| params.toTicker | <code>string</code> | No | the currency that you bought and converted into |
| params.quoteId | <code>string</code> | No | the quote id of the conversion |
whitebit.fetchConvertTradeHistory ([code, since, limit, params])
<a name="fetchPositionHistory" id="fetchpositionhistory"></a>
fetches historical positions
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of position structures
See: https://docs.whitebit.com/private/http-trade-v4/#positions-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified contract symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch positions for |
| limit | <code>int</code> | No | the maximum amount of records to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange api endpoint |
| params.positionId | <code>int</code> | No | the id of the requested position |
whitebit.fetchPositionHistory (symbol[, since, limit, params])
<a name="fetchPositions" id="fetchpositions"></a>
fetch all open positions
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of position structures
See: https://docs.whitebit.com/private/http-trade-v4/#open-positions
| 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 |
whitebit.fetchPositions ([symbols, params])
<a name="fetchPosition" id="fetchposition"></a>
fetch data on a single open contract trade position
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a position structure
See: https://docs.whitebit.com/private/http-trade-v4/#open-positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market the position is held in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchPosition (symbol[, params])
<a name="fetchCrossBorrowRate" id="fetchcrossborrowrate"></a>
fetch the rate of interest to borrow a currency for margin trading
Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a borrow rate structure
See: https://docs.whitebit.com/private/http-main-v4/#get-plans
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.fetchCrossBorrowRate (code[, params])
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
fetches historical funding rate prices
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of funding rate structures
See: https://docs.whitebit.com/api-reference/market-data/funding-history
| 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 (default 100, max 100) |
| 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 |
whitebit.fetchFundingRateHistory (symbol[, since, limit, params])
<a name="watchOHLCV" id="watchohlcv"></a>
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.whitebit.com/public/websocket/#kline
| 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 |
whitebit.watchOHLCV (symbol, timeframe[, since, limit, 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>whitebit</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.whitebit.com/public/websocket/#market-depth
| 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 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.watchOrderBook (symbol[, 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>whitebit</code>
Returns: <code>object</code> - a ticker structure
See: https://docs.whitebit.com/public/websocket/#market-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 |
whitebit.watchTicker (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>whitebit</code>
Returns: <code>object</code> - a ticker structure
See: https://docs.whitebit.com/public/websocket/#market-statistics
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.watchTickers ([symbols, params])
<a name="watchTrades" id="watchtrades"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://docs.whitebit.com/public/websocket/#market-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 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
whitebit.watchTrades (symbol[, since, limit, params])
<a name="watchMyTrades" id="watchmytrades"></a>
watches trades made by the user
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://docs.whitebit.com/private/websocket/#deals
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>str</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 |
whitebit.watchMyTrades (symbol[, since, limit, params])
<a name="watchOrders" id="watchorders"></a>
watches information on multiple orders made by the user
Kind: instance method of <code>whitebit</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://docs.whitebit.com/private/websocket/#orders-pending
| 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 |
whitebit.watchOrders (symbol[, 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>whitebit</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.type | <code>str</code> | No | spot or contract if not provided this.options['defaultType'] is used |
whitebit.watchBalance ([params])