CCXT

whitebit

whitebit cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

whitebit

Kind: global class
Extends: Exchange

fetchMarkets

retrieves data on all markets for whitebit

Kind: instance method of whitebit
Returns: Array<object> - an array of objects representing market data

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of whitebit
Returns: object - an associative dictionary of currencies

See: https://docs.whitebit.com/public/http-v4/#asset-status-list

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchCurrencies (params?)

fetchTransactionFees

DEPRECATED

please use fetchDepositWithdrawFees instead

Kind: instance method of whitebit
Returns: object - a list of fee structures

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

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by fetchTransactionFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTransactionFees (codes, params?)

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of whitebit
Returns: object - a list of fee structures

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

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by fetchDepositWithdrawFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchDepositWithdrawFees (codes, params?)

fetchTradingFees

fetch the trading fees for multiple markets

Kind: instance method of whitebit
Returns: object - a dictionary of fee structures indexed by market symbols

See: https://docs.whitebit.com/public/http-v4/#asset-status-list

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTradingFees (params?)

fetchTradingLimits

fetch the trading limits for a market

Kind: instance method of whitebit
Returns: object - a trading limits structure

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

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTradingLimits (symbols, params?)

fetchFundingLimits

fetch the deposit and withdrawal limits for a currency

Kind: instance method of whitebit
Returns: object - a funding limits structure

See

ParamTypeRequiredDescription
codesArray<string>, undefinedYesunified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchFundingLimits (codes, params?)

fetchTicker

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of whitebit
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTicker (symbol, params?)

fetchOrder

fetches information on an order by the id

Kind: instance method of whitebit
Returns: object - an order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.checkActivebooleanNowhether to check active orders (default: true)
params.checkExecutedbooleanNowhether to check executed orders (default: true)
whitebit.fetchOrder (id, symbol, params?)

fetchTickers

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of whitebit
Returns: object - a dictionary of ticker structures

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

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - default is 'spot'. If type is 'swap', it will call v4PublicGetFutures
params.methodstringNoeither v2PublicGetTicker or v4PublicGetTicker or v4PublicGetFutures - default is v4PublicGetTicker for spot and mixed markets, and v4PublicGetFutures for swap
whitebit.fetchTickers (symbols?, params?)

fetchOrderBook

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of whitebit
Returns: object - A dictionary of order book structures indexed by market symbols

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of whitebit
Returns: Array<Trade> - a list of trade structures

See: https://docs.whitebit.com/public/http-v4/#recent-trades

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of whitebit
Returns: Array<Trade> - a list of trade structures

See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-history

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchMyTrades (symbol, since?, limit?, params?)

fetchOHLCV

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of 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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance method of whitebit
Returns: object - a status structure

See: https://docs.whitebit.com/public/http-v4/#server-status

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchStatus (params?)

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of whitebit
Returns: int - the current integer timestamp in milliseconds from the exchange server

See: https://docs.whitebit.com/public/http-v4/#server-time

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchTime (params?)

createMarketOrderWithCost

create a market order by providing the symbol, side and cost

Kind: instance method of whitebit
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
sidestringYes'buy' or 'sell'
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.createMarketOrderWithCost (symbol, side, cost, params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance method of whitebit
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.createMarketBuyOrderWithCost (symbol, cost, params?)

createOrder

create a trade order

Kind: instance method of whitebit
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNomarket orders only the cost of the order in units of the base currency
params.triggerPricefloatNoThe price at which a trigger order is triggered at
params.postOnlyboolNoIf true, the order will only be posted to the order book and not executed immediately
params.clientOrderIdstringNoa unique id for the order
params.marginModestringNo'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?)

editOrder

edit a trade order

Kind: instance method of whitebit
Returns: object - an order structure

See: https://docs.whitebit.com/private/http-trade-v4/#modify-order

ParamTypeRequiredDescription
idstringYescancel order id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatYesthe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.editOrder (id, symbol, type, side, amount, price, params?)

cancelOrder

cancels an open order

Kind: instance method of whitebit
Returns: object - An order structure

See: https://docs.whitebit.com/private/http-trade-v4/#cancel-order

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.cancelOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders

Kind: instance method of whitebit
Returns: Array<object> - a list of order structures

See: https://docs.whitebit.com/private/http-trade-v4/#cancel-all-orders

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNomarket type, ['swap', 'spot']
params.isMarginbooleanNocancel all margin orders
whitebit.cancelAllOrders (symbol, params?)

fetchOrders

fetches information on multiple orders made by the user (combines open and closed orders)

Kind: instance method of whitebit
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchOrders (symbol, since?, limit?, params?)

cancelAllOrdersAfter

dead man's switch, cancel all orders after the given timeout

Kind: instance method of whitebit
Returns: object - the api result

See: https://docs.whitebit.com/private/http-trade-v4/#sync-kill-switch-timer

ParamTypeRequiredDescription
timeoutnumberYestime in milliseconds, 0 represents cancel the timer
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typesstringNoOrder types value. Example: "spot", "margin", "futures" or null
params.symbolstringNosymbol unified symbol of the market the order was made in
whitebit.cancelAllOrdersAfter (timeout, params?)

fetchBalance

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of whitebit
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchBalance (params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of whitebit
Returns: Array<Order> - a list of order structures

See: https://docs.whitebit.com/private/http-trade-v4/#query-unexecutedactive-orders

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of whitebit
Returns: Array<Order> - a list of order structures

See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-orders

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchClosedOrders (symbol, since?, limit?, params?)

fetchOrderTrades

fetch all the trades made from a single order

Kind: instance method of whitebit
Returns: Array<object> - a list of trade structures

See: https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-deals

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchOrderTrades (id, symbol, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

Kind: instance method of whitebit
Returns: Array<object> - a list of transaction structures

See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.transactionMethodstringNotransaction method (1=deposit, 2=withdrawal) - automatically set to '2' for withdrawals
whitebit.fetchWithdrawals (code, since?, limit?, params?)

fetchTransactions

fetch history of deposits and withdrawals

Kind: instance method of whitebit
Returns: Array<object> - a list of transaction structures

See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch transactions for
limitintNothe maximum number of transactions structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.transactionMethodstringNotransaction method (1=deposit, 2=withdrawal) - automatically set to '1' for deposits
whitebit.fetchTransactions (code?, since?, limit?, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of whitebit
Returns: object - an address structure

See

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchDepositAddress (code, params?)

createDepositAddress

create a currency deposit address

Kind: instance method of whitebit
Returns: object - an address structure

See: https://docs.whitebit.com/private/http-main-v4/#create-new-address-for-deposit

ParamTypeRequiredDescription
codestringYesunified currency code of the currency for the deposit address
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNothe blockchain network to create a deposit address on
params.typestringNoaddress type, available for specific currencies
whitebit.createDepositAddress (code, params?)

fetchAccounts

fetch all the accounts associated with a profile

Kind: instance method of whitebit
Returns: Array<object> - a list of account structures

See: https://docs.whitebit.com/private/http-main-v4/#sub-account-list

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchAccounts (params?)

setLeverage

set the level of leverage for a market

Kind: instance method of whitebit
Returns: object - response from the exchange

See: https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.setLeverage (leverage, symbol, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of whitebit
Returns: object - a transfer structure

See: https://docs.whitebit.com/private/http-main-v4/#transfer-between-main-and-trade-balances

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from - main, spot, collateral
toAccountstringYesaccount to transfer to - main, spot, collateral
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.transfer (code, amount, fromAccount, toAccount, params?)

withdraw

make a withdrawal

Kind: instance method of whitebit
Returns: object - a transaction structure

See: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.withdraw (code, amount, address, tag, params?)

fetchDeposit

fetch information on a deposit

Kind: instance method of whitebit
Returns: object - a transaction structure

See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history

ParamTypeRequiredDescription
idstringYesdeposit id
codestringYesnot used by whitebit fetchDeposit ()
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchDeposit (id, code, params?)

fetchDeposits

fetch all deposits made to an account

Kind: instance method of whitebit
Returns: Array<object> - a list of transaction structures

See: https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchDeposits (code, since?, limit?, params?)

fetchBorrowInterest

fetch the interest owed by the user for borrowing currency for margin trading

Kind: instance method of whitebit
Returns: Array<object> - a list of borrow interest structures

See: https://docs.whitebit.com/private/http-trade-v4/#open-positions

ParamTypeRequiredDescription
codestringYesunified currency code
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch borrrow interest for
limitintNothe maximum number of structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchBorrowInterest (code, symbol, since?, limit?, params?)

fetchFundingRate

fetch the current funding rate

Kind: instance method of whitebit
Returns: object - a funding rate structure

See: https://docs.whitebit.com/public/http-v4/#available-futures-markets-list

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchFundingRate (symbol, params?)

fetchFundingRates

fetch the funding rate for multiple markets

Kind: instance method of whitebit
Returns: Array<object> - a list of funding rate structures, indexed by market symbols

See: https://docs.whitebit.com/public/http-v4/#available-futures-markets-list

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchFundingRates (symbols, params?)

fetchFundingHistory

fetch the history of funding payments paid and received on this account

Kind: instance method of whitebit
Returns: Array<object> - a list of funding history structures

See: https://docs.whitebit.com/private/http-trade-v4/#funding-history

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe starting timestamp in milliseconds
limitintNothe number of entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch funding history for
whitebit.fetchFundingHistory (symbol?, since?, limit?, params?)

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

Kind: instance method of whitebit
Returns: object - 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
codestringNounified currency code for the currency of the deposit/withdrawals, default is undefined
sinceintNotimestamp in ms of the earliest deposit/withdrawal, default is undefined
limitintNomax number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.transactionMethodnumberNoMethod. Example: 1 to display deposits / 2 to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.
params.addressstringNoCan be used for filtering transactions by specific address or memo.
params.addressesArray<string>NoCan be used for filtering transactions by specific addresses or memos (max: 20).
params.uniqueIdstringNoCan be used for filtering transactions by specific unique id
params.offsetintNoIf 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.statusArray<string>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]
whitebit.fetchDepositsWithdrawals (code?, since?, limit?, params?)

fetchConvertQuote

fetch a quote for converting from one currency to another

Kind: instance method of whitebit
Returns: object - a conversion structure

See: https://docs.whitebit.com/private/http-trade-v4/#convert-estimate

ParamTypeRequiredDescription
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatYeshow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchConvertQuote (fromCode, toCode, amount, params?)

createConvertTrade

convert from one currency to another

Kind: instance method of whitebit
Returns: object - a conversion structure

See: https://docs.whitebit.com/private/http-trade-v4/#convert-confirm

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to make
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatNohow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.createConvertTrade (id, fromCode, toCode, amount?, params?)

fetchConvertTradeHistory

fetch the users history of conversion trades

Kind: instance method of whitebit
Returns: Array<object> - a list of conversion structures

See: https://docs.whitebit.com/private/http-trade-v4/#convert-history

ParamTypeRequiredDescription
codestringNothe unified currency code
sinceintNothe earliest time in ms to fetch conversions for
limitintNothe maximum number of conversion structures to retrieve, default 20, max 200
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilstringNothe end time in ms
params.fromTickerstringNothe currency that you sold and converted from
params.toTickerstringNothe currency that you bought and converted into
params.quoteIdstringNothe quote id of the conversion
whitebit.fetchConvertTradeHistory (code?, since?, limit?, params?)

fetchPositionHistory

fetches historical positions

Kind: instance method of whitebit
Returns: Array<object> - a list of position structures

See: https://docs.whitebit.com/private/http-trade-v4/#positions-history

ParamTypeRequiredDescription
symbolstringYesunified contract symbol
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum amount of records to fetch
paramsobjectNoextra parameters specific to the exchange api endpoint
params.positionIdintNothe id of the requested position
whitebit.fetchPositionHistory (symbol, since?, limit?, params?)

fetchPositions

fetch all open positions

Kind: instance method of whitebit
Returns: Array<object> - a list of position structures

See: https://docs.whitebit.com/private/http-trade-v4/#open-positions

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchPositions (symbols?, params?)

fetchPosition

fetch data on a single open contract trade position

Kind: instance method of whitebit
Returns: object - a position structure

See: https://docs.whitebit.com/private/http-trade-v4/#open-positions

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchPosition (symbol, params?)

fetchCrossBorrowRate

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of whitebit
Returns: object - a borrow rate structure

See: https://docs.whitebit.com/private/http-main-v4/#get-plans

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.fetchCrossBorrowRate (code, params?)

fetchFundingRateHistory

fetches historical funding rate prices

Kind: instance method of whitebit
Returns: Array<object> - a list of funding rate structures

See: https://docs.whitebit.com/api-reference/market-data/funding-history

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch (default 100, max 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest funding rate
whitebit.fetchFundingRateHistory (symbol, since?, limit?, params?)

watchOHLCV

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of 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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchOrderBook

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of whitebit
Returns: object - A dictionary of order book structures indexed by market symbols

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchOrderBook (symbol, limit?, params?)

watchTicker

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of whitebit
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchTicker (symbol, params?)

watchTickers

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

Kind: instance method of whitebit
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchTickers (symbols?, params?)

watchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of whitebit
Returns: Array<object> - a list of trade structures

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchTrades (symbol, since?, limit?, params?)

watchMyTrades

watches trades made by the user

Kind: instance method of whitebit
Returns: Array<object> - a list of trade structures

See: https://docs.whitebit.com/private/websocket/#deals

ParamTypeRequiredDescription
symbolstrYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchMyTrades (symbol, since?, limit?, params?)

watchOrders

watches information on multiple orders made by the user

Kind: instance method of whitebit
Returns: Array<object> - a list of order structures

See: https://docs.whitebit.com/private/websocket/#orders-pending

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
whitebit.watchOrders (symbol, since?, limit?, params?)

watchBalance

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of whitebit
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestrNospot or contract if not provided this.options['defaultType'] is used
whitebit.watchBalance (params?)

On this page