## weex{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchStatus](#fetchstatus) * [fetchTime](#fetchtime) * [fetchCurrencies](#fetchcurrencies) * [fetchMarkets](#fetchmarkets) * [fetchTickers](#fetchtickers) * [fetchBidsAsks](#fetchbidsasks) * [fetchOrderBook](#fetchorderbook) * [fetchOHLCV](#fetchohlcv) * [fetchTrades](#fetchtrades) * [fetchOpenInterest](#fetchopeninterest) * [fetchFundingRates](#fetchfundingrates) * [fetchFundingRateHistory](#fetchfundingratehistory) * [fetchBalance](#fetchbalance) * [fetchTransfers](#fetchtransfers) * [createOrder](#createorder) * [createSpotOrder](#createspotorder) * [createContractOrder](#createcontractorder) * [cancelOrder](#cancelorder) * [cancelAllOrders](#cancelallorders) * [cancelOrders](#cancelorders) * [fetchOrder](#fetchorder) * [fetchOpenOrders](#fetchopenorders) * [fetchClosedOrders](#fetchclosedorders) * [fetchCanceledOrders](#fetchcanceledorders) * [fetchOrders](#fetchorders) * [fetchCanceledAndClosedOrders](#fetchcanceledandclosedorders) * [fetchOrderTrades](#fetchordertrades) * [fetchMyTrades](#fetchmytrades) * [fetchLedger](#fetchledger) * [fetchPositions](#fetchpositions) * [fetchPosition](#fetchposition) * [fetchPositionsForSymbol](#fetchpositionsforsymbol) * [closeAllPositions](#closeallpositions) * [closePosition](#closeposition) * [fetchTradingFee](#fetchtradingfee) * [fetchMarginMode](#fetchmarginmode) * [fetchMarginModes](#fetchmarginmodes) * [setMarginMode](#setmarginmode) * [fetchLeverage](#fetchleverage) * [fetchLeverages](#fetchleverages) * [setLeverage](#setleverage) * [fetchPositionMode](#fetchpositionmode) * [setPositionMode](#setpositionmode) * [reduceMargin](#reducemargin) * [addMargin](#addmargin) * [watchTicker](#watchticker) * [watchTickers](#watchtickers) * [unWatchTicker](#unwatchticker) * [unWatchTickers](#unwatchtickers) * [watchTrades](#watchtrades) * [watchTradesForSymbols](#watchtradesforsymbols) * [unWatchTrades](#unwatchtrades) * [unWatchTradesForSymbols](#unwatchtradesforsymbols) * [watchOHLCV](#watchohlcv) * [watchOHLCVForSymbols](#watchohlcvforsymbols) * [unWatchOHLCV](#unwatchohlcv) * [unWatchOHLCVForSymbols](#unwatchohlcvforsymbols) * [watchOrderBook](#watchorderbook) * [watchOrderBookForSymbols](#watchorderbookforsymbols) * [unWatchOrderBook](#unwatchorderbook) * [unWatchOrderBookForSymbols](#unwatchorderbookforsymbols) * [watchBidsAsks](#watchbidsasks) * [unWatchBidsAsks](#unwatchbidsasks) * [watchMyTrades](#watchmytrades) * [unWatchMyTrades](#unwatchmytrades) * [watchOrders](#watchorders) * [unWatchOrders](#unwatchorders) * [watchBalance](#watchbalance) * [watchPositions](#watchpositions) * [unWatchPositions](#unwatchpositions) ### fetchStatus{docsify-ignore} the latest known information on the availability of the exchange API **Kind**: instance method of [weex](#weex) **Returns**: object - a [status structure](https://docs.ccxt.com/?id=exchange-status-structure) **See**: https://www.weex.com/api-doc/spot/ConfigAPI/Ping | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchStatus (params?) ``` ### fetchTime{docsify-ignore} fetches the current integer timestamp in milliseconds from the exchange server **Kind**: instance method of [weex](#weex) **Returns**: int - the current integer timestamp in milliseconds from the exchange server **See** - https://www.weex.com/api-doc/spot/ConfigAPI/GetServerTime - https://www.weex.com/api-doc/contract/Market_API/GetServerTime | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', default is 'spot' | ```javascript weex.fetchTime (params?) ``` ### fetchCurrencies{docsify-ignore} fetches all available currencies on an exchange **Kind**: instance method of [weex](#weex) **Returns**: object - an associative dictionary of currencies **See**: https://www.weex.com/api-doc/spot/ConfigAPI/CurrencyInfo | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchCurrencies (params?) ``` ### fetchMarkets{docsify-ignore} retrieves data on all markets for exchagne **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - an array of objects representing market data **See** - https://www.weex.com/api-doc/spot/ConfigAPI/GetProductInfo // spot - https://www.weex.com/api-doc/contract/Market_API/GetContractInfo // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchMarkets (params?) ``` ### fetchTickers{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 [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/MarketDataAPI/GetAllTickerInfo // spot - https://www.weex.com/api-doc/contract/Market_API/GetTicker24h // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | string | Yes | unified symbol of the market to fetch the ticker for | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', default is 'spot' (used if symbols are not provided) | ```javascript weex.fetchTickers (symbols, params?) ``` ### fetchBidsAsks{docsify-ignore} fetches the bid and ask price and volume for multiple markets **Kind**: instance method of [weex](#weex) **Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/MarketDataAPI/GetBookTicker // spot - https://www.weex.com/api-doc/contract/Market_API/GetBookTicker // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', default is 'spot' (used if symbols are not provided) | ```javascript weex.fetchBidsAsks (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 [weex](#weex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/?id=order-book-structure) indexed by market symbols **See** - https://www.weex.com/api-doc/spot/MarketDataAPI/GetDepthData // spot - https://www.weex.com/api-doc/contract/Market_API/GetDepthData // contract | 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 (default 15, max 200) | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchOrderBook (symbol, 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 [weex](#weex) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See** - https://www.weex.com/api-doc/spot/MarketDataAPI/GetKLineData // spot - https://www.weex.com/api-doc/contract/Market_API/GetKlines // contract last price - https://www.weex.com/api-doc/contract/Market_API/GetIndexPriceKlines // contract index price - https://www.weex.com/api-doc/contract/Market_API/GetMarkPriceKlines // contract mark price - https://www.weex.com/api-doc/contract/Market_API/GetHistoryKlines // contract historical klines | 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 (default 100, max 300) | | params | object | No | extra parameters specific to the exchange API endpoint Check fetchSpotOHLCV() and fetchContractOHLCV() for more details on the extra parameters that can be used in params | ```javascript weex.fetchOHLCV (symbol, timeframe, since?, limit?, params?) ``` ### fetchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [weex](#weex) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/?id=public-trades) **See** - https://www.weex.com/api-doc/spot/MarketDataAPI/GetTradeData // spot - https://www.weex.com/api-doc/contract/Market_API/GetRecentTrades // contract | 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 (default 100, max 1000) | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchTrades (symbol, since?, limit?, params?) ``` ### fetchOpenInterest{docsify-ignore} retrieves the open interest of a contract trading pair **Kind**: instance method of [weex](#weex) **Returns**: object - an open interest structure[https://docs.ccxt.com/?id=open-interest-structure](https://docs.ccxt.com/?id=open-interest-structure) **See**: https://www.weex.com/api-doc/contract/Market_API/GetOpenInterest | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified CCXT market symbol | | params | object | No | exchange specific parameters | ```javascript weex.fetchOpenInterest (symbol, params?) ``` ### fetchFundingRates{docsify-ignore} fetch the funding rate for multiple markets **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [funding rate structures](https://docs.ccxt.com/?id=funding-rates-structure), indexed by market symbols **See**: https://www.weex.com/api-doc/contract/Market_API/GetCurrentFundingRate | 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 | | params.subType | string | No | "linear" or "inverse" | ```javascript weex.fetchFundingRates (symbols, params?) ``` ### fetchFundingRateHistory{docsify-ignore} fetches historical funding rate prices **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [funding rate structures](https://docs.ccxt.com/?id=funding-rate-history-structure) **See**: https://www.weex.com/api-doc/contract/Market_API/GetFundingRateHistory | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | 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 records to fetch (default 100, max 1000) | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | timestamp in ms of the latest funding rate | ```javascript weex.fetchFundingRateHistory (symbol, since?, limit?, params?) ``` ### fetchBalance{docsify-ignore} query for balance and get the amount of funds available for trading or funds locked in positions **Kind**: instance method of [weex](#weex) **Returns**: object - a [balance structure](https://docs.ccxt.com/?id=balance-structure) **See** - https://www.weex.com/api-doc/spot/AccountAPI/GetAccountBalance // spot - https://www.weex.com/api-doc/contract/Account_API/GetAccountBalance // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap' (default is 'spot') | ```javascript weex.fetchBalance (params?) ``` ### fetchTransfers{docsify-ignore} fetch a history of internal transfers made on an account **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [transfer structures](https://docs.ccxt.com/?id=transfer-structure) **See**: https://www.weex.com/api-doc/spot/AccountAPI/TransferRecords | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | No | 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 transfers structures to retrieve (default 10, max 100) | | params | object | No | extra parameters specific to the exchange API endpoint | | 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 weex.fetchTransfers (code?, since?, limit?, params?) ``` ### createOrder{docsify-ignore} Create an order on the exchange **Kind**: instance method of [weex](#weex) **Returns**: object - an [order structure](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/PlaceOrder // spot - https://www.weex.com/api-doc/contract/Transaction_API/PlaceOrder // contract - https://www.weex.com/api-doc/contract/Transaction_API/PlacePendingOrder // contract trigger - https://www.weex.com/api-doc/contract/Transaction_API/PlaceTpSlOrder // contract take profit / stop loss | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | type | string | Yes | 'limit' or 'market' | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | the amount of currency to trade | | 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 Check createSpotOrder() and createContractOrder() for more details on the extra parameters that can be used in params | ```javascript weex.createOrder (symbol, type, side, amount, price?, params?) ``` ### createSpotOrder{docsify-ignore} helper method for creating spot orders **Kind**: instance method of [weex](#weex) **Returns**: object - an [order structure](https://docs.ccxt.com/?id=order-structure) **See**: https://www.weex.com/api-doc/spot/orderApi/PlaceOrder | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | type | string | Yes | 'limit' or 'market' | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | the amount of currency to trade | | 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.clientOrderId | string | No | client order id | | params.timeInForce | string | No | 'GTC', 'IOC', or 'FOK' | ```javascript weex.createSpotOrder (symbol, type, side, amount, price?, params?) ``` ### createContractOrder{docsify-ignore} helper method for creating contract orders **Kind**: instance method of [weex](#weex) **Returns**: object - an [order structure](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/contract/Transaction_API/PlaceOrder - https://www.weex.com/api-doc/contract/Transaction_API/PlacePendingOrder | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | type | string | Yes | 'limit' or 'market' | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | the amount of currency to trade | | 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.clientOrderId | string | No | client order id | | params.takeProfit | object | No | *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType | | params.takeProfit.triggerPrice | float | No | The price at which the take profit order will be triggered | | params.takeProfit.triggerPriceType | string | No | The type of the trigger price for the take profit order, either 'last' or 'mark' (default is 'last') | | params.stopLoss | object | No | *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType | | params.stopLoss.triggerPrice | float | No | The price at which the stop loss order will be triggered | | params.stopLoss.triggerPriceType | string | No | The type of the trigger price for the stop loss order, either 'last' or 'mark' (default is 'last') | | params.stopLossPrice | float | No | price to trigger stop-loss orders | | params.stopLossPriceType | string | No | The type of the trigger price for the stop loss order, either 'last' or 'mark' (default is 'last') | | params.takeProfitPrice | float | No | price to trigger take-profit orders | | params.takeProfitPriceType | string | No | The type of the trigger price for the take profit order, either 'last' or 'mark' (default is 'last') | | params.reduceOnly | bool | No | A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. | | params.timeInForce | string | No | GTC, IOC, or FOK (default is GTC for limit orders) | ```javascript weex.createContractOrder (symbol, type, side, amount, price?, params?) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [weex](#weex) **Returns**: object - an [order structure](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/CancelOrder // spot - https://www.weex.com/api-doc/contract/Transaction_API/CancelOrder // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | order id | | symbol | string | No | unified symbol of the market the order was made in | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap' (default is 'spot') | | params.trigger | boolean | No | *contract orders only* whether the order to cancel is a trigger order | | params.clientOrderId | string | No | *non-trigger orders only* a unique id for the order | ```javascript weex.cancelOrder (id, symbol?, params?) ``` ### cancelAllOrders{docsify-ignore} cancel all open orders **Kind**: instance method of [weex](#weex) **Returns**: Response from the exchange **See** - https://www.weex.com/api-doc/spot/orderApi/Cancel-Symbol-Orders // spot - https://www.weex.com/api-doc/contract/Transaction_API/CancelAllOrders // contract - https://www.weex.com/api-doc/contract/Transaction_API/CancelAllPendingOrders // contract trigger | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | | params.trigger | boolean | No | *swap only* true for cancelling trigger orders (default is false) | ```javascript weex.cancelAllOrders (symbol, params?) ``` ### cancelOrders{docsify-ignore} cancel multiple orders **Kind**: instance method of [weex](#weex) **Returns**: object - an list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/BulkCancel // spot - https://www.weex.com/api-doc/contract/Transaction_API/CancelOrdersBatch // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | ids | Array<string> | Yes | order ids | | symbol | string | No | unified market symbol, default is undefined | | params | object | No | extra parameters specific to the exchange API endpoint | | params.clientOrderIds | Array<string> | No | client order ids (could be an alternative to ids) | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | ```javascript weex.cancelOrders (ids, symbol?, params?) ``` ### fetchOrder{docsify-ignore} fetches information on an order made by the user **Kind**: instance method of [weex](#weex) **Returns**: object - An [order structure](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/OrderDetails // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetSingleOrderInfo // contract | 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.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | | params.clientOrderId | string | No | *spot only* a unique id for the order, used if id is not provided | ```javascript weex.fetchOrder (id, symbol, params?) ``` ### fetchOpenOrders{docsify-ignore} fetch all unfilled currently open orders **Kind**: instance method of [weex](#weex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/UnfinishedOrders // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetCurrentOrderStatus // contract - https://www.weex.com/api-doc/contract/Transaction_API/GetCurrentPendingOrders // contract trigger | 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 orders structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | | params.trigger | boolean | No | *swap only* whether to fetch trigger orders (default is false) | ```javascript weex.fetchOpenOrders (symbol, since?, limit?, params?) ``` ### fetchClosedOrders{docsify-ignore} fetches information on multiple closed orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/HistoryOrders // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetOrderHistory // contract | 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 | the latest time in ms to fetch orders for | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | ```javascript weex.fetchClosedOrders (symbol, since?, limit?, params?) ``` ### fetchCanceledOrders{docsify-ignore} fetches information on multiple canceled orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/HistoryOrders // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetOrderHistory // contract | 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 | the latest time in ms to fetch orders for | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | ```javascript weex.fetchCanceledOrders (symbol, since?, limit?, params?) ``` ### fetchOrders{docsify-ignore} fetches information on multiple spot orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See**: https://www.weex.com/api-doc/spot/orderApi/HistoryOrders // spot | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol of the market orders were made in (required for spot orders) | | 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 | object | No | end time, ms | | 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 weex.fetchOrders (symbol, since?, limit?, params?) ``` ### fetchCanceledAndClosedOrders{docsify-ignore} fetches information on multiple closed and canceled orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See**: https://www.weex.com/api-doc/contract/Transaction_API/GetOrderHistory // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | No | unified market symbol of the market orders were made in (required for spot orders) | | 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 | object | No | end time, ms | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | | 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 weex.fetchCanceledAndClosedOrders (symbol?, since?, limit?, params?) ``` ### fetchOrderTrades{docsify-ignore} fetch all the trades made from a single order **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=trade-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/TransactionDetails // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetTradeDetails // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | order id | | symbol | string | No | 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 weex.fetchOrderTrades (id, symbol?, since?, limit?, params?) ``` ### fetchMyTrades{docsify-ignore} fetch all trades made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/?id=trade-structure) **See** - https://www.weex.com/api-doc/spot/orderApi/TransactionDetails // spot - https://www.weex.com/api-doc/contract/Transaction_API/GetTradeDetails // contract | 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.paginate | boolean | No | 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) | | params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') | ```javascript weex.fetchMyTrades (symbol, since?, limit?, 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 [weex](#weex) **Returns**: object - a [ledger structure](https://docs.ccxt.com/?id=ledger-entry-structure) **See** - https://www.weex.com/api-doc/spot/AccountAPI/GetBillRecords // spot - https://www.weex.com/api-doc/spot/AccountAPI/GetFundBillRecords // funding - https://www.weex.com/api-doc/contract/Account_API/GetContractBills // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | No | unified currency code, default is undefined | | since | int | No | timestamp in ms of the earliest ledger entry, default is undefined | | limit | int | No | max number of ledger entries to return, default is undefined, max is 100 | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | timestamp in ms of the latest ledger entry | | params.type | string | No | 'spot', 'funding' or 'swap' (default is 'spot') | | 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 weex.fetchLedger (code?, since?, limit?, params?) ``` ### fetchPositions{docsify-ignore} fetch all open positions **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/?id=position-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetAllPositions | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | No | list of unified market symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchPositions (symbols?, params?) ``` ### fetchPosition{docsify-ignore} fetch data on an open position **Kind**: instance method of [weex](#weex) **Returns**: object - a [position structure](https://docs.ccxt.com/?id=position-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSinglePosition | 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 weex.fetchPosition (symbol, params?) ``` ### fetchPositionsForSymbol{docsify-ignore} fetch all open positions for specific symbol **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/?id=position-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSinglePosition | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchPositionsForSymbol (symbol, params?) ``` ### closeAllPositions{docsify-ignore} closes all open positions for a market type **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - A list of [position structures](https://docs.ccxt.com/?id=position-structure) **See**: https://www.weex.com/api-doc/contract/Transaction_API/ClosePositions | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.closeAllPositions (params?) ``` ### closePosition{docsify-ignore} closes open positions for a market **Kind**: instance method of [weex](#weex) **Returns**: object - an [order structure](https://docs.ccxt.com/?id=order-structure) **See**: https://www.weex.com/api-doc/contract/Transaction_API/ClosePositions | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | side | string | No | not used by current exchange | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.closePosition (symbol, side?, params?) ``` ### fetchTradingFee{docsify-ignore} fetch the trading fees for a contract market **Kind**: instance method of [weex](#weex) **Returns**: object - a [fee structure](https://docs.ccxt.com/?id=fee-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetCommissionRate // contract | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchTradingFee (symbol, params?) ``` ### fetchMarginMode{docsify-ignore} fetches the margin mode of a specific symbol **Kind**: instance method of [weex](#weex) **Returns**: object - a [margin mode structure](https://docs.ccxt.com/?id=margin-mode-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market the order was made in | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchMarginMode (symbol, params?) ``` ### fetchMarginModes{docsify-ignore} fetches margin modes the symbols, with symbols=undefined all markets are returned **Kind**: instance method of [weex](#weex) **Returns**: object - a list of [margin mode structures](https://docs.ccxt.com/?id=margin-mode-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified market symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchMarginModes (symbols, params?) ``` ### setMarginMode{docsify-ignore} set margin mode to 'cross' or 'isolated' **Kind**: instance method of [weex](#weex) **Returns**: object - response from the exchange **See**: https://www.weex.com/api-doc/contract/Account_API/ChangeMarginModeTRADE | Param | Type | Required | Description | | --- | --- | --- | --- | | marginMode | string | Yes | 'cross' or 'isolated' | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.setMarginMode (marginMode, symbol, params?) ``` ### fetchLeverage{docsify-ignore} fetch the set leverage for a market **Kind**: instance method of [weex](#weex) **Returns**: object - a [leverage structure](https://docs.ccxt.com/?id=leverage-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchLeverage (symbol, params?) ``` ### fetchLeverages{docsify-ignore} fetch the set leverage for all markets **Kind**: instance method of [weex](#weex) **Returns**: object - a list of [leverage structures](https://docs.ccxt.com/?id=leverage-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | No | a list of unified market symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchLeverages (symbols?, params?) ``` ### setLeverage{docsify-ignore} set the level of leverage for a market **Kind**: instance method of [weex](#weex) **Returns**: object - response from the exchange **See**: https://www.weex.com/api-doc/contract/Account_API/UpdateLeverageTRADE | 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 | 'cross' or 'isolated' (default is 'cross' if specific leverage parameters are not provided) | | params.crossLeverage | number | No | *cross margin mode only* leverage for cross margin mode when marginMode is 'cross' | | params.isolatedLongLeverage | number | No | *isolated margin mode only* leverage for long positions when marginMode is 'isolated' | | params.isolatedShortLeverage | number | No | *isolated margin mode only* leverage for short positions when marginMode is 'isolated' If specific leverage parameters are not provided the leverage value will be applied to both long and short positions if marginMode is 'isolated' or to cross margin mode if marginMode is 'cross' If marginMode is not provided and specific leverage parameters are not provided too the leverage value will be applied to cross leverage | ```javascript weex.setLeverage (leverage, symbol, params?) ``` ### fetchPositionMode{docsify-ignore} fetchs the position mode, hedged or one way **Kind**: instance method of [weex](#weex) **Returns**: object - an object detailing whether the market is in hedged or one-way mode **See**: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch the order book for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.fetchPositionMode (symbol, params?) ``` ### setPositionMode{docsify-ignore} set hedged to true or false for a market **Kind**: instance method of [weex](#weex) **Returns**: object - response from the exchange **See**: https://www.weex.com/api-doc/contract/Account_API/ChangeMarginModeTRADE | Param | Type | Required | Description | | --- | --- | --- | --- | | hedged | bool | Yes | set to true to use dualSidePosition | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | | params.marginMode | string | Yes | 'cross' or 'isolated' (default is 'cross') | ```javascript weex.setPositionMode (hedged, symbol, params?) ``` ### reduceMargin{docsify-ignore} remove margin from a position **Kind**: instance method of [weex](#weex) **Returns**: object - a [margin structure](https://docs.ccxt.com/?id=margin-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/AdjustPositionMarginTRADE | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | amount | float | Yes | the amount of margin to remove | | params | object | No | extra parameters specific to the exchange API endpoint | | params.positionId | string | Yes | the id of the position to reduce margin from, required | ```javascript weex.reduceMargin (symbol, amount, params?) ``` ### addMargin{docsify-ignore} add margin **Kind**: instance method of [weex](#weex) **Returns**: object - a [margin structure](https://docs.ccxt.com/?id=margin-structure) **See**: https://www.weex.com/api-doc/contract/Account_API/AdjustPositionMarginTRADE | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | amount | float | Yes | amount of margin to add | | params | object | No | extra parameters specific to the exchange API endpoint | | params.positionId | string | Yes | the id of the position to add margin to, required | ```javascript weex.addMargin (symbol, amount, 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 [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Tickers-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Tickers-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 | | params.name | string | No | stream to use can be ticker or miniTicker | ```javascript weex.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 [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Tickers-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Tickers-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 weex.watchTickers (symbols, params?) ``` ### unWatchTicker{docsify-ignore} unWatches 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 [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Tickers-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Tickers-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 weex.unWatchTicker (symbol, params?) ``` ### unWatchTickers{docsify-ignore} unWatches 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 [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Tickers-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Tickers-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 weex.unWatchTickers (symbols, params?) ``` ### watchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=public-trades) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Trades-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Trades-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 weex.watchTrades (symbol, since?, limit?, params?) ``` ### watchTradesForSymbols{docsify-ignore} get the list of most recent trades for a list of symbols **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=public-trades) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Trades-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Trades-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 weex.watchTradesForSymbols (symbols, since?, limit?, params?) ``` ### unWatchTrades{docsify-ignore} unsubscribes from the trades channel **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=public-trades) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Trades-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Trades-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch trades for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchTrades (symbol, params?) ``` ### unWatchTradesForSymbols{docsify-ignore} unsubscribes from the trades channel **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=public-trades) **See** - https://www.weex.com/api-doc/spot/Websocket/public/Trades-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Trades-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified symbol of the market to fetch trades for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchTradesForSymbols (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 [weex](#weex) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See** - https://www.weex.com/api-doc/spot/Websocket/public/Candlesticks-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Candlesticks-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 weex.watchOHLCV (symbol, timeframe, since?, limit?, params?) ``` ### watchOHLCVForSymbols{docsify-ignore} watches historical candlestick data containing the open, high, low, and close price, and the volume of a market **Kind**: instance method of [weex](#weex) **Returns**: object - A list of candles ordered as timestamp, open, high, low, close, volume **See** - https://www.weex.com/api-doc/spot/Websocket/public/Candlesticks-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Candlesticks-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbolsAndTimeframes | Array<Array<string>> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] | | 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 weex.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?) ``` ### unWatchOHLCV{docsify-ignore} unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market **Kind**: instance method of [weex](#weex) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See** - https://www.weex.com/api-doc/spot/Websocket/public/Candlesticks-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Candlesticks-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 | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchOHLCV (symbol, timeframe, params?) ``` ### unWatchOHLCVForSymbols{docsify-ignore} unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market **Kind**: instance method of [weex](#weex) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See** - https://www.weex.com/api-doc/spot/Websocket/public/Candlesticks-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Candlesticks-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbolsAndTimeframes | Array<Array<string>> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?) ``` ### watchOrderBook{docsify-ignore} watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [weex](#weex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/?id=order-book-structure) indexed by market symbols **See** - https://www.weex.com/api-doc/spot/Websocket/public/Depth-Channel - https://www.weex.com/api-doc/contract/Websocket/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 weex.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 [weex](#weex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/?id=order-book-structure) indexed by market symbols **See** - https://www.weex.com/api-doc/spot/Websocket/public/Depth-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Depth-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 | ```javascript weex.watchOrderBookForSymbols (symbols, limit?, params?) ``` ### unWatchOrderBook{docsify-ignore} unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [weex](#weex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/?id=order-book-structure) indexed by market symbols **See** - https://www.weex.com/api-doc/spot/Websocket/public/Depth-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Depth-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified array of symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchOrderBook (symbol, params?) ``` ### unWatchOrderBookForSymbols{docsify-ignore} unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [weex](#weex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/?id=order-book-structure) indexed by market symbols **See** - https://www.weex.com/api-doc/spot/Websocket/public/Depth-Channel - https://www.weex.com/api-doc/contract/Websocket/public/Depth-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified array of symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchOrderBookForSymbols (symbols, params?) ``` ### watchBidsAsks{docsify-ignore} watches best bid & ask for spot symbols **Kind**: instance method of [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See**: https://www.weex.com/api-doc/spot/Websocket/public/BookTicker-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 weex.watchBidsAsks (symbols, params?) ``` ### unWatchBidsAsks{docsify-ignore} unWatches best bid & ask for spot symbols **Kind**: instance method of [weex](#weex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/?id=ticker-structure) **See**: https://www.weex.com/api-doc/spot/Websocket/public/BookTicker-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 weex.unWatchBidsAsks (symbols, params?) ``` ### watchMyTrades{docsify-ignore} watches information on multiple trades made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/?id=trade-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/private/Fill-Channel - https://www.weex.com/api-doc/contract/Websocket/private/Fill-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol of the market trades were made in | | since | int | No | the earliest time in ms to fetch trades for | | limit | int | No | the maximum number of trade structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | spot or swap, default is spot if symbol is not provided | ```javascript weex.watchMyTrades (symbol, since?, limit?, params?) ``` ### unWatchMyTrades{docsify-ignore} unWatches information on multiple trades made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/private/Fill-Channel - https://www.weex.com/api-doc/contract/Websocket/private/Fill-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | No | not used by the exchange | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | spot or swap, default is spot | ```javascript weex.unWatchMyTrades (symbol?, params?) ``` ### watchOrders{docsify-ignore} watches information on multiple orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/private/Order-Channel - https://www.weex.com/api-doc/contract/Websocket/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 | | params.type | string | No | spot or swap, default is spot if symbol is not provided | ```javascript weex.watchOrders (symbol, since?, limit?, params?) ``` ### unWatchOrders{docsify-ignore} unWatches information on multiple orders made by the user **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/?id=order-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/private/Order-Channel - https://www.weex.com/api-doc/contract/Websocket/private/Order-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | No | not used by the exchange | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchOrders (symbol?, params?) ``` ### watchBalance{docsify-ignore} query for balance and get the amount of funds available for trading or funds locked in orders **Kind**: instance method of [weex](#weex) **Returns**: object - a [balance structure](https://docs.ccxt.com/?id=balance-structure) **See** - https://www.weex.com/api-doc/spot/Websocket/private/Account-Channel - https://www.weex.com/api-doc/contract/Websocket/private/Account-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.type | string | No | 'spot' or 'swap', default is 'spot' | ```javascript weex.watchBalance (params?) ``` ### watchPositions{docsify-ignore} watch all open positions **Kind**: instance method of [weex](#weex) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure) **See**: https://www.weex.com/api-doc/contract/Websocket/private/Positions-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string>, undefined | Yes | list of unified market symbols | | since | int | No | the earliest time in ms to fetch positions for | | limit | int | No | the maximum number of position structures to retrieve | | params | object | Yes | extra parameters specific to the exchange API endpoint | | params.accountNumber | int | No | account number to query orders for, required | ```javascript weex.watchPositions (symbols, since?, limit?, params) ``` ### unWatchPositions{docsify-ignore} unWatches all open positions **Kind**: instance method of [weex](#weex) **Returns**: object - status of the unwatch request **See**: https://www.weex.com/api-doc/contract/Websocket/private/Positions-Channel | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | No | not used by the exchange, unsubscription from positions is global for all symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript weex.unWatchPositions (symbols?, params?) ```