mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
1231 lines
46 KiB
Markdown
1231 lines
46 KiB
Markdown
|
|
<a name="whitebit" id="whitebit"></a>
|
|
|
|
## whitebit{docsify-ignore}
|
|
**Kind**: global class
|
|
**Extends**: <code>Exchange</code>
|
|
|
|
* [fetchMarkets](#fetchmarkets)
|
|
* [fetchCurrencies](#fetchcurrencies)
|
|
* [fetchTransactionFees](#fetchtransactionfees)
|
|
* [fetchDepositWithdrawFees](#fetchdepositwithdrawfees)
|
|
* [fetchTradingFees](#fetchtradingfees)
|
|
* [fetchTicker](#fetchticker)
|
|
* [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)
|
|
* [cancelAllOrdersAfter](#cancelallordersafter)
|
|
* [fetchBalance](#fetchbalance)
|
|
* [fetchOpenOrders](#fetchopenorders)
|
|
* [fetchClosedOrders](#fetchclosedorders)
|
|
* [fetchOrderTrades](#fetchordertrades)
|
|
* [fetchDepositAddress](#fetchdepositaddress)
|
|
* [createDepositAddress](#createdepositaddress)
|
|
* [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)
|
|
* [watchOHLCV](#watchohlcv)
|
|
* [watchOrderBook](#watchorderbook)
|
|
* [watchTicker](#watchticker)
|
|
* [watchTickers](#watchtickers)
|
|
* [watchTrades](#watchtrades)
|
|
* [watchMyTrades](#watchmytrades)
|
|
* [watchOrders](#watchorders)
|
|
* [watchBalance](#watchbalance)
|
|
|
|
<a name="fetchMarkets" id="fetchmarkets"></a>
|
|
|
|
### fetchMarkets{docsify-ignore}
|
|
retrieves data on all markets for whitebit
|
|
|
|
**Kind**: instance method of [<code>whitebit</code>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - an array of objects representing market data
|
|
|
|
**See**: https://docs.whitebit.com/public/http-v4/#market-info
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - an associative dictionary of currencies
|
|
|
|
**See**: https://docs.whitebit.com/public/http-v4/#asset-status-list
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>Array<string></code>, <code>undefined</code> | Yes | not used by fetchTransactionFees () |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>Array<string></code>, <code>undefined</code> | Yes | not used by fetchDepositWithdrawFees () |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
whitebit.fetchTradingFees ([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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
whitebit.fetchTicker (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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>Array<string></code> | No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.method | <code>string</code> | No | either v2PublicGetTicker or v4PublicGetTicker default is v4PublicGetTicker |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
|
|
| limit | <code>int</code> | No | the maximum amount of order book entries to return |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<Trade></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<Trade></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
|
|
|
**See**: https://docs.whitebit.com/public/http-v1/#kline
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
|
|
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>object</code> | No | extra 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>](#whitebit)
|
|
**Returns**: <code>int</code> - the current integer timestamp in milliseconds from the exchange server
|
|
|
|
**See**: https://docs.whitebit.com/public/http-v4/#server-time
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| type | <code>string</code> | Yes | 'market' or 'limit' |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| amount | <code>float</code> | Yes | how much of currency you want to trade in units of base currency |
|
|
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.cost | <code>float</code> | No | *market orders only* the cost of the order in units of the base currency |
|
|
| params.triggerPrice | <code>float</code> | No | The price at which a trigger order is triggered at |
|
|
| params.postOnly | <code>bool</code> | No | If true, the order will only be posted to the order book and not executed immediately |
|
|
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
|
|
| params.marginMode | <code>string</code> | No | 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | cancel order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| type | <code>string</code> | Yes | 'market' or 'limit' |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| amount | <code>float</code> | Yes | how much of currency you want to trade in units of base currency |
|
|
| price | <code>float</code> | Yes | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.type | <code>string</code> | No | market type, ['swap', 'spot'] |
|
|
| params.isMargin | <code>boolean</code> | No | cancel all margin orders |
|
|
|
|
|
|
```javascript
|
|
whitebit.cancelAllOrders (symbol[, 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>](#whitebit)
|
|
**Returns**: <code>object</code> - the api result
|
|
|
|
**See**: https://docs.whitebit.com/private/http-trade-v4/#sync-kill-switch-timer
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| timeout | <code>number</code> | Yes | time in milliseconds, 0 represents cancel the timer |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.types | <code>string</code> | No | Order types value. Example: "spot", "margin", "futures" or null |
|
|
| params.symbol | <code>string</code> | No | symbol unified symbol of the market the order was made in |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>object</code> | No | extra 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>](#whitebit)
|
|
**Returns**: <code>Array<Order></code> - 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 | <code>string</code> | No | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch open orders for |
|
|
| limit | <code>int</code> | No | the maximum number of open order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<Order></code> - 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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
|
|
| limit | <code>int</code> | No | the maximum number of trades to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
whitebit.fetchOrderTrades (id, symbol[, 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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| params | <code>object</code> | No | extra 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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified currency code of the currency for the deposit address |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.network | <code>string</code> | No | the blockchain network to create a deposit address on |
|
|
| params.type | <code>string</code> | No | address type, available for specific currencies |
|
|
|
|
|
|
```javascript
|
|
whitebit.createDepositAddress (code[, 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>](#whitebit)
|
|
**Returns**: <code>object</code> - response from the exchange
|
|
|
|
**See**: https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| leverage | <code>float</code> | Yes | the rate of leverage |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| amount | <code>float</code> | Yes | amount to transfer |
|
|
| fromAccount | <code>string</code> | Yes | account to transfer from - main, spot, collateral |
|
|
| toAccount | <code>string</code> | Yes | account to transfer to - main, spot, collateral |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| amount | <code>float</code> | Yes | the amount to withdraw |
|
|
| address | <code>string</code> | Yes | the address to withdraw to |
|
|
| tag | <code>string</code> | Yes | |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | deposit id |
|
|
| code | <code>string</code> | Yes | not used by whitebit fetchDeposit () |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
|
|
| limit | <code>int</code> | No | the maximum number of deposits structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch borrrow interest for |
|
|
| limit | <code>int</code> | No | the maximum number of structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra 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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | No | unified market symbol |
|
|
| since | <code>int</code> | No | the starting timestamp in milliseconds |
|
|
| limit | <code>int</code> | No | the number of entries to return |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>int</code> | No | the latest time in ms to fetch funding history for |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
|
|
| limit | <code>int</code> | No | max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS |
|
|
| params.transactionMethod | <code>number</code> | No | Method. Example: 1 to display deposits / 2 to display withdraws. Do not send this parameter in order to receive both deposits and withdraws. |
|
|
| params.address | <code>string</code> | No | Can be used for filtering transactions by specific address or memo. |
|
|
| params.addresses | <code>Array<string></code> | No | Can be used for filtering transactions by specific addresses or memos (max: 20). |
|
|
| params.uniqueId | <code>string</code> | No | Can be used for filtering transactions by specific unique id |
|
|
| params.offset | <code>int</code> | No | If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000 |
|
|
| params.status | <code>Array<string></code> | No | Can be used for filtering transactions by status codes. Caution: You must use this parameter with appropriate transactionMethod and use valid status codes for this method. You can find them below. Example: "status": [3,7] |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | the currency that you want to sell and convert from |
|
|
| toCode | <code>string</code> | Yes | the currency that you want to buy and convert into |
|
|
| amount | <code>float</code> | Yes | how much you want to trade in units of the from currency |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | the id of the trade that you want to make |
|
|
| fromCode | <code>string</code> | Yes | the currency that you want to sell and convert from |
|
|
| toCode | <code>string</code> | Yes | the currency that you want to buy and convert into |
|
|
| amount | <code>float</code> | No | how much you want to trade in units of the from currency |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | No | the unified currency code |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch conversions for |
|
|
| limit | <code>int</code> | No | the maximum number of conversion structures to retrieve, default 20, max 200 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>string</code> | No | the end time in ms |
|
|
| params.fromTicker | <code>string</code> | No | the currency that you sold and converted from |
|
|
| params.toTicker | <code>string</code> | No | the currency that you bought and converted into |
|
|
| params.quoteId | <code>string</code> | No | the quote id of the conversion |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified contract symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch positions for |
|
|
| limit | <code>int</code> | No | the maximum amount of records to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange api endpoint |
|
|
| params.positionId | <code>int</code> | No | the id of the requested position |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>Array<string></code> | No | list of unified market symbols |
|
|
| params | <code>object</code> | No | extra 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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified market symbol of the market the position is held in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified currency code |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
whitebit.fetchCrossBorrowRate (code[, 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>](#whitebit)
|
|
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
|
|
|
**See**: https://docs.whitebit.com/public/websocket/#kline
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
|
|
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
|
|
| limit | <code>int</code> | No | the maximum amount of order book entries to return |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://docs.whitebit.com/public/websocket/#market-statistics
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://docs.whitebit.com/public/websocket/#market-statistics
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | No | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>str</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
|
|
| limit | <code>int</code> | No | the maximum number of trades structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```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>](#whitebit)
|
|
**Returns**: <code>object</code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.type | <code>str</code> | No | spot or contract if not provided this.options['defaultType'] is used |
|
|
|
|
|
|
```javascript
|
|
whitebit.watchBalance ([params])
|
|
```
|
|
|