ccxt 4.5.1 → 4.5.3
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 +110 -112
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -9
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +11 -0
- package/dist/cjs/src/binance.js +25 -25
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/coincatch.js +2 -2
- package/dist/cjs/src/gate.js +27 -12
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/htx.js +4 -4
- package/dist/cjs/src/indodax.js +11 -12
- package/dist/cjs/src/kucoinfutures.js +8 -8
- package/dist/cjs/src/mexc.js +30 -1
- package/dist/cjs/src/okx.js +19 -5
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/binance.js +3 -3
- package/dist/cjs/src/pro/bitfinex.js +140 -0
- package/dist/cjs/src/pro/bitget.js +222 -42
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bybit.js +3 -3
- package/dist/cjs/src/pro/gemini.js +7 -2
- package/dist/cjs/src/pro/hyperliquid.js +5 -0
- package/dist/cjs/src/pro/kraken.js +4 -6
- package/dist/cjs/src/pro/kucoin.js +64 -0
- package/dist/cjs/src/pro/mexc.js +7 -3
- package/dist/cjs/src/zonda.js +12 -0
- package/js/ccxt.d.ts +2 -11
- package/js/ccxt.js +2 -8
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +2 -0
- package/js/src/base/Exchange.js +11 -0
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +25 -25
- package/js/src/bitget.js +2 -2
- package/js/src/coincatch.js +2 -2
- package/js/src/gate.js +27 -12
- package/js/src/gemini.js +3 -3
- package/js/src/htx.js +4 -4
- package/js/src/indodax.js +11 -12
- package/js/src/kucoinfutures.js +8 -8
- package/js/src/mexc.d.ts +3 -0
- package/js/src/mexc.js +30 -1
- package/js/src/okx.d.ts +4 -2
- package/js/src/okx.js +19 -5
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/binance.js +3 -3
- package/js/src/pro/bitfinex.d.ts +30 -0
- package/js/src/pro/bitfinex.js +140 -0
- package/js/src/pro/bitget.d.ts +10 -0
- package/js/src/pro/bitget.js +228 -42
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bybit.d.ts +2 -2
- package/js/src/pro/bybit.js +3 -3
- package/js/src/pro/gemini.d.ts +1 -1
- package/js/src/pro/gemini.js +7 -2
- package/js/src/pro/hyperliquid.js +5 -0
- package/js/src/pro/kraken.js +4 -6
- package/js/src/pro/kucoin.d.ts +22 -0
- package/js/src/pro/kucoin.js +64 -0
- package/js/src/pro/mexc.js +7 -3
- package/js/src/zonda.js +12 -0
- package/package.json +2 -1
- package/js/src/abstract/ellipx.d.ts +0 -28
- package/js/src/abstract/ellipx.js +0 -11
- package/js/src/abstract/vertex.d.ts +0 -22
- package/js/src/abstract/vertex.js +0 -11
- package/js/src/ellipx.d.ts +0 -237
- package/js/src/ellipx.js +0 -2071
- package/js/src/pro/vertex.d.ts +0 -104
- package/js/src/pro/vertex.js +0 -999
- package/js/src/vertex.d.ts +0 -346
- package/js/src/vertex.js +0 -3146
package/js/src/pro/kucoin.js
CHANGED
|
@@ -32,6 +32,11 @@ export default class kucoin extends kucoinRest {
|
|
|
32
32
|
'watchOrderBookForSymbols': true,
|
|
33
33
|
'watchBalance': true,
|
|
34
34
|
'watchOHLCV': true,
|
|
35
|
+
'unWatchTicker': true,
|
|
36
|
+
'unWatchOHLCV': true,
|
|
37
|
+
'unWatchOrderBook': true,
|
|
38
|
+
'unWatchTrades': true,
|
|
39
|
+
'unWatchhTradesForSymbols': true,
|
|
35
40
|
},
|
|
36
41
|
'options': {
|
|
37
42
|
'tradesLimit': 1000,
|
|
@@ -139,6 +144,9 @@ export default class kucoin extends kucoinRest {
|
|
|
139
144
|
}
|
|
140
145
|
return await this.watch(url, messageHash, message, subscriptionHash, subscription);
|
|
141
146
|
}
|
|
147
|
+
async unSubscribe(url, messageHash, topic, subscriptionHash, params = {}, subscription = undefined) {
|
|
148
|
+
return await this.unSubscribeMultiple(url, [messageHash], topic, [subscriptionHash], params, subscription);
|
|
149
|
+
}
|
|
142
150
|
async subscribeMultiple(url, messageHashes, topic, subscriptionHashes, params = {}, subscription = undefined) {
|
|
143
151
|
const requestId = this.requestId().toString();
|
|
144
152
|
const request = {
|
|
@@ -197,6 +205,34 @@ export default class kucoin extends kucoinRest {
|
|
|
197
205
|
const messageHash = 'ticker:' + symbol;
|
|
198
206
|
return await this.subscribe(url, messageHash, topic, query);
|
|
199
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* @method
|
|
210
|
+
* @name kucoin#unWatchTicker
|
|
211
|
+
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
212
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/market-snapshot
|
|
213
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
214
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
215
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
216
|
+
*/
|
|
217
|
+
async unWatchTicker(symbol, params = {}) {
|
|
218
|
+
await this.loadMarkets();
|
|
219
|
+
const market = this.market(symbol);
|
|
220
|
+
symbol = market['symbol'];
|
|
221
|
+
const url = await this.negotiate(false);
|
|
222
|
+
let method = undefined;
|
|
223
|
+
[method, params] = this.handleOptionAndParams(params, 'watchTicker', 'method', '/market/snapshot');
|
|
224
|
+
const topic = method + ':' + market['id'];
|
|
225
|
+
const messageHash = 'unsubscribe:ticker:' + symbol;
|
|
226
|
+
const subMessageHash = 'ticker:' + symbol;
|
|
227
|
+
const subscription = {
|
|
228
|
+
'messageHashes': [messageHash],
|
|
229
|
+
'subMessageHashes': [subMessageHash],
|
|
230
|
+
'topic': 'trades',
|
|
231
|
+
'unsubscribe': true,
|
|
232
|
+
'symbols': [symbol],
|
|
233
|
+
};
|
|
234
|
+
return await this.unSubscribe(url, messageHash, topic, subMessageHash, params, subscription);
|
|
235
|
+
}
|
|
200
236
|
/**
|
|
201
237
|
* @method
|
|
202
238
|
* @name kucoin#watchTickers
|
|
@@ -437,6 +473,34 @@ export default class kucoin extends kucoinRest {
|
|
|
437
473
|
}
|
|
438
474
|
return this.filterBySinceLimit(ohlcv, since, limit, 0, true);
|
|
439
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* @method
|
|
478
|
+
* @name kucoin#unWatchOHLCV
|
|
479
|
+
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
480
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/klines
|
|
481
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
482
|
+
* @param {string} timeframe the length of time each candle represents
|
|
483
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
484
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
485
|
+
*/
|
|
486
|
+
async unWatchOHLCV(symbol, timeframe = '1m', params = {}) {
|
|
487
|
+
await this.loadMarkets();
|
|
488
|
+
const url = await this.negotiate(false);
|
|
489
|
+
const market = this.market(symbol);
|
|
490
|
+
symbol = market['symbol'];
|
|
491
|
+
const period = this.safeString(this.timeframes, timeframe, timeframe);
|
|
492
|
+
const topic = '/market/candles:' + market['id'] + '_' + period;
|
|
493
|
+
const messageHash = 'unsubscribe:candles:' + symbol + ':' + timeframe;
|
|
494
|
+
const subMessageHash = 'candles:' + symbol + ':' + timeframe;
|
|
495
|
+
const subscription = {
|
|
496
|
+
'messageHashes': [messageHash],
|
|
497
|
+
'subMessageHashes': [subMessageHash],
|
|
498
|
+
'topic': 'ohlcv',
|
|
499
|
+
'unsubscribe': true,
|
|
500
|
+
'symbols': [symbol],
|
|
501
|
+
};
|
|
502
|
+
return await this.unSubscribe(url, messageHash, topic, messageHash, params, subscription);
|
|
503
|
+
}
|
|
440
504
|
handleOHLCV(client, message) {
|
|
441
505
|
//
|
|
442
506
|
// {
|
package/js/src/pro/mexc.js
CHANGED
|
@@ -177,7 +177,7 @@ export default class mexc extends mexcRest {
|
|
|
177
177
|
this.handleBidAsk(client, message);
|
|
178
178
|
const rawTicker = this.safeDictN(message, ['d', 'data', 'publicAggreBookTicker']);
|
|
179
179
|
const marketId = this.safeString2(message, 's', 'symbol');
|
|
180
|
-
const timestamp = this.safeInteger2(message, 't', '
|
|
180
|
+
const timestamp = this.safeInteger2(message, 't', 'sendTime');
|
|
181
181
|
const market = this.safeMarket(marketId);
|
|
182
182
|
const symbol = market['symbol'];
|
|
183
183
|
let ticker = undefined;
|
|
@@ -1533,7 +1533,7 @@ export default class mexc extends mexcRest {
|
|
|
1533
1533
|
// "ts": 1680059188190
|
|
1534
1534
|
// }
|
|
1535
1535
|
//
|
|
1536
|
-
const c = this.
|
|
1536
|
+
const c = this.safeString(message, 'c'); // do not add 'channel' here, this is especially for spot
|
|
1537
1537
|
const type = (c === undefined) ? 'swap' : 'spot';
|
|
1538
1538
|
const messageHash = 'balance:' + type;
|
|
1539
1539
|
const data = this.safeDictN(message, ['d', 'data', 'privateAccount']);
|
|
@@ -1548,7 +1548,11 @@ export default class mexc extends mexcRest {
|
|
|
1548
1548
|
const currencyId = this.safeStringN(data, ['a', 'currency', 'vcoinName']);
|
|
1549
1549
|
const code = this.safeCurrencyCode(currencyId);
|
|
1550
1550
|
const account = this.account();
|
|
1551
|
-
|
|
1551
|
+
const balanceAmount = this.safeString(data, 'balanceAmount');
|
|
1552
|
+
if (balanceAmount !== undefined) {
|
|
1553
|
+
account['free'] = balanceAmount;
|
|
1554
|
+
}
|
|
1555
|
+
account['total'] = this.safeStringN(data, ['f', 'availableBalance']);
|
|
1552
1556
|
account['used'] = this.safeStringN(data, ['l', 'frozenBalance', 'frozenAmount']);
|
|
1553
1557
|
this.balance[type][code] = account;
|
|
1554
1558
|
this.balance[type] = this.safeBalance(this.balance[type]);
|
package/js/src/zonda.js
CHANGED
|
@@ -30,6 +30,9 @@ export default class zonda extends Exchange {
|
|
|
30
30
|
'future': false,
|
|
31
31
|
'option': false,
|
|
32
32
|
'addMargin': false,
|
|
33
|
+
'borrowCrossMargin': false,
|
|
34
|
+
'borrowIsolatedMargin': false,
|
|
35
|
+
'borrowMargin': false,
|
|
33
36
|
'cancelAllOrders': false,
|
|
34
37
|
'cancelOrder': true,
|
|
35
38
|
'cancelOrders': false,
|
|
@@ -38,6 +41,7 @@ export default class zonda extends Exchange {
|
|
|
38
41
|
'createDepositAddress': false,
|
|
39
42
|
'createOrder': true,
|
|
40
43
|
'createReduceOnlyOrder': false,
|
|
44
|
+
'fetchAllGreeks': false,
|
|
41
45
|
'fetchBalance': true,
|
|
42
46
|
'fetchBorrowInterest': false,
|
|
43
47
|
'fetchBorrowRate': false,
|
|
@@ -68,12 +72,15 @@ export default class zonda extends Exchange {
|
|
|
68
72
|
'fetchLeverages': false,
|
|
69
73
|
'fetchLeverageTiers': false,
|
|
70
74
|
'fetchLiquidations': false,
|
|
75
|
+
'fetchLongShortRatio': false,
|
|
76
|
+
'fetchLongShortRatioHistory': false,
|
|
71
77
|
'fetchMarginAdjustmentHistory': false,
|
|
72
78
|
'fetchMarginMode': false,
|
|
73
79
|
'fetchMarginModes': false,
|
|
74
80
|
'fetchMarketLeverageTiers': false,
|
|
75
81
|
'fetchMarkets': true,
|
|
76
82
|
'fetchMarkOHLCV': false,
|
|
83
|
+
'fetchMarkPrice': false,
|
|
77
84
|
'fetchMarkPrices': false,
|
|
78
85
|
'fetchMyLiquidations': false,
|
|
79
86
|
'fetchMySettlementHistory': false,
|
|
@@ -81,6 +88,7 @@ export default class zonda extends Exchange {
|
|
|
81
88
|
'fetchOHLCV': true,
|
|
82
89
|
'fetchOpenInterest': false,
|
|
83
90
|
'fetchOpenInterestHistory': false,
|
|
91
|
+
'fetchOpenInterests': false,
|
|
84
92
|
'fetchOpenOrder': false,
|
|
85
93
|
'fetchOpenOrders': true,
|
|
86
94
|
'fetchOption': false,
|
|
@@ -88,8 +96,11 @@ export default class zonda extends Exchange {
|
|
|
88
96
|
'fetchOrderBook': true,
|
|
89
97
|
'fetchOrderBooks': false,
|
|
90
98
|
'fetchPosition': false,
|
|
99
|
+
'fetchPositionHistory': false,
|
|
91
100
|
'fetchPositionMode': false,
|
|
92
101
|
'fetchPositions': false,
|
|
102
|
+
'fetchPositionsForSymbol': false,
|
|
103
|
+
'fetchPositionsHistory': false,
|
|
93
104
|
'fetchPositionsRisk': false,
|
|
94
105
|
'fetchPremiumIndexOHLCV': false,
|
|
95
106
|
'fetchSettlementHistory': false,
|
|
@@ -110,6 +121,7 @@ export default class zonda extends Exchange {
|
|
|
110
121
|
'reduceMargin': false,
|
|
111
122
|
'repayCrossMargin': false,
|
|
112
123
|
'repayIsolatedMargin': false,
|
|
124
|
+
'repayMargin': false,
|
|
113
125
|
'setLeverage': false,
|
|
114
126
|
'setMargin': false,
|
|
115
127
|
'setMarginMode': false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
|
|
5
5
|
"unpkg": "dist/ccxt.browser.min.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"transpileCS": "tsx build/csharpTranspiler.ts --multi",
|
|
32
32
|
"transpileCSWs": "tsx build/csharpTranspiler.ts --ws",
|
|
33
33
|
"buildCS": "dotnet build cs/ccxt.sln",
|
|
34
|
+
"buildCSTests": "dotnet build cs/tests/tests.csproj",
|
|
34
35
|
"buildGO": "go build -C go ./v4",
|
|
35
36
|
"transpileGO": "tsx build/goTranspiler.ts",
|
|
36
37
|
"buildCSRelease": "dotnet build cs --configuration Release",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { implicitReturnType } from '../base/types.js';
|
|
2
|
-
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
|
-
interface Exchange {
|
|
4
|
-
_restGetMarket(params?: {}): Promise<implicitReturnType>;
|
|
5
|
-
_restGetMarketCurrencyPair(params?: {}): Promise<implicitReturnType>;
|
|
6
|
-
_restGetCryptoTokenInfo(params?: {}): Promise<implicitReturnType>;
|
|
7
|
-
publicGetMarketCurrencyPairGetDepth(params?: {}): Promise<implicitReturnType>;
|
|
8
|
-
publicGetMarketCurrencyPairTicker(params?: {}): Promise<implicitReturnType>;
|
|
9
|
-
publicGetMarketCurrencyPairGetTrades(params?: {}): Promise<implicitReturnType>;
|
|
10
|
-
publicGetMarketCurrencyPairGetGraph(params?: {}): Promise<implicitReturnType>;
|
|
11
|
-
publicGetCMCSummary(params?: {}): Promise<implicitReturnType>;
|
|
12
|
-
publicGetCMCCurrencyPairTicker(params?: {}): Promise<implicitReturnType>;
|
|
13
|
-
privateGetUserWallet(params?: {}): Promise<implicitReturnType>;
|
|
14
|
-
privateGetMarketCurrencyPairOrder(params?: {}): Promise<implicitReturnType>;
|
|
15
|
-
privateGetMarketOrderOrderUuid(params?: {}): Promise<implicitReturnType>;
|
|
16
|
-
privateGetMarketCurrencyPairTrade(params?: {}): Promise<implicitReturnType>;
|
|
17
|
-
privateGetMarketTradeFeeQuery(params?: {}): Promise<implicitReturnType>;
|
|
18
|
-
privateGetUnitCurrency(params?: {}): Promise<implicitReturnType>;
|
|
19
|
-
privateGetCryptoTokenCurrency(params?: {}): Promise<implicitReturnType>;
|
|
20
|
-
privateGetCryptoTokenCurrencyChains(params?: {}): Promise<implicitReturnType>;
|
|
21
|
-
privatePostMarketCurrencyPairOrder(params?: {}): Promise<implicitReturnType>;
|
|
22
|
-
privatePostCryptoAddressFetch(params?: {}): Promise<implicitReturnType>;
|
|
23
|
-
privatePostCryptoDisbursementWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
24
|
-
privateDeleteMarketOrderOrderUuid(params?: {}): Promise<implicitReturnType>;
|
|
25
|
-
}
|
|
26
|
-
declare abstract class Exchange extends _Exchange {
|
|
27
|
-
}
|
|
28
|
-
export default Exchange;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// ----------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
-
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
-
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
-
|
|
7
|
-
// -------------------------------------------------------------------------------
|
|
8
|
-
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
9
|
-
class Exchange extends _Exchange {
|
|
10
|
-
}
|
|
11
|
-
export default Exchange;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { implicitReturnType } from '../base/types.js';
|
|
2
|
-
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
|
-
interface Exchange {
|
|
4
|
-
v1ArchivePost(params?: {}): Promise<implicitReturnType>;
|
|
5
|
-
v1GatewayGetQuery(params?: {}): Promise<implicitReturnType>;
|
|
6
|
-
v1GatewayGetSymbols(params?: {}): Promise<implicitReturnType>;
|
|
7
|
-
v1GatewayGetTime(params?: {}): Promise<implicitReturnType>;
|
|
8
|
-
v1GatewayPostQuery(params?: {}): Promise<implicitReturnType>;
|
|
9
|
-
v1GatewayPostExecute(params?: {}): Promise<implicitReturnType>;
|
|
10
|
-
v1TriggerPostExecute(params?: {}): Promise<implicitReturnType>;
|
|
11
|
-
v1TriggerPostQuery(params?: {}): Promise<implicitReturnType>;
|
|
12
|
-
v2ArchiveGetTickers(params?: {}): Promise<implicitReturnType>;
|
|
13
|
-
v2ArchiveGetContracts(params?: {}): Promise<implicitReturnType>;
|
|
14
|
-
v2ArchiveGetTrades(params?: {}): Promise<implicitReturnType>;
|
|
15
|
-
v2ArchiveGetVrtx(params?: {}): Promise<implicitReturnType>;
|
|
16
|
-
v2GatewayGetAssets(params?: {}): Promise<implicitReturnType>;
|
|
17
|
-
v2GatewayGetPairs(params?: {}): Promise<implicitReturnType>;
|
|
18
|
-
v2GatewayGetOrderbook(params?: {}): Promise<implicitReturnType>;
|
|
19
|
-
}
|
|
20
|
-
declare abstract class Exchange extends _Exchange {
|
|
21
|
-
}
|
|
22
|
-
export default Exchange;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// ----------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
-
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
-
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
-
|
|
7
|
-
// -------------------------------------------------------------------------------
|
|
8
|
-
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
9
|
-
class Exchange extends _Exchange {
|
|
10
|
-
}
|
|
11
|
-
export default Exchange;
|
package/js/src/ellipx.d.ts
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import Exchange from './abstract/ellipx.js';
|
|
2
|
-
import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from './base/types.js';
|
|
3
|
-
/**
|
|
4
|
-
* @class ellipx
|
|
5
|
-
* @augments Exchange
|
|
6
|
-
*/
|
|
7
|
-
export default class ellipx extends Exchange {
|
|
8
|
-
describe(): any;
|
|
9
|
-
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
10
|
-
url: string;
|
|
11
|
-
method: string;
|
|
12
|
-
body: any;
|
|
13
|
-
headers: any;
|
|
14
|
-
};
|
|
15
|
-
calculateMod(a: any, b: any): number;
|
|
16
|
-
/**
|
|
17
|
-
* @method
|
|
18
|
-
* @name ellipx#fetchMarkets
|
|
19
|
-
* @description Fetches market information from the exchange.
|
|
20
|
-
* @see https://docs.ccxt.com/en/latest/manual.html#markets
|
|
21
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.1a1t05wpgfof
|
|
22
|
-
* @param {object} [params] - Extra parameters specific to the exchange API endpoint
|
|
23
|
-
* @returns {Promise<Market[]>} An array of market structures.
|
|
24
|
-
*/
|
|
25
|
-
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
26
|
-
parseMarket(market: Dict): Market;
|
|
27
|
-
/**
|
|
28
|
-
* @method
|
|
29
|
-
* @name ellipx#fetchTicker
|
|
30
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
31
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.d2jylz4u6pmu
|
|
32
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
33
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
34
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
35
|
-
*/
|
|
36
|
-
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
37
|
-
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
38
|
-
/**
|
|
39
|
-
* @method
|
|
40
|
-
* @name ellipx#fetchOrderBook
|
|
41
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
42
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.bqmucewhkpdz
|
|
43
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
44
|
-
* @param {int} [limit] the maximum amount of order book entries to return the exchange not supported yet.
|
|
45
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
46
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
47
|
-
*/
|
|
48
|
-
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
49
|
-
/**
|
|
50
|
-
* @method
|
|
51
|
-
* @name ellipx#fetchOHLCV
|
|
52
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market, default will return the last 24h period.
|
|
53
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.w65baeuhxwt8
|
|
54
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
55
|
-
* @param {string} timeframe the length of time each candle represents
|
|
56
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
57
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
58
|
-
* @param {object} [params] extra parameters specific to the API endpoint
|
|
59
|
-
* @param {int} [params.until] timestamp in ms of the earliest candle to fetch
|
|
60
|
-
* @returns {OHLCV[]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
61
|
-
*/
|
|
62
|
-
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
63
|
-
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
64
|
-
/**
|
|
65
|
-
* @method
|
|
66
|
-
* @name ellipx#fetchCurrencies
|
|
67
|
-
* @description fetches information on all currencies from the exchange, including deposit/withdrawal details and available chains
|
|
68
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.x65f9s9j74jf
|
|
69
|
-
* @param {object} [params] extra parameters specific to the ellipx API endpoint
|
|
70
|
-
* @param {string} [params.Can_Deposit] filter currencies by deposit availability, Y for available
|
|
71
|
-
* @param {number} [params.results_per_page] number of results per page, default 100
|
|
72
|
-
* @param {string} [params._expand] additional fields to expand in response, default '/Crypto_Token,/Crypto_Chain'
|
|
73
|
-
* @returns {Promise<Currencies>} An object of currency structures indexed by currency codes
|
|
74
|
-
*/
|
|
75
|
-
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
76
|
-
/**
|
|
77
|
-
* @method
|
|
78
|
-
* @name ellipx#fetchTrades
|
|
79
|
-
* @description fetches all completed trades for a particular market/symbol
|
|
80
|
-
* @param {string} symbol unified market symbol (e.g. 'BTC/USDT')
|
|
81
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
82
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
83
|
-
* @param {object} [params] extra parameters specific to the EllipX API endpoint
|
|
84
|
-
* @param {string} [params.before] get trades before the given trade ID
|
|
85
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
86
|
-
*/
|
|
87
|
-
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
88
|
-
parseTrade(trade: any, market?: any): Trade;
|
|
89
|
-
/**
|
|
90
|
-
* @method
|
|
91
|
-
* @name ellipx#fetchBalance
|
|
92
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
93
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.ihrjov144txg
|
|
94
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
95
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
96
|
-
*/
|
|
97
|
-
fetchBalance(params?: {}): Promise<Balances>;
|
|
98
|
-
/**
|
|
99
|
-
* @method
|
|
100
|
-
* @name ellipx#createOrder
|
|
101
|
-
* @description create a new order in a market
|
|
102
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.yzfak2n2bwpo
|
|
103
|
-
* @param {string} symbol unified market symbol (e.g. 'BTC/USDT')
|
|
104
|
-
* @param {string} type order type - the exchange automatically sets type to 'limit' if price defined, 'market' if undefined
|
|
105
|
-
* @param {string} side 'buy' or 'sell'
|
|
106
|
-
* @param {float} [amount] amount of base currency to trade (can be undefined if using Spend_Limit)
|
|
107
|
-
* @param {float} [price] price per unit of base currency for limit orders
|
|
108
|
-
* @param {object} [params] extra parameters specific to the EllipX API endpoint
|
|
109
|
-
* @param {float} [params.cost] maximum amount to spend in quote currency (required for market orders if amount undefined)
|
|
110
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
111
|
-
*/
|
|
112
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
113
|
-
/**
|
|
114
|
-
* @method
|
|
115
|
-
* @name ellipx#fetchOrder
|
|
116
|
-
* @description fetches information on an order made by the user
|
|
117
|
-
* @param {string} id the order ID as returned by createOrder or fetchOrders
|
|
118
|
-
* @param {string|undefined} symbol not used by ellipx.fetchOrder
|
|
119
|
-
* @param {object} [params] extra parameters specific to the EllipX API endpoint
|
|
120
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
121
|
-
*/
|
|
122
|
-
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
123
|
-
/**
|
|
124
|
-
* @method
|
|
125
|
-
* @name ellipx#fetchOrdersByStatus
|
|
126
|
-
* @description fetches a list of orders placed on the exchange
|
|
127
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.5z2nh2b5s81n
|
|
128
|
-
* @param {string} status 'open' or 'closed', omit for all orders
|
|
129
|
-
* @param {string} symbol unified market symbol
|
|
130
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
131
|
-
* @param {int} [limit] the maximum amount of orders to fetch
|
|
132
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
133
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
134
|
-
*/
|
|
135
|
-
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
136
|
-
/**
|
|
137
|
-
* @method
|
|
138
|
-
* @name ellipx#fetchOrders
|
|
139
|
-
* @description fetches information on multiple orders made by the user
|
|
140
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.5z2nh2b5s81n
|
|
141
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
142
|
-
* @param {int|undefined} since timestamp in ms of the earliest order
|
|
143
|
-
* @param {int|undefined} limit the maximum amount of orders to fetch
|
|
144
|
-
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
145
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
146
|
-
*/
|
|
147
|
-
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
148
|
-
/**
|
|
149
|
-
* @method
|
|
150
|
-
* @name ellipx#fetchOpenOrders
|
|
151
|
-
* @description fetches information on open orders made by the user
|
|
152
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.5z2nh2b5s81n
|
|
153
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
154
|
-
* @param {int|undefined} since timestamp in ms of the earliest order
|
|
155
|
-
* @param {int|undefined} limit the maximum amount of orders to fetch
|
|
156
|
-
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
157
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
158
|
-
*/
|
|
159
|
-
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
160
|
-
parseOrder(order: any, market?: any): Order;
|
|
161
|
-
/**
|
|
162
|
-
* @method
|
|
163
|
-
* @name ellipx#cancelOrder
|
|
164
|
-
* @description Cancels an open order on the exchange
|
|
165
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.f1qu1pb1rebn
|
|
166
|
-
* @param {string} id - The order ID to cancel (format: mktor-xxxxx-xxxx-xxxx-xxxx-xxxxxxxx)
|
|
167
|
-
* @param {string} [symbol] - ellipx.cancelOrder does not use the symbol parameter
|
|
168
|
-
* @param {object} [params] - Extra parameters specific to the exchange API
|
|
169
|
-
* @returns {Promise<object>} A Promise that resolves to the canceled order info
|
|
170
|
-
*/
|
|
171
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
172
|
-
/**
|
|
173
|
-
* @method
|
|
174
|
-
* @name ellipx#fetchOrderTrades
|
|
175
|
-
* @description fetch all the trades made from a single order
|
|
176
|
-
* @param {string} id order id
|
|
177
|
-
* @param {string} symbol unified market symbol
|
|
178
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
179
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
180
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
181
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
182
|
-
*/
|
|
183
|
-
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
184
|
-
/**
|
|
185
|
-
* @method
|
|
186
|
-
* @name ellipx#fetchDepositAddress
|
|
187
|
-
* @description fetches a crypto deposit address for a specific currency
|
|
188
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.k7qe5aricayh
|
|
189
|
-
* @param {string} code unified currency code (e.g. "BTC", "ETH", "USDT")
|
|
190
|
-
* @param {object} [params] extra parameters specific to the EllipX API endpoint
|
|
191
|
-
* @returns {object} an address structure {
|
|
192
|
-
* 'currency': string, // unified currency code
|
|
193
|
-
* 'address': string, // the address for deposits
|
|
194
|
-
* 'tag': string|undefined, // tag/memo for deposits if needed
|
|
195
|
-
* 'network': object, // network object from currency info
|
|
196
|
-
* 'info': object // raw response from exchange
|
|
197
|
-
* }
|
|
198
|
-
* @throws {ExchangeError} if currency does not support deposits
|
|
199
|
-
*/
|
|
200
|
-
fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
201
|
-
/**
|
|
202
|
-
* @method
|
|
203
|
-
* @name ellipx#fetchTradingFee
|
|
204
|
-
* @description Fetches the current trading fees (maker and taker) applicable to the user.
|
|
205
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.kki5jay2c8it
|
|
206
|
-
* @param {string} [symbol] Not used by EllipX as fees are not symbol-specific.
|
|
207
|
-
* @param {object} [params] Extra parameters specific to the EllipX API endpoint.
|
|
208
|
-
* @returns {Promise<object>} A promise resolving to a unified trading fee structure:
|
|
209
|
-
* {
|
|
210
|
-
* 'info': object, // the raw response from the exchange
|
|
211
|
-
* 'symbol': undefined, // symbol is not used for this exchange
|
|
212
|
-
* 'maker': number, // maker fee rate in decimal form
|
|
213
|
-
* 'taker': number, // taker fee rate in decimal form
|
|
214
|
-
* 'percentage': true, // indicates fees are in percentage
|
|
215
|
-
* 'tierBased': false, // indicates fees do not vary by volume tiers
|
|
216
|
-
* }
|
|
217
|
-
*/
|
|
218
|
-
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
219
|
-
/**
|
|
220
|
-
* @method
|
|
221
|
-
* @name ellipx#withdraw
|
|
222
|
-
* @description Make a withdrawal request
|
|
223
|
-
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
|
|
224
|
-
* @param {string} code unified currency code
|
|
225
|
-
* @param {number} amount Amount to withdraw
|
|
226
|
-
* @param {string} address Destination wallet address
|
|
227
|
-
* @param {string} [tag] Additional tag/memo for currencies that require it
|
|
228
|
-
* @param {object} params Extra parameters specific to the EllipX API endpoint (Crypto_Chain__, Unit__)
|
|
229
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
230
|
-
*/
|
|
231
|
-
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
232
|
-
parseTransactionStatus(status: string): string;
|
|
233
|
-
parseOrderStatus(status: any): string;
|
|
234
|
-
parseAmount(amount: any): Str;
|
|
235
|
-
toAmount(amount: number, precision: number): Dict;
|
|
236
|
-
handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
237
|
-
}
|