modetrade
modetrade cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
modetrade
Kind: global class
Extends: Exchange
- fetchStatus
- fetchTime
- fetchMarkets
- fetchCurrencies
- fetchTrades
- fetchFundingInterval
- fetchFundingRate
- fetchFundingRates
- fetchFundingRateHistory
- fetchFundingHistory
- fetchTradingFees
- fetchOrderBook
- fetchOHLCV
- createOrder
- createOrders
- editOrder
- cancelOrder
- cancelOrders
- cancelAllOrders
- fetchOrder
- fetchOrders
- fetchOpenOrders
- fetchClosedOrders
- fetchOrderTrades
- fetchMyTrades
- fetchBalance
- fetchLedger
- fetchDeposits
- fetchWithdrawals
- fetchDepositsWithdrawals
- withdraw
- fetchLeverage
- setLeverage
- fetchPosition
- fetchPositions
- watchOrderBook
- watchTicker
- watchTickers
- watchBidsAsks
- watchOHLCV
- watchTrades
- watchOrders
- watchMyTrades
- watchPositions
- watchBalance
fetchStatus
the latest known information on the availability of the exchange API
Kind: instance method of modetrade
Returns: object - a status structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-system-maintenance-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchStatus (params?)fetchTime
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of modetrade
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-system-maintenance-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchTime (params?)fetchMarkets
retrieves data on all markets for modetrade
Kind: instance method of modetrade
Returns: Array<object> - an array of objects representing market data
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-available-symbols
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchMarkets (params?)fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of modetrade
Returns: object - an associative dictionary of currencies
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-token-info
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchCurrencies (params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of modetrade
Returns: Array<Trade> - a list of trade structures
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-market-trades
| 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 |
modetrade.fetchTrades (symbol, since?, limit?, params?)fetchFundingInterval
fetch the current funding rate interval
Kind: instance method of modetrade
Returns: object - a funding rate structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchFundingInterval (symbol, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of modetrade
Returns: object - a funding rate structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchFundingRate (symbol, params?)fetchFundingRates
fetch the current funding rate for multiple markets
Kind: instance method of modetrade
Returns: Array<object> - an array of funding rate structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchFundingRates (symbols, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of modetrade
Returns: Array<object> - a list of funding rate structures
| 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 structures to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest funding rate |
| 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 |
modetrade.fetchFundingRateHistory (symbol, since?, limit?, params?)fetchFundingHistory
fetch the history of funding payments paid and received on this account
Kind: instance method of modetrade
Returns: object - a funding history structure
See: https://orderly.network/docs/build-on-omnichain/evm-api/restful-api/private/get-funding-fee-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch funding history for |
| limit | int | No | the maximum number of funding history 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 |
modetrade.fetchFundingHistory (symbol?, since?, limit?, params?)fetchTradingFees
fetch the trading fees for multiple markets
Kind: instance method of modetrade
Returns: object - a dictionary of fee structures indexed by market symbols
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-account-information
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchTradingFees (params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of modetrade
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/orderbook-snapshot
| 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 |
modetrade.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 modetrade
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-kline
| 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 | max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms))) |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchOHLCV (symbol, timeframe, since?, limit?, params?)createOrder
create a trade order
Kind: instance method of modetrade
Returns: object - an order structure
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-order
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-algo-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float | No | The price a trigger order is triggered at |
| params.takeProfit | object | No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float | No | take profit trigger price |
| params.stopLoss | object | No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float | No | stop loss trigger price |
| params.algoType | float | No | 'STOP'or 'TP_SL' or 'POSITIONAL_TP_SL' |
| params.cost | float | No | spot market buy only the quote quantity that can be used as an alternative for the amount |
| params.clientOrderId | string | No | a unique id for the order |
modetrade.createOrder (symbol, type, side, amount, price?, params?)createOrders
contract only create a list of trade orders
Kind: instance method of modetrade
Returns: object - an order structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-create-order
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.createOrders (orders, params?)editOrder
edit a trade order
Kind: instance method of modetrade
Returns: object - an order structure
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/edit-order
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/edit-algo-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float | No | The price a trigger order is triggered at |
| params.stopLossPrice | float | No | price to trigger stop-loss orders |
| params.takeProfitPrice | float | No | price to trigger take-profit orders |
modetrade.editOrder (id, symbol, type, side, amount, price?, params?)cancelOrder
cancels an open order
Kind: instance method of modetrade
Returns: object - An order structure
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-order
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-order-by-client_order_id
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-algo-order
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-algo-order-by-client_order_id
| 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.trigger | boolean | No | whether the order is a stop/algo order |
| params.clientOrderId | string | No | a unique id for the order |
modetrade.cancelOrder (id, symbol, params?)cancelOrders
cancel multiple orders
Kind: instance method of modetrade
Returns: object - an list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-cancel-orders
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-cancel-orders-by-client_order_id
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| symbol | string | No | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.client_order_ids | Array<string> | No | max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma |
modetrade.cancelOrders (ids, symbol?, params?)cancelAllOrders
cancel all open orders in a market
Kind: instance method of modetrade
Returns: object - an list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-all-pending-algo-orders
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/cancel-orders-in-bulk
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean | No | whether the order is a stop/algo order |
modetrade.cancelAllOrders (symbol, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of modetrade
Returns: object - An order structure
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-order-by-order_id
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-order-by-client_order_id
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-order_id
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-client_order_id
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | the 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.trigger | boolean | No | whether the order is a stop/algo order |
| params.clientOrderId | string | No | a unique id for the order |
modetrade.fetchOrder (id, symbol, params?)fetchOrders
fetches information on multiple orders made by the user
Kind: instance method of modetrade
Returns: Array<Order> - a list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
| 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.trigger | boolean | No | whether the order is a stop/algo order |
| params.is_triggered | boolean | No | whether the order has been triggered (false by default) |
| params.side | string | No | 'buy' or 'sell' |
| params.paginate | boolean | No | set to true if you want to fetch orders with pagination |
| params.until | int | Yes | timestamp in ms of the latest order to fetch |
modetrade.fetchOrders (symbol, since?, limit?, params?)fetchOpenOrders
fetches information on multiple orders made by the user
Kind: instance method of modetrade
Returns: Array<Order> - a list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
| 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.trigger | boolean | No | whether the order is a stop/algo order |
| params.is_triggered | boolean | No | whether the order has been triggered (false by default) |
| params.side | string | No | 'buy' or 'sell' |
| params.until | int | Yes | timestamp in ms of the latest order to fetch |
| params.paginate | boolean | No | set to true if you want to fetch orders with pagination |
modetrade.fetchOpenOrders (symbol, since?, limit?, params?)fetchClosedOrders
fetches information on multiple orders made by the user
Kind: instance method of modetrade
Returns: Array<Order> - a list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-orders
- https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-orders
| 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.trigger | boolean | No | whether the order is a stop/algo order |
| params.is_triggered | boolean | No | whether the order has been triggered (false by default) |
| params.side | string | No | 'buy' or 'sell' |
| params.until | int | Yes | timestamp in ms of the latest order to fetch |
| params.paginate | boolean | No | set to true if you want to fetch orders with pagination |
modetrade.fetchClosedOrders (symbol, since?, limit?, params?)fetchOrderTrades
fetch all the trades made from a single order
Kind: instance method of modetrade
Returns: Array<object> - a list of trade structures
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchOrderTrades (id, symbol, since?, limit?, params?)fetchMyTrades
fetch all trades made by the user
Kind: instance method of modetrade
Returns: Array<Trade> - a list of trade structures
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-trades
| 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 | set to true if you want to fetch trades with pagination |
| params.until | int | Yes | timestamp in ms of the latest trade to fetch |
modetrade.fetchMyTrades (symbol, since?, limit?, params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of modetrade
Returns: object - a balance structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-current-holding
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchBalance (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 modetrade
Returns: object - a ledger structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
| 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 |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchLedger (code?, since?, limit?, params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of modetrade
Returns: Array<object> - a list of transaction structures
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of deposits structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchDeposits (code, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of modetrade
Returns: Array<object> - a list of transaction structures
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of withdrawals structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchWithdrawals (code, since?, limit?, params?)fetchDepositsWithdrawals
fetch history of deposits and withdrawals
Kind: instance method of modetrade
Returns: object - a list of transaction structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
| since | int | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
| limit | int | No | max number of deposit/withdrawals to return, default is undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchDepositsWithdrawals (code?, since?, limit?, params?)withdraw
make a withdrawal
Kind: instance method of modetrade
Returns: object - a transaction structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-withdraw-request
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| tag | string | Yes | |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.withdraw (code, amount, address, tag, params?)fetchLeverage
fetch the set leverage for a market
Kind: instance method of modetrade
Returns: object - a leverage structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-account-information
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchLeverage (symbol, params?)setLeverage
set the level of leverage for a market
Kind: instance method of modetrade
Returns: object - response from the exchange
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/update-leverage-setting
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | int | No | the rate of leverage |
| symbol | string | No | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.setLeverage (leverage?, symbol?, params?)fetchPosition
fetch data on an open position
Kind: instance method of modetrade
Returns: object - a position structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-one-position-info
| 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 |
modetrade.fetchPosition (symbol, params?)fetchPositions
fetch all open positions
Kind: instance method of modetrade
Returns: Array<object> - a list of position structure
See: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-all-positions-info
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.fetchPositions (symbols?, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of modetrade
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/orderbook
| 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 |
modetrade.watchOrderBook (symbol, limit?, 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 modetrade
Returns: object - a ticker structure
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-ticker
| 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 |
modetrade.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 modetrade
Returns: object - a ticker structure
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-tickers
| 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 |
modetrade.watchTickers (symbols, params?)watchBidsAsks
watches best bid & ask for symbols
Kind: instance method of modetrade
Returns: object - a ticker structure
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/bbos
| 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 |
modetrade.watchBidsAsks (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 modetrade
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/k-line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.watchOHLCV (symbol, timeframe, since?, limit?, params?)watchTrades
watches information on multiple trades made in a market
Kind: instance method of modetrade
Returns: Array<object> - a list of trade structures
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/trade
| 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 |
modetrade.watchTrades (symbol, since?, limit?, params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of modetrade
Returns: Array<object> - a list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/execution-report
- https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/algo-execution-report
| 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.trigger | bool | No | true if trigger order |
modetrade.watchOrders (symbol, since?, limit?, params?)watchMyTrades
watches information on multiple trades made by the user
Kind: instance method of modetrade
Returns: Array<object> - a list of order structures
See
- https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/execution-report
- https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/algo-execution-report
| 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.trigger | bool | No | true if trigger order |
modetrade.watchMyTrades (symbol, since?, limit?, params?)watchPositions
watch all open positions
Kind: instance method of modetrade
Returns: Array<object> - a list of position structure
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/position-push
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| since | int | No | timestamp in ms of the earliest position to fetch |
| limit | int | No | the maximum number of positions to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.watchPositions (symbols?, since?, limit?, params?)watchBalance
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of modetrade
Returns: object - a balance structure
See: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
modetrade.watchBalance (params?)