Back to Ccxt

Whitebit

wiki/exchanges/whitebit.md

4.5.5253.9 KB
Original Source

<a name="whitebit" id="whitebit"></a>

whitebit{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchMarkets ([params])

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchCurrencies ([params])

<a name="fetchTransactionFees" id="fetchtransactionfees"></a>

fetchTransactionFees{docsify-ignore}

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

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yesnot used by fetchTransactionFees ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTransactionFees (codes[, params])

<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>

fetchDepositWithdrawFees{docsify-ignore}

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

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yesnot used by fetchDepositWithdrawFees ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchDepositWithdrawFees (codes[, params])

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTradingFees ([params])

<a name="fetchTradingLimits" id="fetchtradinglimits"></a>

fetchTradingLimits{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTradingLimits (symbols[, params])

<a name="fetchFundingLimits" id="fetchfundinglimits"></a>

fetchFundingLimits{docsify-ignore}

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

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yesunified currency codes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchFundingLimits (codes[, params])

<a name="fetchTicker" id="fetchticker"></a>

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 <code>whitebit</code>
Returns: <code>object</code> - a ticker structure

See: https://docs.whitebit.com/public/http-v4/#market-activity

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTicker (symbol[, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order by the id

Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.checkActive<code>boolean</code>Nowhether to check active orders (default: true)
params.checkExecuted<code>boolean</code>Nowhether to check executed orders (default: true)
javascript
whitebit.fetchOrder (id, symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra 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>Noeither v2PublicGetTicker or v4PublicGetTicker or v4PublicGetFutures - default is v4PublicGetTicker for spot and mixed markets, and v4PublicGetFutures for swap
javascript
whitebit.fetchTickers ([symbols, params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchOrderBook (symbol[, limit, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTrades (symbol[, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

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 <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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchStatus" id="fetchstatus"></a>

fetchStatus{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchStatus ([params])

<a name="fetchTime" id="fetchtime"></a>

fetchTime{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchTime ([params])

<a name="createMarketOrderWithCost" id="createmarketorderwithcost"></a>

createMarketOrderWithCost{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
side<code>string</code>Yes'buy' or 'sell'
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.createMarketOrderWithCost (symbol, side, cost[, params])

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.createMarketBuyOrderWithCost (symbol, cost[, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified 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>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cost<code>float</code>Nomarket orders only the cost of the order in units of the base currency
params.triggerPrice<code>float</code>NoThe price at which a trigger order is triggered at
params.postOnly<code>bool</code>NoIf true, the order will only be posted to the order book and not executed immediately
params.clientOrderId<code>string</code>Noa 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
javascript
whitebit.createOrder (symbol, type, side, amount[, price, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yescancel order id
symbol<code>string</code>Yesunified 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>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Yesthe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.editOrder (id, symbol, type, side, amount, price[, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.cancelOrder (id, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>Nomarket type, ['swap', 'spot']
params.isMargin<code>boolean</code>Nocancel all margin orders
javascript
whitebit.cancelAllOrders (symbol[, params])

<a name="fetchOrders" id="fetchorders"></a>

fetchOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchOrders (symbol[, since, limit, params])

<a name="cancelAllOrdersAfter" id="cancelallordersafter"></a>

cancelAllOrdersAfter{docsify-ignore}

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

ParamTypeRequiredDescription
timeout<code>number</code>Yestime in milliseconds, 0 represents cancel the timer
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.types<code>string</code>NoOrder types value. Example: "spot", "margin", "futures" or null
params.symbol<code>string</code>Nosymbol unified symbol of the market the order was made in
javascript
whitebit.cancelAllOrdersAfter (timeout[, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchBalance ([params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchOpenOrders ([symbol, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchOrderTrades" id="fetchordertrades"></a>

fetchOrderTrades{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchOrderTrades (id, symbol[, since, limit, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.transactionMethod<code>string</code>Notransaction method (1=deposit, 2=withdrawal) - automatically set to '2' for withdrawals
javascript
whitebit.fetchWithdrawals (code[, since, limit, params])

<a name="fetchTransactions" id="fetchtransactions"></a>

fetchTransactions{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch transactions for
limit<code>int</code>Nothe maximum number of transactions structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.transactionMethod<code>string</code>Notransaction method (1=deposit, 2=withdrawal) - automatically set to '1' for deposits
javascript
whitebit.fetchTransactions ([code, since, limit, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchDepositAddress (code[, params])

<a name="createDepositAddress" id="createdepositaddress"></a>

createDepositAddress{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency for the deposit address
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nothe blockchain network to create a deposit address on
params.type<code>string</code>Noaddress type, available for specific currencies
javascript
whitebit.createDepositAddress (code[, params])

<a name="fetchAccounts" id="fetchaccounts"></a>

fetchAccounts{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchAccounts ([params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

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

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.setLeverage (leverage, symbol[, params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from - main, spot, collateral
toAccount<code>string</code>Yesaccount to transfer to - main, spot, collateral
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.transfer (code, amount, fromAccount, toAccount[, params])

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.withdraw (code, amount, address, tag[, params])

<a name="fetchDeposit" id="fetchdeposit"></a>

fetchDeposit{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesdeposit id
code<code>string</code>Yesnot used by whitebit fetchDeposit ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchDeposit (id, code[, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchDeposits (code[, since, limit, params])

<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>

fetchBorrowInterest{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch borrrow interest for
limit<code>int</code>Nothe maximum number of structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchBorrowInterest (code, symbol[, since, limit, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchFundingRate (symbol[, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchFundingRates (symbols[, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol
since<code>int</code>Nothe starting timestamp in milliseconds
limit<code>int</code>Nothe number of entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch funding history for
javascript
whitebit.fetchFundingHistory ([symbol, since, limit, params])

<a name="fetchDepositsWithdrawals" id="fetchdepositswithdrawals"></a>

fetchDepositsWithdrawals{docsify-ignore}

fetch history of deposits and withdrawals

Kind: instance method of <code>whitebit</code>
Returns: <code>object</code> - a list of transaction structure

See: https://github.com/whitebit-exchange/api-docs/blob/main/pages/private/http-main-v4.md#get-depositwithdraw-history

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code for the currency of the deposit/withdrawals, default is undefined
since<code>int</code>Notimestamp in ms of the earliest deposit/withdrawal, default is undefined
limit<code>int</code>Nomax number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
params<code>object</code>Noextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.transactionMethod<code>number</code>NoMethod. 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>NoCan be used for filtering transactions by specific address or memo.
params.addresses<code>Array<string></code>NoCan be used for filtering transactions by specific addresses or memos (max: 20).
params.uniqueId<code>string</code>NoCan be used for filtering transactions by specific unique id
params.offset<code>int</code>NoIf 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>NoCan 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])

<a name="fetchConvertQuote" id="fetchconvertquote"></a>

fetchConvertQuote{docsify-ignore}

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

ParamTypeRequiredDescription
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Yeshow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchConvertQuote (fromCode, toCode, amount[, params])

<a name="createConvertTrade" id="createconverttrade"></a>

createConvertTrade{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesthe id of the trade that you want to make
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Nohow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.createConvertTrade (id, fromCode, toCode[, amount, params])

<a name="fetchConvertTradeHistory" id="fetchconverttradehistory"></a>

fetchConvertTradeHistory{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Nothe unified currency code
since<code>int</code>Nothe earliest time in ms to fetch conversions for
limit<code>int</code>Nothe maximum number of conversion structures to retrieve, default 20, max 200
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>string</code>Nothe end time in ms
params.fromTicker<code>string</code>Nothe currency that you sold and converted from
params.toTicker<code>string</code>Nothe currency that you bought and converted into
params.quoteId<code>string</code>Nothe quote id of the conversion
javascript
whitebit.fetchConvertTradeHistory ([code, since, limit, params])

<a name="fetchPositionHistory" id="fetchpositionhistory"></a>

fetchPositionHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified contract symbol
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum amount of records to fetch
params<code>object</code>Noextra parameters specific to the exchange api endpoint
params.positionId<code>int</code>Nothe id of the requested position
javascript
whitebit.fetchPositionHistory (symbol[, since, limit, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchPositions ([symbols, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchPosition (symbol[, params])

<a name="fetchCrossBorrowRate" id="fetchcrossborrowrate"></a>

fetchCrossBorrowRate{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.fetchCrossBorrowRate (code[, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch (default 100, max 100)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest funding rate
javascript
whitebit.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="watchOHLCV" id="watchohlcv"></a>

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 <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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchOHLCV (symbol, timeframe[, since, limit, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchOrderBook (symbol[, limit, params])

<a name="watchTicker" id="watchticker"></a>

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 <code>whitebit</code>
Returns: <code>object</code> - a ticker structure

See: https://docs.whitebit.com/public/websocket/#market-statistics

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

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 <code>whitebit</code>
Returns: <code>object</code> - a ticker structure

See: https://docs.whitebit.com/public/websocket/#market-statistics

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchTickers ([symbols, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchTrades (symbol[, since, limit, params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>str</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchMyTrades (symbol[, since, limit, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
whitebit.watchOrders (symbol[, since, limit, params])

<a name="watchBalance" id="watchbalance"></a>

watchBalance{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>str</code>Nospot or contract if not provided this.options['defaultType'] is used
javascript
whitebit.watchBalance ([params])