mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 01:08:07 +00:00
commit
This commit is contained in:
@@ -0,0 +1,847 @@
|
||||
|
||||
<a name="apex" id="apex"></a>
|
||||
|
||||
## apex{docsify-ignore}
|
||||
**Kind**: global class
|
||||
**Extends**: <code>Exchange</code>
|
||||
|
||||
* [fetchTime](#fetchtime)
|
||||
* [fetchBalance](#fetchbalance)
|
||||
* [fetchAccount](#fetchaccount)
|
||||
* [fetchCurrencies](#fetchcurrencies)
|
||||
* [fetchMarkets](#fetchmarkets)
|
||||
* [fetchTicker](#fetchticker)
|
||||
* [fetchTickers](#fetchtickers)
|
||||
* [fetchOHLCV](#fetchohlcv)
|
||||
* [fetchOrderBook](#fetchorderbook)
|
||||
* [fetchTrades](#fetchtrades)
|
||||
* [fetchOpenInterest](#fetchopeninterest)
|
||||
* [fetchFundingRateHistory](#fetchfundingratehistory)
|
||||
* [createOrder](#createorder)
|
||||
* [transfer](#transfer)
|
||||
* [cancelAllOrders](#cancelallorders)
|
||||
* [cancelOrder](#cancelorder)
|
||||
* [fetchOrder](#fetchorder)
|
||||
* [fetchOpenOrders](#fetchopenorders)
|
||||
* [fetchOrders](#fetchorders)
|
||||
* [fetchOrderTrades](#fetchordertrades)
|
||||
* [fetchMyTrades](#fetchmytrades)
|
||||
* [fetchFundingHistory](#fetchfundinghistory)
|
||||
* [setLeverage](#setleverage)
|
||||
* [fetchPositions](#fetchpositions)
|
||||
* [watchTrades](#watchtrades)
|
||||
* [watchTradesForSymbols](#watchtradesforsymbols)
|
||||
* [watchOrderBook](#watchorderbook)
|
||||
* [watchOrderBookForSymbols](#watchorderbookforsymbols)
|
||||
* [watchTicker](#watchticker)
|
||||
* [watchTickers](#watchtickers)
|
||||
* [watchOHLCV](#watchohlcv)
|
||||
* [watchOHLCVForSymbols](#watchohlcvforsymbols)
|
||||
* [watchMyTrades](#watchmytrades)
|
||||
* [watchPositions](#watchpositions)
|
||||
* [watchOrders](#watchorders)
|
||||
|
||||
<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>apex</code>](#apex)
|
||||
**Returns**: <code>int</code> - the current integer timestamp in milliseconds from the exchange server
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-system-time-v3
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchTime ([params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchBalance" id="fetchbalance"></a>
|
||||
|
||||
### fetchBalance{docsify-ignore}
|
||||
query for account info
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-balance
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchBalance ([params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchAccount" id="fetchaccount"></a>
|
||||
|
||||
### fetchAccount{docsify-ignore}
|
||||
query for balance and get the amount of funds available for trading or funds locked in orders
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-data
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchAccount ([params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchCurrencies" id="fetchcurrencies"></a>
|
||||
|
||||
### fetchCurrencies{docsify-ignore}
|
||||
fetches all available currencies on an exchange
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - an associative dictionary of currencies
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-all-config-data-v3
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchCurrencies ([params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchMarkets" id="fetchmarkets"></a>
|
||||
|
||||
### fetchMarkets{docsify-ignore}
|
||||
retrieves data on all markets for apex
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - an array of objects representing market data
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-all-config-data-v3
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchMarkets ([params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchTicker" id="fetchticker"></a>
|
||||
|
||||
### fetchTicker{docsify-ignore}
|
||||
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
||||
|
||||
| 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
|
||||
apex.fetchTicker (symbol[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchTickers" id="fetchtickers"></a>
|
||||
|
||||
### fetchTickers{docsify-ignore}
|
||||
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbols | <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
|
||||
apex.fetchTickers (symbols[, 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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-candlestick-chart-data-v3
|
||||
|
||||
| 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 |
|
||||
| params.until | <code>int</code> | No | timestamp in ms of the latest candle to fetch |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchOHLCV (symbol, timeframe[, since, limit, 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>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-market-depth-v3
|
||||
|
||||
| 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
|
||||
apex.fetchOrderBook (symbol[, limit, 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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-newest-trading-data-v3
|
||||
|
||||
| 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 |
|
||||
| params.until | <code>int</code> | No | the latest time in ms to fetch trades for |
|
||||
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchTrades (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchOpenInterest" id="fetchopeninterest"></a>
|
||||
|
||||
### fetchOpenInterest{docsify-ignore}
|
||||
retrieves the open interest of a contract trading pair
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - an open interest structure[https://docs.ccxt.com/#/?id=open-interest-structure](https://docs.ccxt.com/#/?id=open-interest-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbol | <code>string</code> | Yes | unified CCXT market symbol |
|
||||
| params | <code>object</code> | No | exchange specific parameters |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchOpenInterest (symbol[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
|
||||
|
||||
### fetchFundingRateHistory{docsify-ignore}
|
||||
fetches historical funding rate prices
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-funding-rate-history-v3
|
||||
|
||||
| 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
|
||||
apex.fetchFundingRateHistory (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="createOrder" id="createorder"></a>
|
||||
|
||||
### createOrder{docsify-ignore}
|
||||
create a trade order
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-creating-orders
|
||||
|
||||
| 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 fullfilled, 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.timeInForce | <code>string</code> | No | "GTC", "IOC", or "POST_ONLY" |
|
||||
| params.postOnly | <code>bool</code> | No | true or false |
|
||||
| params.reduceOnly | <code>bool</code> | No | Ensures that the executed order does not flip the opened position. |
|
||||
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.createOrder (symbol, type, side, amount[, price, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="transfer" id="transfer"></a>
|
||||
|
||||
### transfer{docsify-ignore}
|
||||
transfer currency internally between wallets on the same account
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
|
||||
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| code | <code>string</code> | Yes | unified currency code |
|
||||
| amount | <code>float</code> | Yes | amount to transfer |
|
||||
| fromAccount | <code>string</code> | Yes | account to transfer from |
|
||||
| toAccount | <code>string</code> | Yes | account to transfer to |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
| params.transferId | <code>string</code> | No | UUID, which is unique across the platform |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.transfer (code, amount, fromAccount, toAccount[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="cancelAllOrders" id="cancelallorders"></a>
|
||||
|
||||
### cancelAllOrders{docsify-ignore}
|
||||
cancel all open orders in a market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-cancel-all-open-orders
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbol | <code>string</code> | Yes | unified market symbol of the market to cancel orders in |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.cancelAllOrders (symbol[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="cancelOrder" id="cancelorder"></a>
|
||||
|
||||
### cancelOrder{docsify-ignore}
|
||||
cancels an open order
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - An [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-cancel-order
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| id | <code>string</code> | Yes | order id |
|
||||
| symbol | | Yes | |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.cancelOrder (id, 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>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - An [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**
|
||||
|
||||
- https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-order-id
|
||||
- https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-order-by-clientorderid
|
||||
|
||||
|
||||
| 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.clientOrderId | <code>string</code> | No | a unique id for the order |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchOrder (id, symbol[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchOpenOrders" id="fetchopenorders"></a>
|
||||
|
||||
### fetchOpenOrders{docsify-ignore}
|
||||
fetches information on multiple orders made by the user
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-open-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 |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchOpenOrders (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchOrders" id="fetchorders"></a>
|
||||
|
||||
### fetchOrders{docsify-ignore}
|
||||
fetches information on multiple orders made by the user *classic accounts only*
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-all-order-history
|
||||
|
||||
| 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, default 100 |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
| params.until | <code>object</code> | No | end time, ms |
|
||||
| params.status | <code>boolean</code> | No | "PENDING", "OPEN", "FILLED", "CANCELED", "EXPIRED", "UNTRIGGERED" |
|
||||
| params.side | <code>boolean</code> | No | BUY or SELL |
|
||||
| params.type | <code>string</code> | No | "LIMIT", "MARKET","STOP_LIMIT", "STOP_MARKET", "TAKE_PROFIT_LIMIT","TAKE_PROFIT_MARKET" |
|
||||
| params.orderType | <code>string</code> | No | "ACTIVE","CONDITION","HISTORY" |
|
||||
| params.page | <code>boolean</code> | No | Page numbers start from 0 |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchOrders (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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-trade-history
|
||||
|
||||
| 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
|
||||
apex.fetchOrderTrades (id, symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchMyTrades" id="fetchmytrades"></a>
|
||||
|
||||
### fetchMyTrades{docsify-ignore}
|
||||
fetches information on multiple orders made by the user *classic accounts only*
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-trade-history
|
||||
|
||||
| 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, default 100 |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
| params.until | <code>object</code> | No | end time |
|
||||
| params.side | <code>boolean</code> | No | BUY or SELL |
|
||||
| params.orderType | <code>string</code> | No | "LIMIT", "MARKET","STOP_LIMIT", "STOP_MARKET", "TAKE_PROFIT_LIMIT","TAKE_PROFIT_MARKET" |
|
||||
| params.page | <code>boolean</code> | No | Page numbers start from 0 |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchMyTrades (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchFundingHistory" id="fetchfundinghistory"></a>
|
||||
|
||||
### fetchFundingHistory{docsify-ignore}
|
||||
fetches information on multiple orders made by the user *classic accounts only*
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=funding-history-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-funding-rate
|
||||
|
||||
| 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, default 100 |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
| params.until | <code>object</code> | No | end time, ms |
|
||||
| params.side | <code>boolean</code> | No | BUY or SELL |
|
||||
| params.page | <code>boolean</code> | No | Page numbers start from 0 |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.fetchFundingHistory (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="setLeverage" id="setleverage"></a>
|
||||
|
||||
### setLeverage{docsify-ignore}
|
||||
set the level of leverage for a market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - response from the exchange
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-sets-the-initial-margin-rate-of-a-contract
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| leverage | <code>float</code> | Yes | the rate of leverage |
|
||||
| symbol | <code>string</code> | Yes | unified market symbol |
|
||||
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.setLeverage (leverage, symbol[, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="fetchPositions" id="fetchpositions"></a>
|
||||
|
||||
### fetchPositions{docsify-ignore}
|
||||
fetch all open positions
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-data
|
||||
|
||||
| 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
|
||||
apex.fetchPositions ([symbols, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="watchTrades" id="watchtrades"></a>
|
||||
|
||||
### watchTrades{docsify-ignore}
|
||||
watches information on multiple trades made in a market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| 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
|
||||
apex.watchTrades (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>
|
||||
|
||||
### watchTradesForSymbols{docsify-ignore}
|
||||
get the list of most recent trades for a list of symbols
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbols | <code>Array<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
|
||||
apex.watchTradesForSymbols (symbols[, since, limit, 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>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| 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
|
||||
apex.watchOrderBook (symbol[, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>
|
||||
|
||||
### watchOrderBookForSymbols{docsify-ignore}
|
||||
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbols | <code>Array<string></code> | Yes | unified array of symbols |
|
||||
| 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
|
||||
apex.watchOrderBookForSymbols (symbols[, 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>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| 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
|
||||
apex.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>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| 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
|
||||
apex.watchTickers (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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| 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
|
||||
apex.watchOHLCV (symbol, timeframe[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="watchOHLCVForSymbols" id="watchohlcvforsymbols"></a>
|
||||
|
||||
### watchOHLCVForSymbols{docsify-ignore}
|
||||
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>object</code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbolsAndTimeframes | <code>Array<Array<string>></code> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
|
||||
| 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
|
||||
apex.watchOHLCVForSymbols (symbolsAndTimeframes[, 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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#private-websocket
|
||||
|
||||
| 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.unifiedMargin | <code>boolean</code> | No | use unified margin account |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.watchMyTrades (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
|
||||
<a name="watchPositions" id="watchpositions"></a>
|
||||
|
||||
### watchPositions{docsify-ignore}
|
||||
watch all open positions
|
||||
|
||||
**Kind**: instance method of [<code>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#private-websocket
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| symbols | <code>Array<string></code> | No | list of unified market symbols |
|
||||
| since | <code>int</code> | No | the earliest time in ms to fetch positions for |
|
||||
| limit | <code>int</code> | No | the maximum number of positions to retrieve |
|
||||
| params | <code>object</code> | Yes | extra parameters specific to the exchange API endpoint |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.watchPositions ([symbols, 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>apex</code>](#apex)
|
||||
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
||||
|
||||
**See**: https://api-docs.pro.apex.exchange/#private-websocket
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
```javascript
|
||||
apex.watchOrders (symbol[, since, limit, params])
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user