ccxt 4.4.75 → 4.4.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +8 -4
- package/dist/cjs/src/abstract/apex.js +9 -0
- package/dist/cjs/src/apex.js +1949 -0
- package/dist/cjs/src/base/Exchange.js +49 -3
- package/dist/cjs/src/binance.js +44 -220
- package/dist/cjs/src/bitget.js +139 -71
- package/dist/cjs/src/bitmex.js +4 -4
- package/dist/cjs/src/bitrue.js +48 -0
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +32 -3
- package/dist/cjs/src/coincatch.js +68 -0
- package/dist/cjs/src/coinex.js +3 -0
- package/dist/cjs/src/coinlist.js +85 -1
- package/dist/cjs/src/hitbtc.js +3 -0
- package/dist/cjs/src/hyperliquid.js +13 -4
- package/dist/cjs/src/mexc.js +50 -57
- package/dist/cjs/src/okx.js +23 -8
- package/dist/cjs/src/paradex.js +3 -12
- package/dist/cjs/src/phemex.js +2 -1
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/apex.js +1043 -0
- package/dist/cjs/src/pro/coinbase.js +4 -8
- package/dist/cjs/src/pro/gate.js +27 -2
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/p2b.js +2 -2
- package/dist/cjs/src/pro/tradeogre.js +283 -0
- package/dist/cjs/src/probit.js +1 -0
- package/dist/cjs/src/static_dependencies/zklink/zklink-sdk-web.js +2645 -0
- package/dist/cjs/src/tradeogre.js +2 -1
- package/dist/cjs/src/upbit.js +299 -93
- package/dist/cjs/src/whitebit.js +1 -0
- package/dist/cjs/src/woo.js +3 -1
- package/dist/cjs/src/xt.js +131 -4
- package/js/ccxt.d.ts +11 -5
- package/js/ccxt.js +8 -4
- package/js/src/abstract/apex.d.ts +34 -0
- package/js/src/abstract/myokx.d.ts +4 -0
- package/js/src/abstract/okx.d.ts +4 -0
- package/js/src/abstract/upbit.d.ts +15 -1
- package/js/src/abstract/xt.d.ts +3 -0
- package/js/src/apex.d.ts +333 -0
- package/js/src/apex.js +1951 -0
- package/js/src/ascendex.d.ts +3 -3
- package/js/src/base/Exchange.d.ts +3 -0
- package/js/src/base/Exchange.js +49 -2
- package/js/src/binance.d.ts +9 -7
- package/js/src/binance.js +44 -220
- package/js/src/bitfinex.d.ts +3 -3
- package/js/src/bitflyer.d.ts +2 -2
- package/js/src/bitget.d.ts +2 -0
- package/js/src/bitget.js +139 -71
- package/js/src/bitmart.d.ts +4 -4
- package/js/src/bitmex.d.ts +3 -3
- package/js/src/bitmex.js +4 -4
- package/js/src/bitrue.js +48 -0
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +6 -4
- package/js/src/coinbase.js +32 -3
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coincatch.d.ts +11 -0
- package/js/src/coincatch.js +68 -0
- package/js/src/coinex.js +3 -0
- package/js/src/coinlist.d.ts +12 -1
- package/js/src/coinlist.js +85 -1
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/deribit.d.ts +4 -4
- package/js/src/derive.d.ts +3 -3
- package/js/src/digifinex.d.ts +4 -4
- package/js/src/hitbtc.js +3 -0
- package/js/src/htx.d.ts +4 -4
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +13 -4
- package/js/src/kraken.d.ts +3 -3
- package/js/src/krakenfutures.d.ts +2 -2
- package/js/src/kucoinfutures.d.ts +5 -5
- package/js/src/mexc.d.ts +1 -0
- package/js/src/mexc.js +50 -57
- package/js/src/okx.js +23 -8
- package/js/src/oxfun.d.ts +3 -3
- package/js/src/paradex.js +3 -12
- package/js/src/phemex.d.ts +3 -3
- package/js/src/phemex.js +2 -1
- package/js/src/poloniex.d.ts +3 -3
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/apex.d.ts +160 -0
- package/js/src/pro/apex.js +1044 -0
- package/js/src/pro/coinbase.js +4 -8
- package/js/src/pro/gate.js +27 -2
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/p2b.js +2 -2
- package/js/src/pro/tradeogre.d.ts +49 -0
- package/js/src/pro/tradeogre.js +284 -0
- package/js/src/probit.js +1 -0
- package/js/src/static_dependencies/zklink/zklink-sdk-web.d.ts +1279 -0
- package/js/src/static_dependencies/zklink/zklink-sdk-web.js +4282 -0
- package/js/src/tradeogre.js +2 -1
- package/js/src/upbit.d.ts +34 -4
- package/js/src/upbit.js +299 -93
- package/js/src/vertex.d.ts +3 -3
- package/js/src/whitebit.js +1 -0
- package/js/src/woo.d.ts +4 -4
- package/js/src/woo.js +3 -1
- package/js/src/woofipro.d.ts +4 -4
- package/js/src/xt.d.ts +23 -4
- package/js/src/xt.js +131 -4
- package/package.json +2 -2
- package/js/src/abstract/ace.d.ts +0 -18
- package/js/src/ace.d.ts +0 -158
- package/js/src/ace.js +0 -1181
- /package/js/src/abstract/{ace.js → apex.js} +0 -0
package/js/src/apex.d.ts
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import Exchange from './abstract/apex.js';
|
|
2
|
+
import { MarketInterface, Account, Balances, Currencies, Currency, Dict, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TransferEntry, Position, int } from './base/types';
|
|
3
|
+
/**
|
|
4
|
+
* @class apex
|
|
5
|
+
* @augments Exchange
|
|
6
|
+
*/
|
|
7
|
+
export default class apex extends Exchange {
|
|
8
|
+
describe(): any;
|
|
9
|
+
/**
|
|
10
|
+
* @method
|
|
11
|
+
* @name apex#fetchTime
|
|
12
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
13
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-system-time-v3
|
|
14
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
15
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
16
|
+
*/
|
|
17
|
+
fetchTime(params?: {}): Promise<number>;
|
|
18
|
+
parseBalance(response: any): Balances;
|
|
19
|
+
/**
|
|
20
|
+
* @method
|
|
21
|
+
* @name apex#fetchBalance
|
|
22
|
+
* @description query for account info
|
|
23
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-balance
|
|
24
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
25
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
26
|
+
*/
|
|
27
|
+
fetchBalance(params?: {}): Promise<Balances>;
|
|
28
|
+
parseAccount(account: Dict): Account;
|
|
29
|
+
/**
|
|
30
|
+
* @method
|
|
31
|
+
* @name apex#fetchAccount
|
|
32
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
33
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-data
|
|
34
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
35
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
36
|
+
*/
|
|
37
|
+
fetchAccount(params?: {}): Promise<Account>;
|
|
38
|
+
/**
|
|
39
|
+
* @method
|
|
40
|
+
* @name apex#fetchCurrencies
|
|
41
|
+
* @description fetches all available currencies on an exchange
|
|
42
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-all-config-data-v3
|
|
43
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
44
|
+
* @returns {object} an associative dictionary of currencies
|
|
45
|
+
*/
|
|
46
|
+
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
47
|
+
/**
|
|
48
|
+
* @method
|
|
49
|
+
* @name apex#fetchMarkets
|
|
50
|
+
* @description retrieves data on all markets for apex
|
|
51
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-all-config-data-v3
|
|
52
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
53
|
+
* @returns {object[]} an array of objects representing market data
|
|
54
|
+
*/
|
|
55
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
56
|
+
parseMarket(market: Dict): Market;
|
|
57
|
+
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
58
|
+
/**
|
|
59
|
+
* @method
|
|
60
|
+
* @name apex#fetchTicker
|
|
61
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
62
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
|
63
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
64
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
65
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
66
|
+
*/
|
|
67
|
+
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
68
|
+
/**
|
|
69
|
+
* @method
|
|
70
|
+
* @name apex#fetchTickers
|
|
71
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
72
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
|
73
|
+
* @param {string} symbols unified symbol of the market to fetch the ticker for
|
|
74
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
75
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
76
|
+
*/
|
|
77
|
+
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
78
|
+
/**
|
|
79
|
+
* @method
|
|
80
|
+
* @name apex#fetchOHLCV
|
|
81
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
82
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-candlestick-chart-data-v3
|
|
83
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
84
|
+
* @param {string} timeframe the length of time each candle represents
|
|
85
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
86
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
87
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
88
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
89
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
90
|
+
*/
|
|
91
|
+
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
92
|
+
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
93
|
+
/**
|
|
94
|
+
* @method
|
|
95
|
+
* @name apex#fetchOrderBook
|
|
96
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
97
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-market-depth-v3
|
|
98
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
99
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
100
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
101
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
102
|
+
*/
|
|
103
|
+
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
104
|
+
/**
|
|
105
|
+
* @method
|
|
106
|
+
* @name apex#fetchTrades
|
|
107
|
+
* @description get the list of most recent trades for a particular symbol
|
|
108
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-newest-trading-data-v3
|
|
109
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
110
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
111
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
112
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
113
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
114
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
|
|
115
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
116
|
+
*/
|
|
117
|
+
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
118
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
119
|
+
/**
|
|
120
|
+
* @method
|
|
121
|
+
* @name apex#fetchOpenInterest
|
|
122
|
+
* @description retrieves the open interest of a contract trading pair
|
|
123
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-ticker-data-v3
|
|
124
|
+
* @param {string} symbol unified CCXT market symbol
|
|
125
|
+
* @param {object} [params] exchange specific parameters
|
|
126
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
127
|
+
*/
|
|
128
|
+
fetchOpenInterest(symbol: string, params?: {}): Promise<import("./base/types").OpenInterest>;
|
|
129
|
+
parseOpenInterest(interest: any, market?: Market): import("./base/types").OpenInterest;
|
|
130
|
+
/**
|
|
131
|
+
* @method
|
|
132
|
+
* @name apex#fetchFundingRateHistory
|
|
133
|
+
* @description fetches historical funding rate prices
|
|
134
|
+
* @see https://api-docs.pro.apex.exchange/#publicapi-v3-for-omni-get-funding-rate-history-v3
|
|
135
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
136
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
137
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
138
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
139
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
140
|
+
* @param {boolean} [params.paginate] 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)
|
|
141
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
142
|
+
*/
|
|
143
|
+
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
144
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
145
|
+
parseTimeInForce(timeInForce: Str): string;
|
|
146
|
+
parseOrderStatus(status: Str): string;
|
|
147
|
+
parseOrderType(type: Str): string;
|
|
148
|
+
safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
|
|
149
|
+
generateRandomClientIdOmni(_accountId: string): string;
|
|
150
|
+
addHyphenBeforeUsdt(symbol: string): string;
|
|
151
|
+
getSeeds(): string;
|
|
152
|
+
getAccountId(): Promise<any>;
|
|
153
|
+
/**
|
|
154
|
+
* @method
|
|
155
|
+
* @name apex#createOrder
|
|
156
|
+
* @description create a trade order
|
|
157
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-creating-orders
|
|
158
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
159
|
+
* @param {string} type 'market' or 'limit'
|
|
160
|
+
* @param {string} side 'buy' or 'sell'
|
|
161
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
162
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
163
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
164
|
+
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
165
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", or "POST_ONLY"
|
|
166
|
+
* @param {bool} [params.postOnly] true or false
|
|
167
|
+
* @param {bool} [params.reduceOnly] Ensures that the executed order does not flip the opened position.
|
|
168
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
169
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
170
|
+
*/
|
|
171
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
172
|
+
/**
|
|
173
|
+
* @method
|
|
174
|
+
* @name apex#transfer
|
|
175
|
+
* @description transfer currency internally between wallets on the same account
|
|
176
|
+
* @param {string} code unified currency code
|
|
177
|
+
* @param {float} amount amount to transfer
|
|
178
|
+
* @param {string} fromAccount account to transfer from
|
|
179
|
+
* @param {string} toAccount account to transfer to
|
|
180
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
181
|
+
* @param {string} [params.transferId] UUID, which is unique across the platform
|
|
182
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
183
|
+
*/
|
|
184
|
+
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
185
|
+
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
186
|
+
/**
|
|
187
|
+
* @method
|
|
188
|
+
* @name apex#cancelAllOrders
|
|
189
|
+
* @description cancel all open orders in a market
|
|
190
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-cancel-all-open-orders
|
|
191
|
+
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
192
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
193
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
194
|
+
*/
|
|
195
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<import("./base/types").Dictionary<any>>;
|
|
196
|
+
/**
|
|
197
|
+
* @method
|
|
198
|
+
* @name apex#cancelOrder
|
|
199
|
+
* @description cancels an open order
|
|
200
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-cancel-order
|
|
201
|
+
* @param {string} id order id
|
|
202
|
+
* @param symbol
|
|
203
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
204
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
205
|
+
*/
|
|
206
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<import("./base/types").Dictionary<any>>;
|
|
207
|
+
/**
|
|
208
|
+
* @method
|
|
209
|
+
* @name apex#fetchOrder
|
|
210
|
+
* @description fetches information on an order made by the user
|
|
211
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-order-id
|
|
212
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-order-by-clientorderid
|
|
213
|
+
* @param {string} id the order id
|
|
214
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
215
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
216
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
217
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
218
|
+
*/
|
|
219
|
+
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
220
|
+
/**
|
|
221
|
+
* @method
|
|
222
|
+
* @name apex#fetchOpenOrders
|
|
223
|
+
* @description fetches information on multiple orders made by the user
|
|
224
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-open-orders
|
|
225
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
226
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
227
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
228
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
229
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
230
|
+
*/
|
|
231
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
232
|
+
/**
|
|
233
|
+
* @method
|
|
234
|
+
* @name apex#fetchOrders
|
|
235
|
+
* @description fetches information on multiple orders made by the user *classic accounts only*
|
|
236
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-all-order-history
|
|
237
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
238
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
239
|
+
* @param {int} [limit] the maximum number of order structures to retrieve, default 100
|
|
240
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
241
|
+
* @param {object} [params.until] end time, ms
|
|
242
|
+
* @param {boolean} [params.status] "PENDING", "OPEN", "FILLED", "CANCELED", "EXPIRED", "UNTRIGGERED"
|
|
243
|
+
* @param {boolean} [params.side] BUY or SELL
|
|
244
|
+
* @param {string} [params.type] "LIMIT", "MARKET","STOP_LIMIT", "STOP_MARKET", "TAKE_PROFIT_LIMIT","TAKE_PROFIT_MARKET"
|
|
245
|
+
* @param {string} [params.orderType] "ACTIVE","CONDITION","HISTORY"
|
|
246
|
+
* @param {boolean} [params.page] Page numbers start from 0
|
|
247
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
248
|
+
*/
|
|
249
|
+
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
250
|
+
/**
|
|
251
|
+
* @method
|
|
252
|
+
* @name apex#fetchOrderTrades
|
|
253
|
+
* @description fetch all the trades made from a single order
|
|
254
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-trade-history
|
|
255
|
+
* @param {string} id order id
|
|
256
|
+
* @param {string} symbol unified market symbol
|
|
257
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
258
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
259
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
260
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
261
|
+
*/
|
|
262
|
+
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
263
|
+
/**
|
|
264
|
+
* @method
|
|
265
|
+
* @name apex#fetchMyTrades
|
|
266
|
+
* @description fetches information on multiple orders made by the user *classic accounts only*
|
|
267
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-trade-history
|
|
268
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
269
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
270
|
+
* @param {int} [limit] the maximum number of order structures to retrieve, default 100
|
|
271
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
272
|
+
* @param {object} [params.until] end time
|
|
273
|
+
* @param {boolean} [params.side] BUY or SELL
|
|
274
|
+
* @param {string} [params.orderType] "LIMIT", "MARKET","STOP_LIMIT", "STOP_MARKET", "TAKE_PROFIT_LIMIT","TAKE_PROFIT_MARKET"
|
|
275
|
+
* @param {boolean} [params.page] Page numbers start from 0
|
|
276
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
277
|
+
*/
|
|
278
|
+
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
279
|
+
/**
|
|
280
|
+
* @method
|
|
281
|
+
* @name apex#fetchFundingHistory
|
|
282
|
+
* @description fetches information on multiple orders made by the user *classic accounts only*
|
|
283
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-funding-rate
|
|
284
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
285
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
286
|
+
* @param {int} [limit] the maximum number of order structures to retrieve, default 100
|
|
287
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
288
|
+
* @param {object} [params.until] end time, ms
|
|
289
|
+
* @param {boolean} [params.side] BUY or SELL
|
|
290
|
+
* @param {boolean} [params.page] Page numbers start from 0
|
|
291
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
292
|
+
*/
|
|
293
|
+
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types").FundingHistory[]>;
|
|
294
|
+
parseIncome(income: any, market?: Market): {
|
|
295
|
+
info: any;
|
|
296
|
+
symbol: string;
|
|
297
|
+
code: string;
|
|
298
|
+
timestamp: number;
|
|
299
|
+
datetime: string;
|
|
300
|
+
id: string;
|
|
301
|
+
amount: number;
|
|
302
|
+
rate: number;
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* @method
|
|
306
|
+
* @name apex#setLeverage
|
|
307
|
+
* @description set the level of leverage for a market
|
|
308
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-post-sets-the-initial-margin-rate-of-a-contract
|
|
309
|
+
* @param {float} leverage the rate of leverage
|
|
310
|
+
* @param {string} symbol unified market symbol
|
|
311
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
312
|
+
* @returns {object} response from the exchange
|
|
313
|
+
*/
|
|
314
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<import("./base/types").Dictionary<any>>;
|
|
315
|
+
/**
|
|
316
|
+
* @method
|
|
317
|
+
* @name apex#fetchPositions
|
|
318
|
+
* @description fetch all open positions
|
|
319
|
+
* @see https://api-docs.pro.apex.exchange/#privateapi-v3-for-omni-get-retrieve-user-account-data
|
|
320
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
321
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
322
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
323
|
+
*/
|
|
324
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
325
|
+
parsePosition(position: Dict, market?: Market): Position;
|
|
326
|
+
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
327
|
+
url: string;
|
|
328
|
+
method: string;
|
|
329
|
+
body: any;
|
|
330
|
+
headers: any;
|
|
331
|
+
};
|
|
332
|
+
handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
333
|
+
}
|