mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
1135 lines
44 KiB
Markdown
1135 lines
44 KiB
Markdown
|
|
<a name="modetrade" id="modetrade"></a>
|
|
|
|
## modetrade{docsify-ignore}
|
|
**Kind**: global class
|
|
**Extends**: <code>Exchange</code>
|
|
|
|
* [fetchStatus](#fetchstatus)
|
|
* [fetchTime](#fetchtime)
|
|
* [fetchMarkets](#fetchmarkets)
|
|
* [fetchCurrencies](#fetchcurrencies)
|
|
* [fetchTrades](#fetchtrades)
|
|
* [fetchFundingInterval](#fetchfundinginterval)
|
|
* [fetchFundingRate](#fetchfundingrate)
|
|
* [fetchFundingRates](#fetchfundingrates)
|
|
* [fetchFundingRateHistory](#fetchfundingratehistory)
|
|
* [fetchFundingHistory](#fetchfundinghistory)
|
|
* [fetchTradingFees](#fetchtradingfees)
|
|
* [fetchOrderBook](#fetchorderbook)
|
|
* [fetchOHLCV](#fetchohlcv)
|
|
* [createOrder](#createorder)
|
|
* [createOrders](#createorders)
|
|
* [editOrder](#editorder)
|
|
* [cancelOrder](#cancelorder)
|
|
* [cancelOrders](#cancelorders)
|
|
* [cancelAllOrders](#cancelallorders)
|
|
* [fetchOrder](#fetchorder)
|
|
* [fetchOrders](#fetchorders)
|
|
* [fetchOpenOrders](#fetchopenorders)
|
|
* [fetchClosedOrders](#fetchclosedorders)
|
|
* [fetchOrderTrades](#fetchordertrades)
|
|
* [fetchMyTrades](#fetchmytrades)
|
|
* [fetchBalance](#fetchbalance)
|
|
* [fetchLedger](#fetchledger)
|
|
* [fetchDeposits](#fetchdeposits)
|
|
* [fetchWithdrawals](#fetchwithdrawals)
|
|
* [fetchDepositsWithdrawals](#fetchdepositswithdrawals)
|
|
* [withdraw](#withdraw)
|
|
* [fetchLeverage](#fetchleverage)
|
|
* [setLeverage](#setleverage)
|
|
* [fetchPosition](#fetchposition)
|
|
* [fetchPositions](#fetchpositions)
|
|
* [watchOrderBook](#watchorderbook)
|
|
* [watchTicker](#watchticker)
|
|
* [watchTickers](#watchtickers)
|
|
* [watchBidsAsks](#watchbidsasks)
|
|
* [watchOHLCV](#watchohlcv)
|
|
* [watchTrades](#watchtrades)
|
|
* [watchOrders](#watchorders)
|
|
* [watchMyTrades](#watchmytrades)
|
|
* [watchPositions](#watchpositions)
|
|
* [watchBalance](#watchbalance)
|
|
|
|
<a name="fetchStatus" id="fetchstatus"></a>
|
|
|
|
### fetchStatus{docsify-ignore}
|
|
the latest known information on the availability of the exchange API
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [status structure](https://docs.ccxt.com/#/?id=exchange-status-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-system-maintenance-status
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchStatus ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchTime" id="fetchtime"></a>
|
|
|
|
### fetchTime{docsify-ignore}
|
|
fetches the current integer timestamp in milliseconds from the exchange server
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>int</code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchTime ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchMarkets" id="fetchmarkets"></a>
|
|
|
|
### fetchMarkets{docsify-ignore}
|
|
retrieves data on all markets for modetrade
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchMarkets ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchCurrencies" id="fetchcurrencies"></a>
|
|
|
|
### fetchCurrencies{docsify-ignore}
|
|
fetches all available currencies on an exchange
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchCurrencies ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchTrades" id="fetchtrades"></a>
|
|
|
|
### fetchTrades{docsify-ignore}
|
|
get the list of most recent trades for a particular symbol
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-market-trades
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingInterval" id="fetchfundinginterval"></a>
|
|
|
|
### fetchFundingInterval{docsify-ignore}
|
|
fetch the current funding rate interval
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rate-for-one-market
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchFundingInterval (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingRate" id="fetchfundingrate"></a>
|
|
|
|
### fetchFundingRate{docsify-ignore}
|
|
fetch the current funding rate
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rate-for-one-market
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchFundingRate (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingRates" id="fetchfundingrates"></a>
|
|
|
|
### fetchFundingRates{docsify-ignore}
|
|
fetch the current funding rate for multiple markets
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - an array of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-predicted-funding-rates-for-all-markets
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | Yes | unified market symbols |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchFundingRates (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
|
|
|
|
### fetchFundingRateHistory{docsify-ignore}
|
|
fetches historical funding rate prices
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/public/get-funding-rate-history-for-one-market
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the funding rate history for |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest funding rate to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure) to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>int</code> | No | timestamp in ms of the latest funding rate |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchFundingRateHistory (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingHistory" id="fetchfundinghistory"></a>
|
|
|
|
### fetchFundingHistory{docsify-ignore}
|
|
fetch the history of funding payments paid and received on this account
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [funding history structure](https://docs.ccxt.com/#/?id=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 | <code>string</code> | No | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch funding history for |
|
|
| limit | <code>int</code> | No | the maximum number of funding history structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchFundingHistory ([symbol, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchTradingFees" id="fetchtradingfees"></a>
|
|
|
|
### fetchTradingFees{docsify-ignore}
|
|
fetch the trading fees for multiple markets
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a dictionary of [fee structures](https://docs.ccxt.com/#/?id=fee-structure) 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchTradingFees ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrderBook" id="fetchorderbook"></a>
|
|
|
|
### fetchOrderBook{docsify-ignore}
|
|
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/orderbook-snapshot
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
|
|
| limit | <code>int</code> | No | the maximum amount of order book entries to return |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOrderBook (symbol[, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOHLCV" id="fetchohlcv"></a>
|
|
|
|
### 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 [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Array<int>></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
|
|
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
|
|
| limit | <code>int</code> | No | max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms))) |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOHLCV (symbol, timeframe[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="createOrder" id="createorder"></a>
|
|
|
|
### createOrder{docsify-ignore}
|
|
create a trade order
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=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 | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| type | <code>string</code> | Yes | 'market' or 'limit' |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| amount | <code>float</code> | Yes | how much of currency you want to trade in units of base currency |
|
|
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.triggerPrice | <code>float</code> | No | The price a trigger order is triggered at |
|
|
| params.takeProfit | <code>object</code> | 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 | <code>float</code> | No | take profit trigger price |
|
|
| params.stopLoss | <code>object</code> | 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 | <code>float</code> | No | stop loss trigger price |
|
|
| params.algoType | <code>float</code> | No | 'STOP'or 'TP_SL' or 'POSITIONAL_TP_SL' |
|
|
| params.cost | <code>float</code> | No | *spot market buy only* the quote quantity that can be used as an alternative for the amount |
|
|
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
|
|
|
|
|
|
```javascript
|
|
modetrade.createOrder (symbol, type, side, amount[, price, params])
|
|
```
|
|
|
|
|
|
<a name="createOrders" id="createorders"></a>
|
|
|
|
### createOrders{docsify-ignore}
|
|
*contract only* create a list of trade orders
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/batch-create-order
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| orders | <code>Array</code> | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.createOrders (orders[, params])
|
|
```
|
|
|
|
|
|
<a name="editOrder" id="editorder"></a>
|
|
|
|
### editOrder{docsify-ignore}
|
|
edit a trade order
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=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 | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
|
|
| type | <code>string</code> | Yes | 'market' or 'limit' |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| amount | <code>float</code> | Yes | how much of currency you want to trade in units of base currency |
|
|
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.triggerPrice | <code>float</code> | No | The price a trigger order is triggered at |
|
|
| params.stopLossPrice | <code>float</code> | No | price to trigger stop-loss orders |
|
|
| params.takeProfitPrice | <code>float</code> | No | price to trigger take-profit orders |
|
|
|
|
|
|
```javascript
|
|
modetrade.editOrder (id, symbol, type, side, amount[, price, params])
|
|
```
|
|
|
|
|
|
<a name="cancelOrder" id="cancelorder"></a>
|
|
|
|
### cancelOrder{docsify-ignore}
|
|
cancels an open order
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - An [order structure](https://docs.ccxt.com/#/?id=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 | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
|
|
|
|
|
|
```javascript
|
|
modetrade.cancelOrder (id, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="cancelOrders" id="cancelorders"></a>
|
|
|
|
### cancelOrders{docsify-ignore}
|
|
cancel multiple orders
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - an list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>Array<string></code> | Yes | order ids |
|
|
| symbol | <code>string</code> | No | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.client_order_ids | <code>Array<string></code> | No | max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma |
|
|
|
|
|
|
```javascript
|
|
modetrade.cancelOrders (ids[, symbol, params])
|
|
```
|
|
|
|
|
|
<a name="cancelAllOrders" id="cancelallorders"></a>
|
|
|
|
### cancelAllOrders{docsify-ignore}
|
|
cancel all open orders in a market
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - an list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
|
|
|
|
```javascript
|
|
modetrade.cancelAllOrders (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrder" id="fetchorder"></a>
|
|
|
|
### fetchOrder{docsify-ignore}
|
|
fetches information on an order made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - An [order structure](https://docs.ccxt.com/#/?id=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 | <code>string</code> | Yes | the order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOrder (id, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrders" id="fetchorders"></a>
|
|
|
|
### fetchOrders{docsify-ignore}
|
|
fetches information on multiple orders made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
| params.is_triggered | <code>boolean</code> | No | whether the order has been triggered (false by default) |
|
|
| params.side | <code>string</code> | No | 'buy' or 'sell' |
|
|
| params.paginate | <code>boolean</code> | No | set to true if you want to fetch orders with pagination |
|
|
| params.until | <code>int</code> | Yes | timestamp in ms of the latest order to fetch |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenOrders" id="fetchopenorders"></a>
|
|
|
|
### fetchOpenOrders{docsify-ignore}
|
|
fetches information on multiple orders made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
| params.is_triggered | <code>boolean</code> | No | whether the order has been triggered (false by default) |
|
|
| params.side | <code>string</code> | No | 'buy' or 'sell' |
|
|
| params.until | <code>int</code> | Yes | timestamp in ms of the latest order to fetch |
|
|
| params.paginate | <code>boolean</code> | No | set to true if you want to fetch orders with pagination |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOpenOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
|
|
|
|
### fetchClosedOrders{docsify-ignore}
|
|
fetches information on multiple orders made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>boolean</code> | No | whether the order is a stop/algo order |
|
|
| params.is_triggered | <code>boolean</code> | No | whether the order has been triggered (false by default) |
|
|
| params.side | <code>string</code> | No | 'buy' or 'sell' |
|
|
| params.until | <code>int</code> | Yes | timestamp in ms of the latest order to fetch |
|
|
| params.paginate | <code>boolean</code> | No | set to true if you want to fetch orders with pagination |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchClosedOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrderTrades" id="fetchordertrades"></a>
|
|
|
|
### fetchOrderTrades{docsify-ignore}
|
|
fetch all the trades made from a single order
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-all-trades-of-specific-order
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
|
|
| limit | <code>int</code> | No | the maximum number of trades to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchOrderTrades (id, symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchMyTrades" id="fetchmytrades"></a>
|
|
|
|
### fetchMyTrades{docsify-ignore}
|
|
fetch all trades made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-trades
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
|
|
| limit | <code>int</code> | No | the maximum number of trades structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.paginate | <code>boolean</code> | No | set to true if you want to fetch trades with pagination |
|
|
| params.until | <code>int</code> | Yes | timestamp in ms of the latest trade to fetch |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchMyTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchBalance" id="fetchbalance"></a>
|
|
|
|
### fetchBalance{docsify-ignore}
|
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-current-holding
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchBalance ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchLedger" id="fetchledger"></a>
|
|
|
|
### 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 [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [ledger structure](https://docs.ccxt.com/#/?id=ledger)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | No | unified currency code, default is undefined |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest ledger entry, default is undefined |
|
|
| limit | <code>int</code> | No | max number of ledger entries to return, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchLedger ([code, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchDeposits" id="fetchdeposits"></a>
|
|
|
|
### fetchDeposits{docsify-ignore}
|
|
fetch all deposits made to an account
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | Yes | unified currency code |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
|
|
| limit | <code>int</code> | No | the maximum number of deposits structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchDeposits (code[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
|
|
|
|
### fetchWithdrawals{docsify-ignore}
|
|
fetch all withdrawals made from an account
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | Yes | unified currency code |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
|
|
| limit | <code>int</code> | No | the maximum number of withdrawals structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchWithdrawals (code[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchDepositsWithdrawals" id="fetchdepositswithdrawals"></a>
|
|
|
|
### fetchDepositsWithdrawals{docsify-ignore}
|
|
fetch history of deposits and withdrawals
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a list of [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-asset-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
|
|
| limit | <code>int</code> | No | max number of deposit/withdrawals to return, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchDepositsWithdrawals ([code, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="withdraw" id="withdraw"></a>
|
|
|
|
### withdraw{docsify-ignore}
|
|
make a withdrawal
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-withdraw-request
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | Yes | unified currency code |
|
|
| amount | <code>float</code> | Yes | the amount to withdraw |
|
|
| address | <code>string</code> | Yes | the address to withdraw to |
|
|
| tag | <code>string</code> | Yes | |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.withdraw (code, amount, address, tag[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchLeverage" id="fetchleverage"></a>
|
|
|
|
### fetchLeverage{docsify-ignore}
|
|
fetch the set leverage for a market
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [leverage structure](https://docs.ccxt.com/#/?id=leverage-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-account-information
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchLeverage (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="setLeverage" id="setleverage"></a>
|
|
|
|
### setLeverage{docsify-ignore}
|
|
set the level of leverage for a market
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - 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 | <code>int</code> | No | the rate of leverage |
|
|
| symbol | <code>string</code> | No | unified market symbol |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.setLeverage ([leverage, symbol, params])
|
|
```
|
|
|
|
|
|
<a name="fetchPosition" id="fetchposition"></a>
|
|
|
|
### fetchPosition{docsify-ignore}
|
|
fetch data on an open position
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [position structure](https://docs.ccxt.com/#/?id=position-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-one-position-info
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol of the market the position is held in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchPosition (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchPositions" id="fetchpositions"></a>
|
|
|
|
### fetchPositions{docsify-ignore}
|
|
fetch all open positions
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-all-positions-info
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.fetchPositions ([symbols, params])
|
|
```
|
|
|
|
|
|
<a name="watchOrderBook" id="watchorderbook"></a>
|
|
|
|
### watchOrderBook{docsify-ignore}
|
|
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/orderbook
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
|
|
| limit | <code>int</code> | No | the maximum amount of order book entries to return. |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchOrderBook (symbol[, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchTicker" id="watchticker"></a>
|
|
|
|
### 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 [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-ticker
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchTicker (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="watchTickers" id="watchtickers"></a>
|
|
|
|
### 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 [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-tickers
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchTickers (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="watchBidsAsks" id="watchbidsasks"></a>
|
|
|
|
### watchBidsAsks{docsify-ignore}
|
|
watches best bid & ask for symbols
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/bbos
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchBidsAsks (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="watchOHLCV" id="watchohlcv"></a>
|
|
|
|
### 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 [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<Array<int>></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
|
|
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
|
|
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchOHLCV (symbol, timeframe[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchTrades" id="watchtrades"></a>
|
|
|
|
### watchTrades{docsify-ignore}
|
|
watches information on multiple trades made in a market
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/trade
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol of the market trades were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
|
|
| limit | <code>int</code> | No | the maximum number of trade structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchOrders" id="watchorders"></a>
|
|
|
|
### watchOrders{docsify-ignore}
|
|
watches information on multiple orders made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>bool</code> | No | true if trigger order |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchMyTrades" id="watchmytrades"></a>
|
|
|
|
### watchMyTrades{docsify-ignore}
|
|
watches information on multiple trades made by the user
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**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 | <code>string</code> | Yes | unified market symbol of the market orders were made in |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
|
|
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.trigger | <code>bool</code> | No | true if trigger order |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchMyTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchPositions" id="watchpositions"></a>
|
|
|
|
### watchPositions{docsify-ignore}
|
|
watch all open positions
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>Array<object></code> - a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/position-push
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
|
|
| since | | Yes | timestamp in ms of the earliest position to fetch |
|
|
| limit | | Yes | the maximum number of positions to fetch |
|
|
| params | <code>object</code> | Yes | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchPositions ([symbols, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchBalance" id="watchbalance"></a>
|
|
|
|
### watchBalance{docsify-ignore}
|
|
watch balance and get the amount of funds available for trading or funds locked in orders
|
|
|
|
**Kind**: instance method of [<code>modetrade</code>](#modetrade)
|
|
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
|
|
|
**See**: https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/balance
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
modetrade.watchBalance ([params])
|
|
```
|
|
|