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