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