## bitmart{docsify-ignore}
**Kind**: global class
**Extends**: Exchange
* [fetchTime](#fetchtime)
* [fetchStatus](#fetchstatus)
* [fetchMarkets](#fetchmarkets)
* [fetchCurrencies](#fetchcurrencies)
* [fetchTransactionFee](#fetchtransactionfee)
* [fetchDepositWithdrawFee](#fetchdepositwithdrawfee)
* [fetchTicker](#fetchticker)
* [fetchTickers](#fetchtickers)
* [fetchOrderBook](#fetchorderbook)
* [fetchTrades](#fetchtrades)
* [fetchOHLCV](#fetchohlcv)
* [fetchMyTrades](#fetchmytrades)
* [fetchOrderTrades](#fetchordertrades)
* [fetchBalance](#fetchbalance)
* [fetchTradingFee](#fetchtradingfee)
* [createMarketBuyOrderWithCost](#createmarketbuyorderwithcost)
* [createOrder](#createorder)
* [createOrders](#createorders)
* [cancelOrder](#cancelorder)
* [cancelOrders](#cancelorders)
* [cancelAllOrders](#cancelallorders)
* [fetchOpenOrders](#fetchopenorders)
* [fetchClosedOrders](#fetchclosedorders)
* [fetchCanceledOrders](#fetchcanceledorders)
* [fetchOrder](#fetchorder)
* [fetchDepositAddress](#fetchdepositaddress)
* [withdraw](#withdraw)
* [fetchDeposit](#fetchdeposit)
* [fetchDeposits](#fetchdeposits)
* [fetchWithdrawal](#fetchwithdrawal)
* [fetchWithdrawals](#fetchwithdrawals)
* [repayIsolatedMargin](#repayisolatedmargin)
* [borrowIsolatedMargin](#borrowisolatedmargin)
* [fetchIsolatedBorrowRate](#fetchisolatedborrowrate)
* [fetchIsolatedBorrowRates](#fetchisolatedborrowrates)
* [transfer](#transfer)
* [fetchTransfers](#fetchtransfers)
* [fetchBorrowInterest](#fetchborrowinterest)
* [fetchOpenInterest](#fetchopeninterest)
* [setLeverage](#setleverage)
* [fetchFundingRate](#fetchfundingrate)
* [fetchPosition](#fetchposition)
* [fetchPositions](#fetchpositions)
* [fetchMyLiquidations](#fetchmyliquidations)
* [watchBalance](#watchbalance)
* [watchTrades](#watchtrades)
* [watchTradesForSymbols](#watchtradesforsymbols)
* [watchTicker](#watchticker)
* [watchTickers](#watchtickers)
* [watchOrders](#watchorders)
* [watchPositions](#watchpositions)
* [watchOHLCV](#watchohlcv)
* [watchOrderBook](#watchorderbook)
* [watchOrderBookForSymbols](#watchorderbookforsymbols)
### fetchTime{docsify-ignore}
fetches the current integer timestamp in milliseconds from the exchange server
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: int
- the current integer timestamp in milliseconds from the exchange server
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTime ([params])
```
### fetchStatus{docsify-ignore}
the latest known information on the availability of the exchange API
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [status structure](https://docs.ccxt.com/#/?id=exchange-status-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchStatus ([params])
```
### fetchMarkets{docsify-ignore}
retrieves data on all markets for bitmart
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- an array of objects representing market data
**See**: https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchMarkets ([params])
```
### fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an associative dictionary of currencies
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchCurrencies ([params])
```
### fetchTransactionFee{docsify-ignore}
`DEPRECATED`
please use fetchDepositWithdrawFee instead
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [fee structure](https://docs.ccxt.com/#/?id=fee-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTransactionFee (code[, params])
```
### fetchDepositWithdrawFee{docsify-ignore}
fetch the fee for deposits and withdrawals
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [fee structure](https://docs.ccxt.com/#/?id=fee-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchDepositWithdrawFee (code[, params])
```
### fetchTicker{docsify-ignore}
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#get-ticker-of-a-trading-pair-v3
- https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTicker (symbol[, params])
```
### fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3
- https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTickers (symbols[, params])
```
### fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://developer-pro.bitmart.com/en/spot/#get-depth-v3
- https://developer-pro.bitmart.com/en/futures/#get-market-depth
- https://developer-pro.bitmart.com/en/futuresv2/#get-market-depth
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchOrderBook (symbol[, limit, params])
```
### fetchTrades{docsify-ignore}
get a list of the most recent trades for a particular symbol
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**: https://developer-pro.bitmart.com/en/spot/#get-recent-trades-v3
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum number of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTrades (symbol[, since, limit, params])
```
### fetchOHLCV{docsify-ignore}
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://developer-pro.bitmart.com/en/spot/#get-history-k-line-v3
- https://developer-pro.bitmart.com/en/futuresv2/#get-k-line
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | timestamp of the latest candle in ms |
| params.paginate | boolean
| No | *spot only* default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitmart.fetchOHLCV (symbol, timeframe[, since, limit, params])
```
### fetchMyTrades{docsify-ignore}
fetch all trades made by the user
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#account-trade-list-v4-signed
- https://developer-pro.bitmart.com/en/futures/#get-order-trade-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch trades for |
| params.marginMode | boolean
| No | *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported) |
```javascript
bitmart.fetchMyTrades (symbol[, since, limit, params])
```
### fetchOrderTrades{docsify-ignore}
fetch all the trades made from a single order
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#order-trade-list-v4-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | order id |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchOrderTrades (id, symbol[, since, limit, params])
```
### fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#get-spot-wallet-balance
- https://developer-pro.bitmart.com/en/futures/#get-contract-assets-detail
- https://developer-pro.bitmart.com/en/futuresv2/#get-contract-assets-keyed
- https://developer-pro.bitmart.com/en/spot/#get-account-balance
- https://developer-pro.bitmart.com/en/spot/#get-margin-account-details-isolated
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchBalance ([params])
```
### fetchTradingFee{docsify-ignore}
fetch the trading fees for a market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [fee structure](https://docs.ccxt.com/#/?id=fee-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchTradingFee (symbol[, params])
```
### createMarketBuyOrderWithCost{docsify-ignore}
create a market buy order by providing the symbol and cost
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| cost | float
| Yes | how much you want to trade in units of the quote currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.createMarketBuyOrderWithCost (symbol, cost[, params])
```
### createOrder{docsify-ignore}
create a trade order
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
- https://developer-pro.bitmart.com/en/spot/#place-margin-order
- https://developer-pro.bitmart.com/en/futures/#submit-order-signed
- https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
- https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market', 'limit' or 'trailing' for swap markets only |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much of currency you want to trade in units of base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'cross' or 'isolated' |
| params.leverage | string
| No | *swap only* leverage level |
| params.clientOrderId | string
| No | client order id of the order |
| params.reduceOnly | boolean
| No | *swap only* reduce only |
| params.postOnly | boolean
| No | make sure the order is posted to the order book and not matched immediately |
| params.triggerPrice | string
| No | *swap only* the price to trigger a stop order |
| params.price_type | int
| No | *swap only* 1: last price, 2: fair price, default is 1 |
| params.price_way | int
| No | *swap only* 1: price way long, 2: price way short |
| params.activation_price_type | int
| No | *swap trailing order only* 1: last price, 2: fair price, default is 1 |
| params.trailingPercent | string
| No | *swap only* the percent to trail away from the current market price, min 0.1 max 5 |
| params.trailingTriggerPrice | string
| No | *swap only* the price to trigger a trailing order, default uses the price argument |
```javascript
bitmart.createOrder (symbol, type, side, amount[, price, params])
```
### createOrders{docsify-ignore}
create a list of trade orders
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| orders | Array
| Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.createOrders (orders[, params])
```
### cancelOrder{docsify-ignore}
cancels an open order
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
- https://developer-pro.bitmart.com/en/spot/#cancel-order-v3-signed
- https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
- https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
- https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
- https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | order id |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string
| No | *spot only* the client order id of the order to cancel |
| params.stop | boolean
| No | *swap only* whether the order is a stop order |
```javascript
bitmart.cancelOrder (id, symbol[, params])
```
### cancelOrders{docsify-ignore}
cancel multiple orders
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#cancel-batch-order-v4-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| ids | Array<string>
| Yes | order ids |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.clientOrderIds | Array<string>
| No | client order ids |
```javascript
bitmart.cancelOrders (ids, symbol[, params])
```
### cancelAllOrders{docsify-ignore}
cancel all open orders in a market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
- https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
- https://developer-pro.bitmart.com/en/futuresv2/#cancel-all-orders-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market to cancel orders in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.side | string
| No | *spot only* 'buy' or 'sell' |
```javascript
bitmart.cancelAllOrders (symbol[, params])
```
### fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#current-open-orders-v4-signed
- https://developer-pro.bitmart.com/en/futures/#get-all-open-orders-keyed
- https://developer-pro.bitmart.com/en/futures/#get-all-current-plan-orders-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch open orders for |
| limit | int
| No | the maximum number of open order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | boolean
| No | *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported) |
| params.until | int
| No | *spot* the latest time in ms to fetch orders for |
| params.type | string
| No | *swap* order type, 'limit' or 'market' |
| params.order_state | string
| No | *swap* the order state, 'all' or 'partially_filled', default is 'all' |
| params.orderType | string
| No | *swap only* 'limit', 'market', or 'trailing' |
| params.trailing | boolean
| No | *swap only* set to true if you want to fetch trailing orders |
| params.trigger | boolean
| No | *swap only* set to true if you want to fetch trigger orders |
```javascript
bitmart.fetchOpenOrders (symbol[, since, limit, params])
```
### fetchClosedOrders{docsify-ignore}
fetches information on multiple closed orders made by the user
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#account-orders-v4-signed
- https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
- https://developer-pro.bitmart.com/en/futuresv2/#get-order-history-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | timestamp in ms of the latest entry |
| params.marginMode | string
| No | *spot only* 'cross' or 'isolated', for margin trading |
```javascript
bitmart.fetchClosedOrders (symbol[, since, limit, params])
```
### fetchCanceledOrders{docsify-ignore}
fetches information on multiple canceled orders made by the user
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | timestamp in ms of the earliest order, default is undefined |
| limit | int
| No | max number of orders to return, default is undefined |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchCanceledOrders (symbol[, since, limit, params])
```
### fetchOrder{docsify-ignore}
fetches information on an order made by the user
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#query-order-by-id-v4-signed
- https://developer-pro.bitmart.com/en/spot/#query-order-by-clientorderid-v4-signed
- https://developer-pro.bitmart.com/en/futures/#get-order-detail-keyed
- https://developer-pro.bitmart.com/en/futuresv2/#get-order-detail-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | the id of the order |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string
| No | *spot* fetch the order by client order id instead of order id |
| params.orderType | string
| No | *swap only* 'limit', 'market', 'liquidate', 'bankruptcy', 'adl' or 'trailing' |
| params.trailing | boolean
| No | *swap only* set to true if you want to fetch a trailing order |
```javascript
bitmart.fetchOrder (id, symbol[, params])
```
### fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an [address structure](https://docs.ccxt.com/#/?id=address-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#deposit-address-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchDepositAddress (code[, params])
```
### withdraw{docsify-ignore}
make a withdrawal
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | the amount to withdraw |
| address | string
| Yes | the address to withdraw to |
| tag | string
| Yes | |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.withdraw (code, amount, address, tag[, params])
```
### fetchDeposit{docsify-ignore}
fetch information on a deposit
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | deposit id |
| code | string
| Yes | not used by bitmart fetchDeposit () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchDeposit (id, code[, params])
```
### fetchDeposits{docsify-ignore}
fetch all deposits made to an account
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch deposits for |
| limit | int
| No | the maximum number of deposits structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchDeposits (code[, since, limit, params])
```
### fetchWithdrawal{docsify-ignore}
fetch data on a currency withdrawal via the withdrawal id
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | withdrawal id |
| code | string
| Yes | not used by bitmart.fetchWithdrawal |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchWithdrawal (id, code[, params])
```
### fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch withdrawals for |
| limit | int
| No | the maximum number of withdrawals structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchWithdrawals (code[, since, limit, params])
```
### repayIsolatedMargin{docsify-ignore}
repay borrowed margin and interest
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#margin-repay-isolated
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to repay |
| amount | string
| Yes | the amount to repay |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.repayIsolatedMargin (symbol, code, amount[, params])
```
### borrowIsolatedMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | string
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.borrowIsolatedMargin (symbol, code, amount[, params])
```
### fetchIsolatedBorrowRate{docsify-ignore}
fetch the rate of interest to borrow a currency for margin trading
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an [isolated borrow rate structure](https://github.com/ccxt/ccxt/wiki/Manual#isolated-borrow-rate-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the borrow rate for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchIsolatedBorrowRate (symbol[, params])
```
### fetchIsolatedBorrowRates{docsify-ignore}
fetch the borrow interest rates of all currencies, currently only works for isolated margin
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a list of [isolated borrow rate structures](https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchIsolatedBorrowRates ([params])
```
### transfer{docsify-ignore}
transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
- https://developer-pro.bitmart.com/en/futures/#transfer-signed
- https://developer-pro.bitmart.com/en/futuresv2/#transfer-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | amount to transfer |
| fromAccount | string
| Yes | account to transfer from |
| toAccount | string
| Yes | account to transfer to |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.transfer (code, amount, fromAccount, toAccount[, params])
```
### fetchTransfers{docsify-ignore}
fetch a history of internal transfers made on an account, only transfers between spot and swap are supported
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [transfer structures](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://developer-pro.bitmart.com/en/futures/#get-transfer-list-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency transferred |
| since | int
| No | the earliest time in ms to fetch transfers for |
| limit | int
| No | the maximum number of transfer structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.page | int
| No | the required number of pages, default is 1, max is 1000 |
| params.until | int
| No | the latest time in ms to fetch transfers for |
```javascript
bitmart.fetchTransfers (code[, since, limit, params])
```
### fetchBorrowInterest{docsify-ignore}
fetch the interest owed by the user for borrowing currency for margin trading
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [borrow interest structures](https://docs.ccxt.com/#/?id=borrow-interest-structure)
**See**: https://developer-pro.bitmart.com/en/spot/#get-borrow-record-isolated
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| symbol | string
| Yes | unified market symbol when fetch interest in isolated markets |
| since | int
| No | the earliest time in ms to fetch borrrow interest for |
| limit | int
| No | the maximum number of structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchBorrowInterest (code, symbol[, since, limit, params])
```
### fetchOpenInterest{docsify-ignore}
Retrieves the open interest of a currency
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an open interest structure[https://docs.ccxt.com/#/?id=open-interest-structure](https://docs.ccxt.com/#/?id=open-interest-structure)
**See**: https://developer-pro.bitmart.com/en/futuresv2/#get-futures-openinterest
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | Unified CCXT market symbol |
| params | object
| No | exchange specific parameters |
```javascript
bitmart.fetchOpenInterest (symbol[, params])
```
### setLeverage{docsify-ignore}
set the level of leverage for a market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- response from the exchange
**See**
- https://developer-pro.bitmart.com/en/futures/#submit-leverage-signed
- https://developer-pro.bitmart.com/en/futuresv2/#submit-leverage-signed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| leverage | float
| Yes | the rate of leverage |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' |
```javascript
bitmart.setLeverage (leverage, symbol[, params])
```
### fetchFundingRate{docsify-ignore}
fetch the current funding rate
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
**See**: https://developer-pro.bitmart.com/en/futuresv2/#get-current-funding-rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchFundingRate (symbol[, params])
```
### fetchPosition{docsify-ignore}
fetch data on a single open contract trade position
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**
- https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
- https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market the position is held in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchPosition (symbol[, params])
```
### fetchPositions{docsify-ignore}
fetch all open contract positions
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [position structures](https://docs.ccxt.com/#/?id=position-structure)
**See**
- https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
- https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | list of unified market symbols |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.fetchPositions (symbols[, params])
```
### fetchMyLiquidations{docsify-ignore}
retrieves the users liquidated positions
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- an array of [liquidation structures](https://docs.ccxt.com/#/?id=liquidation-structure)
**See**: https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified CCXT market symbol |
| since | int
| No | the earliest time in ms to fetch liquidations for |
| limit | int
| No | the maximum number of liquidation structures to retrieve |
| params | object
| No | exchange specific parameters for the bitmart api endpoint |
| params.until | int
| No | timestamp in ms of the latest liquidation |
```javascript
bitmart.fetchMyLiquidations (symbol[, since, limit, params])
```
### watchBalance{docsify-ignore}
watch balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#private-balance-change
- https://developer-pro.bitmart.com/en/futuresv2/#private-assets-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchBalance ([params])
```
### watchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://developer-pro.bitmart.com/en/spot/#public-trade-channel
- https://developer-pro.bitmart.com/en/futuresv2/#public-trade-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchTrades (symbol[, since, limit, params])
```
### watchTradesForSymbols{docsify-ignore}
get the list of most recent trades for a list of symbols
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**: https://developer-pro.bitmart.com/en/spot/#public-trade-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchTradesForSymbols (symbols[, since, limit, params])
```
### watchTicker{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#public-ticker-channel
- https://developer-pro.bitmart.com/en/futuresv2/#public-ticker-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchTicker (symbol[, params])
```
### watchTickers{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**: https://developer-pro.bitmart.com/en/futuresv2/#public-ticker-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified symbol of the market to fetch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchTickers (symbols[, params])
```
### watchOrders{docsify-ignore}
watches information on multiple orders made by the user
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://developer-pro.bitmart.com/en/spot/#private-order-progress
- https://developer-pro.bitmart.com/en/futuresv2/#private-order-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchOrders (symbol[, since, limit, params])
```
### watchPositions{docsify-ignore}
watch all open positions
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<object>
- a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure)
**See**: https://developer-pro.bitmart.com/en/futures/#private-position-channel
| Param | Type | Description |
| --- | --- | --- |
| symbols | Array<string>
, undefined
| list of unified market symbols |
| params | object
| extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchPositions (symbols, params[])
```
### watchOHLCV{docsify-ignore}
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://developer-pro.bitmart.com/en/spot/#public-kline-channel
- https://developer-pro.bitmart.com/en/futuresv2/#public-klinebin-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchOHLCV (symbol, timeframe[, since, limit, params])
```
### watchOrderBook{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://developer-pro.bitmart.com/en/spot/#public-depth-all-channel
- https://developer-pro.bitmart.com/en/spot/#public-depth-increase-channel
- https://developer-pro.bitmart.com/en/futuresv2/#public-depth-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitmart.watchOrderBook (symbol[, limit, params])
```
### watchOrderBookForSymbols{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitmart
](#bitmart)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**: https://developer-pro.bitmart.com/en/spot/#public-depth-increase-channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified array of symbols |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.depth | string
| No | the type of order book to subscribe to, default is 'depth/increase100', also accepts 'depth5' or 'depth20' or depth50 |
```javascript
bitmart.watchOrderBookForSymbols (symbols[, limit, params])
```