CCXT

weex

weex cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

weex

Kind: global class
Extends: Exchange

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance method of weex
Returns: object - a status structure

See: https://www.weex.com/api-doc/spot/ConfigAPI/Ping

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchStatus (params?)

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of weex
Returns: int - the current integer timestamp in milliseconds from the exchange server

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', default is 'spot'
weex.fetchTime (params?)

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of weex
Returns: object - an associative dictionary of currencies

See: https://www.weex.com/api-doc/spot/ConfigAPI/CurrencyInfo

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchCurrencies (params?)

fetchMarkets

retrieves data on all markets for exchagne

Kind: instance method of weex
Returns: Array<object> - an array of objects representing market data

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchMarkets (params?)

fetchTickers

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
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', default is 'spot' (used if symbols are not provided)
weex.fetchTickers (symbols, params?)

fetchBidsAsks

fetches the bid and ask price and volume for multiple markets

Kind: instance method of weex
Returns: object - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', default is 'spot' (used if symbols are not provided)
weex.fetchBidsAsks (symbols, params?)

fetchOrderBook

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of weex
Returns: object - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return (default 15, max 200)
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchOrderBook (symbol, limit?, params?)

fetchOHLCV

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of weex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch (default 100, max 300)
paramsobjectNoextra parameters specific to the exchange API endpoint Check fetchSpotOHLCV() and fetchContractOHLCV() for more details on the extra parameters that can be used in params
weex.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of weex
Returns: Array<Trade> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch (default 100, max 1000)
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchTrades (symbol, since?, limit?, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance method of weex
Returns: object - an open interest structure/docs/manual#open-interest-structure

See: https://www.weex.com/api-doc/contract/Market_API/GetOpenInterest

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
weex.fetchOpenInterest (symbol, params?)

fetchFundingRates

fetch the funding rate for multiple markets

Kind: instance method of weex
Returns: Array<object> - a list of funding rate structures, indexed by market symbols

See: https://www.weex.com/api-doc/contract/Market_API/GetCurrentFundingRate

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
weex.fetchFundingRates (symbols, params?)

fetchFundingRateHistory

fetches historical funding rate prices

Kind: instance method of weex
Returns: Array<object> - a list of funding rate structures

See: https://www.weex.com/api-doc/contract/Market_API/GetFundingRateHistory

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate records to fetch (default 100, max 1000)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest funding rate
weex.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchBalance

query for balance and get the amount of funds available for trading or funds locked in positions

Kind: instance method of weex
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' (default is 'spot')
weex.fetchBalance (params?)

fetchTransfers

fetch a history of internal transfers made on an account

Kind: instance method of weex
Returns: Array<object> - a list of transfer structures

See: https://www.weex.com/api-doc/spot/AccountAPI/TransferRecords

ParamTypeRequiredDescription
codestringNounified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve (default 10, max 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
weex.fetchTransfers (code?, since?, limit?, params?)

createOrder

Create an order on the exchange

Kind: instance method of weex
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesthe amount of currency to trade
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint Check createSpotOrder() and createContractOrder() for more details on the extra parameters that can be used in params
weex.createOrder (symbol, type, side, amount, price?, params?)

createSpotOrder

helper method for creating spot orders

Kind: instance method of weex
Returns: object - an order structure

See: https://www.weex.com/api-doc/spot/orderApi/PlaceOrder

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesthe amount of currency to trade
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id
params.timeInForcestringNo'GTC', 'IOC', or 'FOK'
weex.createSpotOrder (symbol, type, side, amount, price?, params?)

createContractOrder

helper method for creating contract orders

Kind: instance method of weex
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesthe amount of currency to trade
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
params.takeProfit.triggerPricefloatNoThe price at which the take profit order will be triggered
params.takeProfit.triggerPriceTypestringNoThe type of the trigger price for the take profit order, either 'last' or 'mark' (default is 'last')
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
params.stopLoss.triggerPricefloatNoThe price at which the stop loss order will be triggered
params.stopLoss.triggerPriceTypestringNoThe type of the trigger price for the stop loss order, either 'last' or 'mark' (default is 'last')
params.stopLossPricefloatNoprice to trigger stop-loss orders
params.stopLossPriceTypestringNoThe type of the trigger price for the stop loss order, either 'last' or 'mark' (default is 'last')
params.takeProfitPricefloatNoprice to trigger take-profit orders
params.takeProfitPriceTypestringNoThe type of the trigger price for the take profit order, either 'last' or 'mark' (default is 'last')
params.reduceOnlyboolNoA mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
params.timeInForcestringNoGTC, IOC, or FOK (default is GTC for limit orders)
weex.createContractOrder (symbol, type, side, amount, price?, params?)

cancelOrder

cancels an open order

Kind: instance method of weex
Returns: object - an order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' (default is 'spot')
params.triggerbooleanNocontract orders only whether the order to cancel is a trigger order
params.clientOrderIdstringNonon-trigger orders only a unique id for the order
weex.cancelOrder (id, symbol?, params?)

cancelAllOrders

cancel all open orders

Kind: instance method of weex
Returns: Response from the exchange

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
params.triggerbooleanNoswap only true for cancelling trigger orders (default is false)
weex.cancelAllOrders (symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of weex
Returns: object - an list of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdsArray<string>Noclient order ids (could be an alternative to ids)
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
weex.cancelOrders (ids, symbol?, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of weex
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
params.clientOrderIdstringNospot only a unique id for the order, used if id is not provided
weex.fetchOrder (id, symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of weex
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
params.triggerbooleanNoswap only whether to fetch trigger orders (default is false)
weex.fetchOpenOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of weex
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
weex.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

Kind: instance method of weex
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
weex.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchOrders

fetches information on multiple spot orders made by the user

Kind: instance method of weex
Returns: Array<Order> - a list of order structures

See: https://www.weex.com/api-doc/spot/orderApi/HistoryOrders // spot

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in (required for spot orders)
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilobjectNoend time, ms
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
weex.fetchOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

fetches information on multiple closed and canceled orders made by the user

Kind: instance method of weex
Returns: Array<Order> - a list of order structures

See: https://www.weex.com/api-doc/contract/Transaction_API/GetOrderHistory // contract

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market orders were made in (required for spot orders)
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilobjectNoend time, ms
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
weex.fetchCanceledAndClosedOrders (symbol?, since?, limit?, params?)

fetchOrderTrades

fetch all the trades made from a single order

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchOrderTrades (id, symbol?, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of weex
Returns: Array<Trade> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
params.typestringNo'spot' or 'swap', used if symbol is not provided (default is 'spot')
weex.fetchMyTrades (symbol, since?, limit?, params?)

fetchLedger

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of weex
Returns: object - a ledger structure

See

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined
sinceintNotimestamp in ms of the earliest ledger entry, default is undefined
limitintNomax number of ledger entries to return, default is undefined, max is 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest ledger entry
params.typestringNo'spot', 'funding' or 'swap' (default is 'spot')
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
weex.fetchLedger (code?, since?, limit?, params?)

fetchPositions

fetch all open positions

Kind: instance method of weex
Returns: Array<object> - a list of position structure

See: https://www.weex.com/api-doc/contract/Account_API/GetAllPositions

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchPositions (symbols?, params?)

fetchPosition

fetch data on an open position

Kind: instance method of weex
Returns: object - a position structure

See: https://www.weex.com/api-doc/contract/Account_API/GetSinglePosition

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchPosition (symbol, params?)

fetchPositionsForSymbol

fetch all open positions for specific symbol

Kind: instance method of weex
Returns: Array<object> - a list of position structure

See: https://www.weex.com/api-doc/contract/Account_API/GetSinglePosition

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchPositionsForSymbol (symbol, params?)

closeAllPositions

closes all open positions for a market type

Kind: instance method of weex
Returns: Array<object> - A list of position structures

See: https://www.weex.com/api-doc/contract/Transaction_API/ClosePositions

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.closeAllPositions (params?)

closePosition

closes open positions for a market

Kind: instance method of weex
Returns: object - an order structure

See: https://www.weex.com/api-doc/contract/Transaction_API/ClosePositions

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
sidestringNonot used by current exchange
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.closePosition (symbol, side?, params?)

fetchTradingFee

fetch the trading fees for a contract market

Kind: instance method of weex
Returns: object - a fee structure

See: https://www.weex.com/api-doc/contract/Account_API/GetCommissionRate // contract

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchTradingFee (symbol, params?)

fetchMarginMode

fetches the margin mode of a specific symbol

Kind: instance method of weex
Returns: object - a margin mode structure

See: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchMarginMode (symbol, params?)

fetchMarginModes

fetches margin modes the symbols, with symbols=undefined all markets are returned

Kind: instance method of weex
Returns: object - a list of margin mode structures

See: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig

ParamTypeRequiredDescription
symbolsArray<string>Yesunified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchMarginModes (symbols, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance method of weex
Returns: object - response from the exchange

See: https://www.weex.com/api-doc/contract/Account_API/ChangeMarginModeTRADE

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.setMarginMode (marginMode, symbol, params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of weex
Returns: object - a leverage structure

See: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchLeverage (symbol, params?)

fetchLeverages

fetch the set leverage for all markets

Kind: instance method of weex
Returns: object - a list of leverage structures

See: https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchLeverages (symbols?, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of weex
Returns: object - response from the exchange

See: https://www.weex.com/api-doc/contract/Account_API/UpdateLeverageTRADE

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'cross' or 'isolated' (default is 'cross' if specific leverage parameters are not provided)
params.crossLeveragenumberNocross margin mode only leverage for cross margin mode when marginMode is 'cross'
params.isolatedLongLeveragenumberNoisolated margin mode only leverage for long positions when marginMode is 'isolated'
params.isolatedShortLeveragenumberNoisolated 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
weex.setLeverage (leverage, symbol, params?)

fetchPositionMode

fetchs the position mode, hedged or one way

Kind: instance method of 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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.fetchPositionMode (symbol, params?)

setPositionMode

set hedged to true or false for a market

Kind: instance method of weex
Returns: object - response from the exchange

See: https://www.weex.com/api-doc/contract/Account_API/ChangeMarginModeTRADE

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringYes'cross' or 'isolated' (default is 'cross')
weex.setPositionMode (hedged, symbol, params?)

reduceMargin

remove margin from a position

Kind: instance method of weex
Returns: object - a margin structure

See: https://www.weex.com/api-doc/contract/Account_API/AdjustPositionMarginTRADE

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
params.positionIdstringYesthe id of the position to reduce margin from, required
weex.reduceMargin (symbol, amount, params?)

addMargin

add margin

Kind: instance method of weex
Returns: object - a margin structure

See: https://www.weex.com/api-doc/contract/Account_API/AdjustPositionMarginTRADE

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
params.positionIdstringYesthe id of the position to add margin to, required
weex.addMargin (symbol, amount, params?)

watchTicker

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
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.namestringNostream to use can be ticker or miniTicker
weex.watchTicker (symbol, params?)

watchTickers

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
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchTickers (symbols, params?)

unWatchTicker

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
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchTicker (symbol, params?)

unWatchTickers

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
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchTickers (symbols, params?)

watchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchTrades (symbol, since?, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a list of symbols

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchTradesForSymbols (symbols, since?, limit?, params?)

unWatchTrades

unsubscribes from the trades channel

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchTrades (symbol, params?)

unWatchTradesForSymbols

unsubscribes from the trades channel

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchTradesForSymbols (symbols, params?)

watchOHLCV

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of weex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchOHLCVForSymbols

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of weex
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)

unWatchOHLCV

unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of weex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchOHLCV (symbol, timeframe, params?)

unWatchOHLCVForSymbols

unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of weex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?)

watchOrderBook

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of weex
Returns: object - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchOrderBook (symbol, limit?, params?)

watchOrderBookForSymbols

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of weex
Returns: object - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchOrderBookForSymbols (symbols, limit?, params?)

unWatchOrderBook

unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of weex
Returns: object - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbolstringYesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchOrderBook (symbol, params?)

unWatchOrderBookForSymbols

unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of weex
Returns: object - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchOrderBookForSymbols (symbols, params?)

watchBidsAsks

watches best bid & ask for spot symbols

Kind: instance method of weex
Returns: object - a ticker structure

See: https://www.weex.com/api-doc/spot/Websocket/public/BookTicker-Channel

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.watchBidsAsks (symbols, params?)

unWatchBidsAsks

unWatches best bid & ask for spot symbols

Kind: instance method of weex
Returns: object - a ticker structure

See: https://www.weex.com/api-doc/spot/Websocket/public/BookTicker-Channel

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchBidsAsks (symbols, params?)

watchMyTrades

watches information on multiple trades made by the user

Kind: instance method of weex
Returns: Array<object> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNospot or swap, default is spot if symbol is not provided
weex.watchMyTrades (symbol, since?, limit?, params?)

unWatchMyTrades

unWatches information on multiple trades made by the user

Kind: instance method of weex
Returns: Array<object> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringNonot used by the exchange
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNospot or swap, default is spot
weex.unWatchMyTrades (symbol?, params?)

watchOrders

watches information on multiple orders made by the user

Kind: instance method of weex
Returns: Array<object> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNospot or swap, default is spot if symbol is not provided
weex.watchOrders (symbol, since?, limit?, params?)

unWatchOrders

unWatches information on multiple orders made by the user

Kind: instance method of weex
Returns: Array<object> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringNonot used by the exchange
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchOrders (symbol?, params?)

watchBalance

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of weex
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap', default is 'spot'
weex.watchBalance (params?)

watchPositions

watch all open positions

Kind: instance method of weex
Returns: Array<object> - a list of position structure

See: https://www.weex.com/api-doc/contract/Websocket/private/Positions-Channel

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of position structures to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query orders for, required
weex.watchPositions (symbols, since?, limit?, params)

unWatchPositions

unWatches all open positions

Kind: instance method of weex
Returns: object - status of the unwatch request

See: https://www.weex.com/api-doc/contract/Websocket/private/Positions-Channel

ParamTypeRequiredDescription
symbolsArray<string>Nonot used by the exchange, unsubscription from positions is global for all symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
weex.unWatchPositions (symbols?, params?)

On this page