## xt{docsify-ignore}
**Kind**: global class
**Extends**: Exchange
* [fetchTime](#fetchtime)
* [fetchCurrencies](#fetchcurrencies)
* [fetchMarkets](#fetchmarkets)
* [fetchOHLCV](#fetchohlcv)
* [fetchOrderBook](#fetchorderbook)
* [fetchTicker](#fetchticker)
* [fetchTickers](#fetchtickers)
* [fetchBidsAsks](#fetchbidsasks)
* [fetchTrades](#fetchtrades)
* [fetchMyTrades](#fetchmytrades)
* [fetchBalance](#fetchbalance)
* [createMarketBuyOrderWithCost](#createmarketbuyorderwithcost)
* [createOrder](#createorder)
* [fetchOrder](#fetchorder)
* [fetchOrders](#fetchorders)
* [fetchOpenOrders](#fetchopenorders)
* [fetchClosedOrders](#fetchclosedorders)
* [fetchCanceledOrders](#fetchcanceledorders)
* [cancelOrder](#cancelorder)
* [cancelAllOrders](#cancelallorders)
* [cancelOrders](#cancelorders)
* [fetchLedger](#fetchledger)
* [fetchDepositAddress](#fetchdepositaddress)
* [fetchDeposits](#fetchdeposits)
* [fetchWithdrawals](#fetchwithdrawals)
* [withdraw](#withdraw)
* [setLeverage](#setleverage)
* [addMargin](#addmargin)
* [reduceMargin](#reducemargin)
* [fetchLeverageTiers](#fetchleveragetiers)
* [fetchMarketLeverageTiers](#fetchmarketleveragetiers)
* [fetchFundingRateHistory](#fetchfundingratehistory)
* [fetchFundingInterval](#fetchfundinginterval)
* [fetchFundingRate](#fetchfundingrate)
* [fetchFundingHistory](#fetchfundinghistory)
* [fetchPosition](#fetchposition)
* [fetchPositions](#fetchpositions)
* [transfer](#transfer)
* [setMarginMode](#setmarginmode)
* [editOrder](#editorder)
### fetchTime{docsify-ignore}
fetches the current integer timestamp in milliseconds from the xt server
**Kind**: instance method of [xt](#xt)
**Returns**: int - the current integer timestamp in milliseconds from the xt server
**See**: https://doc.xt.com/#market1serverInfo
| Param | Type | Description |
| --- | --- | --- |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchTime (params, [undefined])
```
### fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
**Kind**: instance method of [xt](#xt)
**Returns**: object - an associative dictionary of currencies
**See**: https://doc.xt.com/#deposit_withdrawalsupportedCurrenciesGet
| Param | Type | Description |
| --- | --- | --- |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchCurrencies (params, [undefined])
```
### fetchMarkets{docsify-ignore}
retrieves data on all markets for xt
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - an array of objects representing market data
**See**
- https://doc.xt.com/#market2symbol
- https://doc.xt.com/#futures_quotesgetSymbols
| Param | Type | Description |
| --- | --- | --- |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchMarkets (params, [undefined])
```
### 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 [xt](#xt)
**Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://doc.xt.com/#market4kline
- https://doc.xt.com/#futures_quotesgetKLine
| 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 | Yes | extra parameters specific to the xt api endpoint |
| params.until | int | No | timestamp in ms of the latest candle to fetch |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
xt.fetchOHLCV (symbol, timeframe[, since, limit, params])
```
### fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [xt](#xt)
**Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/en/latest/manual.html#order-book-structure) indexed by market symbols
**See**
- https://doc.xt.com/#market3depth
- https://doc.xt.com/#futures_quotesgetDepth
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | Yes | unified market symbol to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchOrderBook (symbol[, limit, 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 [xt](#xt)
**Returns**: object - a [ticker structure](https://docs.ccxt.com/en/latest/manual.html#ticker-structure)
**See**
- https://doc.xt.com/#market10ticker24h
- https://doc.xt.com/#futures_quotesgetAggTicker
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol to fetch the ticker for |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchTicker (symbol, params[])
```
### fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
**Kind**: instance method of [xt](#xt)
**Returns**: object - an array of [ticker structures](https://docs.ccxt.com/en/latest/manual.html#ticker-structure)
**See**
- https://doc.xt.com/#market10ticker24h
- https://doc.xt.com/#futures_quotesgetAggTickers
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | string | No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchTickers ([symbols, params])
```
### fetchBidsAsks{docsify-ignore}
fetches the bid and ask price and volume for multiple markets
**Kind**: instance method of [xt](#xt)
**Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/en/latest/manual.html#ticker-structure)
**See**: https://doc.xt.com/#market9tickerBook
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | string | No | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchBidsAsks ([symbols, params])
```
### fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/en/latest/manual.html?#public-trades)
**See**
- https://doc.xt.com/#market5tradeRecent
- https://doc.xt.com/#futures_quotesgetDeal
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | Yes | unified market symbol 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 | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchTrades (symbol[, since, limit, params])
```
### fetchMyTrades{docsify-ignore}
fetch all trades made by the user
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/en/latest/manual.html?#public-trades)
**See**
- https://doc.xt.com/#tradetradeGet
- https://doc.xt.com/#futures_ordergetTrades
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol 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 | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchMyTrades ([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 [xt](#xt)
**Returns**: object - a [balance structure](https://docs.ccxt.com/en/latest/manual.html?#balance-structure)
**See**
- https://doc.xt.com/#balancebalancesGet
- https://doc.xt.com/#futures_usergetBalances
| Param | Type | Description |
| --- | --- | --- |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchBalance (params, [undefined])
```
### createMarketBuyOrderWithCost{docsify-ignore}
create a market buy order by providing the symbol and cost
**Kind**: instance method of [xt](#xt)
**Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://doc.xt.com/#orderorderPost
| 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
xt.createMarketBuyOrderWithCost (symbol, cost[, params])
```
### createOrder{docsify-ignore}
create a trade order
**Kind**: instance method of [xt](#xt)
**Returns**: object - an [order structure](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderorderPost
- https://doc.xt.com/#futures_ordercreate
- https://doc.xt.com/#futures_entrustcreatePlan
- https://doc.xt.com/#futures_entrustcreateProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much you want to trade in units of the base currency |
| price | float | No | the price to fulfill the order, in units of the quote currency, can be ignored in market orders |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.timeInForce | string | No | 'GTC', 'IOC', 'FOK' or 'GTX' |
| params.entrustType | string | No | 'TAKE_PROFIT', 'STOP', 'TAKE_PROFIT_MARKET', 'STOP_MARKET', 'TRAILING_STOP_MARKET', required if stopPrice is defined, currently isn't functioning on xt's side |
| params.triggerPriceType | string | No | 'INDEX_PRICE', 'MARK_PRICE', 'LATEST_PRICE', required if stopPrice is defined |
| params.triggerPrice | float | No | price to trigger a stop order |
| params.stopPrice | float | No | alias for triggerPrice |
| params.stopLoss | float | No | price to set a stop-loss on an open position |
| params.takeProfit | float | No | price to set a take-profit on an open position |
```javascript
xt.createOrder (symbol, type, side, amount[, price, params])
```
### fetchOrder{docsify-ignore}
fetches information on an order made by the user
**Kind**: instance method of [xt](#xt)
**Returns**: object - An [order structure](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderorderGet
- https://doc.xt.com/#futures_ordergetById
- https://doc.xt.com/#futures_entrustgetPlanById
- https://doc.xt.com/#futures_entrustgetProfitById
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | order id |
| symbol | string | No | unified symbol of the market the order was made in |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.fetchOrder (id[, symbol, params])
```
### fetchOrders{docsify-ignore}
fetches information on multiple orders made by the user
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderhistoryOrderGet
- https://doc.xt.com/#futures_ordergetHistory
- https://doc.xt.com/#futures_entrustgetPlanHistory
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol of the market the orders were made in |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
```javascript
xt.fetchOrders ([symbol, since, limit, params])
```
### fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderopenOrderGet
- https://doc.xt.com/#futures_ordergetOrders
- https://doc.xt.com/#futures_entrustgetPlan
- https://doc.xt.com/#futures_entrustgetProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol of the market the orders were made in |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the maximum number of open order structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.fetchOpenOrders ([symbol, since, limit, params])
```
### fetchClosedOrders{docsify-ignore}
fetches information on multiple closed orders made by the user
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderhistoryOrderGet
- https://doc.xt.com/#futures_ordergetOrders
- https://doc.xt.com/#futures_entrustgetPlan
- https://doc.xt.com/#futures_entrustgetProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol of the market the orders were made in |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.fetchClosedOrders ([symbol, since, limit, params])
```
### fetchCanceledOrders{docsify-ignore}
fetches information on multiple canceled orders made by the user
**Kind**: instance method of [xt](#xt)
**Returns**: object - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderhistoryOrderGet
- https://doc.xt.com/#futures_ordergetOrders
- https://doc.xt.com/#futures_entrustgetPlan
- https://doc.xt.com/#futures_entrustgetProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol of the market the orders were made in |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.fetchCanceledOrders ([symbol, since, limit, params])
```
### cancelOrder{docsify-ignore}
cancels an open order
**Kind**: instance method of [xt](#xt)
**Returns**: object - An [order structure](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderorderDel
- https://doc.xt.com/#futures_ordercancel
- https://doc.xt.com/#futures_entrustcancelPlan
- https://doc.xt.com/#futures_entrustcancelProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | order id |
| symbol | string | No | unified symbol of the market the order was made in |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.cancelOrder (id[, symbol, params])
```
### cancelAllOrders{docsify-ignore}
cancel all open orders in a market
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**
- https://doc.xt.com/#orderopenOrderDel
- https://doc.xt.com/#futures_ordercancelBatch
- https://doc.xt.com/#futures_entrustcancelPlanBatch
- https://doc.xt.com/#futures_entrustcancelProfitBatch
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified market symbol of the market to cancel orders in |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.trigger | bool | No | if the order is a trigger order or not |
| params.stopLossTakeProfit | bool | No | if the order is a stop-loss or take-profit order |
```javascript
xt.cancelAllOrders ([symbol, params])
```
### cancelOrders{docsify-ignore}
cancel multiple orders
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/en/latest/manual.html#order-structure)
**See**: https://doc.xt.com/#orderbatchOrderDel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| ids | Array<string> | Yes | order ids |
| symbol | string | No | unified market symbol of the market to cancel orders in |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.cancelOrders (ids[, symbol, params])
```
### fetchLedger{docsify-ignore}
fetch the history of changes, actions done by the user or operations that altered the balance of the user
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [ledger structure](https://docs.ccxt.com/en/latest/manual.html#ledger-structure)
**See**: https://doc.xt.com/#futures_usergetBalanceBill
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string | No | unified currency code |
| since | int | No | timestamp in ms of the earliest ledger entry |
| limit | int | No | max number of ledger entries to return |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchLedger ([code, since, limit, params])
```
### fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
**Kind**: instance method of [xt](#xt)
**Returns**: object - an [address structure](https://docs.ccxt.com/en/latest/manual.html#address-structure)
**See**: https://doc.xt.com/#deposit_withdrawaldepositAddressGet
| Param | Type | Description |
| --- | --- | --- |
| code | string | unified currency code |
| params | object | extra parameters specific to the xt api endpoint |
| params.network | string | required network id |
```javascript
xt.fetchDepositAddress (code, params[])
```
### fetchDeposits{docsify-ignore}
fetch all deposits made to an account
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/en/latest/manual.html#transaction-structure)
**See**: https://doc.xt.com/#deposit_withdrawalhistoryDepositGet
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string | No | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of transaction structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchDeposits ([code, since, limit, params])
```
### fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/en/latest/manual.html#transaction-structure)
**See**: https://doc.xt.com/#deposit_withdrawalwithdrawHistory
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string | No | unified currency code |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of transaction structures to retrieve |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchWithdrawals ([code, since, limit, params])
```
### withdraw{docsify-ignore}
make a withdrawal
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [transaction structure](https://docs.ccxt.com/en/latest/manual.html#transaction-structure)
**See**: https://doc.xt.com/#deposit_withdrawalwithdraw
| 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 | No | |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.withdraw (code, amount, address[, tag, params])
```
### setLeverage{docsify-ignore}
set the level of leverage for a market
**Kind**: instance method of [xt](#xt)
**Returns**: object - response from the exchange
**See**: https://doc.xt.com/#futures_useradjustLeverage
| Param | Type | Description |
| --- | --- | --- |
| leverage | float | the rate of leverage |
| symbol | string | unified market symbol |
| params | object | extra parameters specific to the xt api endpoint |
| params.positionSide | string | 'LONG' or 'SHORT' |
```javascript
xt.setLeverage (leverage, symbol, params[])
```
### addMargin{docsify-ignore}
add margin to a position
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [margin structure](https://docs.ccxt.com/#/?id=add-margin-structure)
**See**: https://doc.xt.com/#futures_useradjustMargin
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol |
| amount | float | amount of margin to add |
| params | object | extra parameters specific to the xt api endpoint |
| params.positionSide | string | 'LONG' or 'SHORT' |
```javascript
xt.addMargin (symbol, amount, params[])
```
### reduceMargin{docsify-ignore}
remove margin from a position
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [margin structure](https://docs.ccxt.com/#/?id=reduce-margin-structure)
**See**: https://doc.xt.com/#futures_useradjustMargin
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol |
| amount | float | the amount of margin to remove |
| params | object | extra parameters specific to the xt api endpoint |
| params.positionSide | string | 'LONG' or 'SHORT' |
```javascript
xt.reduceMargin (symbol, amount, params[])
```
### fetchLeverageTiers{docsify-ignore}
retrieve information on the maximum leverage for different trade sizes
**Kind**: instance method of [xt](#xt)
**Returns**: object - a dictionary of [leverage tiers structures](https://docs.ccxt.com/#/?id=leverage-tiers-structure)
**See**: https://doc.xt.com/#futures_quotesgetLeverageBrackets
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | string | No | a list of unified market symbols |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchLeverageTiers ([symbols, params])
```
### fetchMarketLeverageTiers{docsify-ignore}
retrieve information on the maximum leverage for different trade sizes of a single market
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [leverage tiers structure](https://docs.ccxt.com/#/?id=leverage-tiers-structure)
**See**: https://doc.xt.com/#futures_quotesgetLeverageBracket
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchMarketLeverageTiers (symbol, params[])
```
### fetchFundingRateHistory{docsify-ignore}
fetches historical funding rates
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [funding rate structures](https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure)
**See**: https://doc.xt.com/#futures_quotesgetFundingRateRecord
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | No | unified symbol of the market to fetch the funding rate history for |
| since | int | No | timestamp in ms of the earliest funding rate to fetch |
| limit | int | No | the maximum amount of [funding rate structures] to fetch |
| params | object | Yes | extra parameters specific to the xt api endpoint |
| params.paginate | bool | Yes | true/false whether to use the pagination helper to aumatically paginate through the results |
```javascript
xt.fetchFundingRateHistory ([symbol, since, limit, params])
```
### fetchFundingInterval{docsify-ignore}
fetch the current funding rate interval
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
**See**: https://doc.xt.com/#futures_quotesgetFundingRate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
```javascript
xt.fetchFundingInterval (symbol[, params])
```
### fetchFundingRate{docsify-ignore}
fetch the current funding rate
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
**See**: https://doc.xt.com/#futures_quotesgetFundingRate
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchFundingRate (symbol, params[])
```
### fetchFundingHistory{docsify-ignore}
fetch the funding history
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [funding history structures](https://docs.ccxt.com/#/?id=funding-history-structure)
**See**: https://doc.xt.com/#futures_usergetFunding
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string | Yes | unified market symbol |
| since | int | No | the starting timestamp in milliseconds |
| limit | int | No | the number of entries to return |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchFundingHistory (symbol[, since, limit, params])
```
### fetchPosition{docsify-ignore}
fetch data on a single open contract trade position
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://doc.xt.com/#futures_usergetPosition
| Param | Type | Description |
| --- | --- | --- |
| symbol | string | unified market symbol of the market the position is held in |
| params | object | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchPosition (symbol, params[])
```
### fetchPositions{docsify-ignore}
fetch all open positions
**Kind**: instance method of [xt](#xt)
**Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://doc.xt.com/#futures_usergetPosition
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | string | No | list of unified market symbols, not supported with xt |
| params | object | Yes | extra parameters specific to the xt api endpoint |
```javascript
xt.fetchPositions ([symbols, params])
```
### transfer{docsify-ignore}
transfer currency internally between wallets on the same account
**Kind**: instance method of [xt](#xt)
**Returns**: object - a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://doc.xt.com/#transfersubTransferPost
| Param | Type | Description |
| --- | --- | --- |
| code | string | unified currency code |
| amount | float | amount to transfer |
| fromAccount | string | account to transfer from - spot, swap, leverage, finance |
| toAccount | string | account to transfer to - spot, swap, leverage, finance |
| params | object | extra parameters specific to the whitebit api endpoint |
```javascript
xt.transfer (code, amount, fromAccount, toAccount, params[])
```
### setMarginMode{docsify-ignore}
set margin mode to 'cross' or 'isolated'
**Kind**: instance method of [xt](#xt)
**Returns**: object - response from the exchange
**See**: https://doc.xt.com/#futures_userchangePositionType
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | No | required |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.positionSide | string | No | *required* "long" or "short" |
```javascript
xt.setMarginMode (marginMode[, symbol, params])
```
### editOrder{docsify-ignore}
cancels an order and places a new order
**Kind**: instance method of [xt](#xt)
**Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://doc.xt.com/#orderorderUpdate
- https://doc.xt.com/#futures_orderupdate
- https://doc.xt.com/#futures_entrustupdateProfit
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of the currency you want to trade in units of the 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.stopLoss | float | No | price to set a stop-loss on an open position |
| params.takeProfit | float | No | price to set a take-profit on an open position |
```javascript
xt.editOrder (id, symbol, type, side, amount[, price, params])
```