ccxt 4.5.1 → 4.5.2
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/binance.js +20 -14
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/indodax.js +11 -12
- package/dist/cjs/src/okx.js +2 -2
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/bitget.js +161 -26
- package/dist/cjs/src/pro/bitmart.js +1 -1
- 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/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/binance.d.ts +1 -1
- package/js/src/binance.js +20 -14
- package/js/src/bitget.js +1 -1
- package/js/src/indodax.js +11 -12
- package/js/src/okx.js +2 -2
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/bitget.d.ts +4 -0
- package/js/src/pro/bitget.js +167 -26
- package/js/src/pro/bitmart.js +1 -1
- 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/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/bitget.js
CHANGED
|
@@ -64,6 +64,7 @@ export default class bitget extends bitgetRest {
|
|
|
64
64
|
// WS timeframes differ from REST timeframes
|
|
65
65
|
'timeframes': {
|
|
66
66
|
'1m': '1m',
|
|
67
|
+
'3m': '3m',
|
|
67
68
|
'5m': '5m',
|
|
68
69
|
'15m': '15m',
|
|
69
70
|
'30m': '30m',
|
|
@@ -486,11 +487,13 @@ export default class bitget extends bitgetRest {
|
|
|
486
487
|
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
487
488
|
* @see https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
|
|
488
489
|
* @see https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
|
|
490
|
+
* @see https://www.bitget.com/api-doc/uta/websocket/public/Candlesticks-Channel
|
|
489
491
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
490
492
|
* @param {string} timeframe the length of time each candle represents
|
|
491
493
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
492
494
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
493
495
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
496
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
494
497
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
495
498
|
*/
|
|
496
499
|
async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -499,14 +502,26 @@ export default class bitget extends bitgetRest {
|
|
|
499
502
|
symbol = market['symbol'];
|
|
500
503
|
const timeframes = this.safeValue(this.options, 'timeframes');
|
|
501
504
|
const interval = this.safeString(timeframes, timeframe);
|
|
502
|
-
|
|
505
|
+
let messageHash = undefined;
|
|
503
506
|
let instType = undefined;
|
|
504
|
-
|
|
507
|
+
let uta = undefined;
|
|
508
|
+
[uta, params] = this.handleOptionAndParams(params, 'watchOHLCV', 'uta', false);
|
|
509
|
+
[instType, params] = this.getInstType(market, uta, params);
|
|
505
510
|
const args = {
|
|
506
511
|
'instType': instType,
|
|
507
|
-
'channel': 'candle' + interval,
|
|
508
|
-
'instId': market['id'],
|
|
509
512
|
};
|
|
513
|
+
if (uta) {
|
|
514
|
+
args['topic'] = 'kline';
|
|
515
|
+
args['symbol'] = market['id'];
|
|
516
|
+
args['interval'] = interval;
|
|
517
|
+
params['uta'] = true;
|
|
518
|
+
messageHash = 'kline:' + symbol;
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
args['channel'] = 'candle' + interval;
|
|
522
|
+
args['instId'] = market['id'];
|
|
523
|
+
messageHash = 'candles:' + timeframe + ':' + symbol;
|
|
524
|
+
}
|
|
510
525
|
const ohlcv = await this.watchPublic(messageHash, args, params);
|
|
511
526
|
if (this.newUpdates) {
|
|
512
527
|
limit = ohlcv.getLimit(symbol, limit);
|
|
@@ -519,17 +534,46 @@ export default class bitget extends bitgetRest {
|
|
|
519
534
|
* @description unsubscribe from the ohlcv channel
|
|
520
535
|
* @see https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
|
|
521
536
|
* @see https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
|
|
537
|
+
* @see https://www.bitget.com/api-doc/uta/websocket/public/Candlesticks-Channel
|
|
522
538
|
* @param {string} symbol unified symbol of the market to unwatch the ohlcv for
|
|
523
539
|
* @param {string} [timeframe] the period for the ratio, default is 1 minute
|
|
524
540
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
541
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
525
542
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
526
543
|
*/
|
|
527
544
|
async unWatchOHLCV(symbol, timeframe = '1m', params = {}) {
|
|
528
545
|
await this.loadMarkets();
|
|
529
546
|
const timeframes = this.safeDict(this.options, 'timeframes');
|
|
530
547
|
const interval = this.safeString(timeframes, timeframe);
|
|
531
|
-
|
|
532
|
-
|
|
548
|
+
let channel = undefined;
|
|
549
|
+
let market = undefined;
|
|
550
|
+
if (symbol !== undefined) {
|
|
551
|
+
market = this.market(symbol);
|
|
552
|
+
}
|
|
553
|
+
let instType = undefined;
|
|
554
|
+
let messageHash = undefined;
|
|
555
|
+
let uta = undefined;
|
|
556
|
+
[uta, params] = this.handleOptionAndParams(params, 'unWatchOHLCV', 'uta', false);
|
|
557
|
+
[instType, params] = this.getInstType(market, uta, params);
|
|
558
|
+
const args = {
|
|
559
|
+
'instType': instType,
|
|
560
|
+
};
|
|
561
|
+
if (uta) {
|
|
562
|
+
channel = 'kline';
|
|
563
|
+
args['topic'] = channel;
|
|
564
|
+
args['symbol'] = market['id'];
|
|
565
|
+
args['interval'] = interval;
|
|
566
|
+
params['uta'] = true;
|
|
567
|
+
params['interval'] = interval;
|
|
568
|
+
messageHash = channel + symbol;
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
channel = 'candle' + interval;
|
|
572
|
+
args['channel'] = channel;
|
|
573
|
+
args['instId'] = market['id'];
|
|
574
|
+
messageHash = 'candles:' + interval;
|
|
575
|
+
}
|
|
576
|
+
return await this.unWatchChannel(symbol, channel, messageHash, params);
|
|
533
577
|
}
|
|
534
578
|
handleOHLCV(client, message) {
|
|
535
579
|
//
|
|
@@ -565,15 +609,47 @@ export default class bitget extends bitgetRest {
|
|
|
565
609
|
// "ts": 1701901610417
|
|
566
610
|
// }
|
|
567
611
|
//
|
|
612
|
+
// uta
|
|
613
|
+
//
|
|
614
|
+
// {
|
|
615
|
+
// "action": "snapshot",
|
|
616
|
+
// "arg": {
|
|
617
|
+
// "instType": "usdt-futures",
|
|
618
|
+
// "topic": "kline",
|
|
619
|
+
// "symbol": "BTCUSDT",
|
|
620
|
+
// "interval": "1m"
|
|
621
|
+
// },
|
|
622
|
+
// "data": [
|
|
623
|
+
// {
|
|
624
|
+
// "start": "1755564480000",
|
|
625
|
+
// "open": "116286",
|
|
626
|
+
// "close": "116256.2",
|
|
627
|
+
// "high": "116310.2",
|
|
628
|
+
// "low": "116232.8",
|
|
629
|
+
// "volume": "39.7062",
|
|
630
|
+
// "turnover": "4616746.46654"
|
|
631
|
+
// },
|
|
632
|
+
// ],
|
|
633
|
+
// "ts": 1755594421877
|
|
634
|
+
// }
|
|
635
|
+
//
|
|
568
636
|
const arg = this.safeValue(message, 'arg', {});
|
|
569
|
-
const instType = this.
|
|
570
|
-
const marketType = (instType === '
|
|
571
|
-
const marketId = this.
|
|
637
|
+
const instType = this.safeStringLower(arg, 'instType');
|
|
638
|
+
const marketType = (instType === 'spot') ? 'spot' : 'contract';
|
|
639
|
+
const marketId = this.safeString2(arg, 'instId', 'symbol');
|
|
572
640
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
573
641
|
const symbol = market['symbol'];
|
|
574
642
|
this.ohlcvs[symbol] = this.safeValue(this.ohlcvs, symbol, {});
|
|
575
|
-
const channel = this.
|
|
576
|
-
|
|
643
|
+
const channel = this.safeString2(arg, 'channel', 'topic');
|
|
644
|
+
let interval = this.safeString(arg, 'interval');
|
|
645
|
+
let isUta = undefined;
|
|
646
|
+
if (interval === undefined) {
|
|
647
|
+
isUta = false;
|
|
648
|
+
interval = channel.replace('candle', '');
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
isUta = true;
|
|
652
|
+
}
|
|
577
653
|
const timeframes = this.safeValue(this.options, 'timeframes');
|
|
578
654
|
const timeframe = this.findTimeframe(interval, timeframes);
|
|
579
655
|
let stored = this.safeValue(this.ohlcvs[symbol], timeframe);
|
|
@@ -587,7 +663,13 @@ export default class bitget extends bitgetRest {
|
|
|
587
663
|
const parsed = this.parseWsOHLCV(data[i], market);
|
|
588
664
|
stored.append(parsed);
|
|
589
665
|
}
|
|
590
|
-
|
|
666
|
+
let messageHash = undefined;
|
|
667
|
+
if (isUta) {
|
|
668
|
+
messageHash = 'kline:' + symbol;
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
messageHash = 'candles:' + timeframe + ':' + symbol;
|
|
672
|
+
}
|
|
591
673
|
client.resolve(stored, messageHash);
|
|
592
674
|
}
|
|
593
675
|
parseWsOHLCV(ohlcv, market = undefined) {
|
|
@@ -603,14 +685,26 @@ export default class bitget extends bitgetRest {
|
|
|
603
685
|
// "437404.105512" // USDT volume
|
|
604
686
|
// ]
|
|
605
687
|
//
|
|
688
|
+
// uta
|
|
689
|
+
//
|
|
690
|
+
// {
|
|
691
|
+
// "start": "1755564480000",
|
|
692
|
+
// "open": "116286",
|
|
693
|
+
// "close": "116256.2",
|
|
694
|
+
// "high": "116310.2",
|
|
695
|
+
// "low": "116232.8",
|
|
696
|
+
// "volume": "39.7062",
|
|
697
|
+
// "turnover": "4616746.46654"
|
|
698
|
+
// }
|
|
699
|
+
//
|
|
606
700
|
const volumeIndex = (market['inverse']) ? 6 : 5;
|
|
607
701
|
return [
|
|
608
|
-
this.
|
|
609
|
-
this.
|
|
610
|
-
this.
|
|
611
|
-
this.
|
|
612
|
-
this.
|
|
613
|
-
this.
|
|
702
|
+
this.safeInteger2(ohlcv, 'start', 0),
|
|
703
|
+
this.safeNumber2(ohlcv, 'open', 1),
|
|
704
|
+
this.safeNumber2(ohlcv, 'high', 2),
|
|
705
|
+
this.safeNumber2(ohlcv, 'low', 3),
|
|
706
|
+
this.safeNumber2(ohlcv, 'close', 4),
|
|
707
|
+
this.safeNumber2(ohlcv, 'volume', volumeIndex),
|
|
614
708
|
];
|
|
615
709
|
}
|
|
616
710
|
/**
|
|
@@ -653,12 +747,23 @@ export default class bitget extends bitgetRest {
|
|
|
653
747
|
const market = this.market(symbol);
|
|
654
748
|
const messageHash = 'unsubscribe:' + messageHashTopic + ':' + market['symbol'];
|
|
655
749
|
let instType = undefined;
|
|
656
|
-
|
|
750
|
+
let uta = undefined;
|
|
751
|
+
[uta, params] = this.handleOptionAndParams(params, 'unWatchChannel', 'uta', false);
|
|
752
|
+
[instType, params] = this.getInstType(market, uta, params);
|
|
657
753
|
const args = {
|
|
658
754
|
'instType': instType,
|
|
659
|
-
'channel': channel,
|
|
660
|
-
'instId': market['id'],
|
|
661
755
|
};
|
|
756
|
+
if (uta) {
|
|
757
|
+
args['topic'] = channel;
|
|
758
|
+
args['symbol'] = market['id'];
|
|
759
|
+
args['interval'] = this.safeString(params, 'interval', '1m');
|
|
760
|
+
params['uta'] = true;
|
|
761
|
+
params = this.omit(params, 'interval');
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
args['channel'] = channel;
|
|
765
|
+
args['instId'] = market['id'];
|
|
766
|
+
}
|
|
662
767
|
return await this.unWatchPublic(messageHash, args, params);
|
|
663
768
|
}
|
|
664
769
|
/**
|
|
@@ -2115,6 +2220,18 @@ export default class bitget extends bitgetRest {
|
|
|
2115
2220
|
// "ts": 1753230479687
|
|
2116
2221
|
// }
|
|
2117
2222
|
//
|
|
2223
|
+
// unsubscribe
|
|
2224
|
+
//
|
|
2225
|
+
// {
|
|
2226
|
+
// "event": "unsubscribe",
|
|
2227
|
+
// "arg": {
|
|
2228
|
+
// "instType": "spot",
|
|
2229
|
+
// "topic": "kline",
|
|
2230
|
+
// "symbol": "BTCUSDT",
|
|
2231
|
+
// "interval": "1m"
|
|
2232
|
+
// }
|
|
2233
|
+
// }
|
|
2234
|
+
//
|
|
2118
2235
|
if (this.handleErrorMessage(client, message)) {
|
|
2119
2236
|
return;
|
|
2120
2237
|
}
|
|
@@ -2153,6 +2270,7 @@ export default class bitget extends bitgetRest {
|
|
|
2153
2270
|
'positions': this.handlePositions,
|
|
2154
2271
|
'account-isolated': this.handleBalance,
|
|
2155
2272
|
'account-crossed': this.handleBalance,
|
|
2273
|
+
'kline': this.handleOHLCV,
|
|
2156
2274
|
};
|
|
2157
2275
|
const arg = this.safeValue(message, 'arg', {});
|
|
2158
2276
|
const topic = this.safeValue2(arg, 'channel', 'topic', '');
|
|
@@ -2262,18 +2380,38 @@ export default class bitget extends bitgetRest {
|
|
|
2262
2380
|
//
|
|
2263
2381
|
// {"event":"unsubscribe","arg":{"instType":"SPOT","channel":"candle1m","instId":"BTCUSDT"}}
|
|
2264
2382
|
//
|
|
2383
|
+
// UTA
|
|
2384
|
+
//
|
|
2385
|
+
// {"event":"unsubscribe","arg":{"instType":"spot","topic":"kline","symbol":"BTCUSDT","interval":"1m"}}
|
|
2386
|
+
//
|
|
2265
2387
|
const arg = this.safeDict(message, 'arg', {});
|
|
2266
2388
|
const instType = this.safeStringLower(arg, 'instType');
|
|
2267
2389
|
const type = (instType === 'spot') ? 'spot' : 'contract';
|
|
2268
|
-
const instId = this.
|
|
2269
|
-
const channel = this.
|
|
2270
|
-
|
|
2390
|
+
const instId = this.safeString2(arg, 'instId', 'symbol');
|
|
2391
|
+
const channel = this.safeString2(arg, 'channel', 'topic');
|
|
2392
|
+
let interval = this.safeString(arg, 'interval');
|
|
2393
|
+
let isUta = undefined;
|
|
2394
|
+
if (interval === undefined) {
|
|
2395
|
+
isUta = false;
|
|
2396
|
+
interval = channel.replace('candle', '');
|
|
2397
|
+
}
|
|
2398
|
+
else {
|
|
2399
|
+
isUta = true;
|
|
2400
|
+
}
|
|
2271
2401
|
const timeframes = this.safeValue(this.options, 'timeframes');
|
|
2272
2402
|
const timeframe = this.findTimeframe(interval, timeframes);
|
|
2273
2403
|
const market = this.safeMarket(instId, undefined, undefined, type);
|
|
2274
2404
|
const symbol = market['symbol'];
|
|
2275
|
-
|
|
2276
|
-
|
|
2405
|
+
let messageHash = undefined;
|
|
2406
|
+
let subMessageHash = undefined;
|
|
2407
|
+
if (isUta) {
|
|
2408
|
+
messageHash = 'unsubscribe:kline:' + symbol;
|
|
2409
|
+
subMessageHash = 'kline:' + symbol;
|
|
2410
|
+
}
|
|
2411
|
+
else {
|
|
2412
|
+
messageHash = 'unsubscribe:candles:' + timeframe + ':' + symbol;
|
|
2413
|
+
subMessageHash = 'candles:' + timeframe + ':' + symbol;
|
|
2414
|
+
}
|
|
2277
2415
|
if (symbol in this.ohlcvs) {
|
|
2278
2416
|
if (timeframe in this.ohlcvs[symbol]) {
|
|
2279
2417
|
delete this.ohlcvs[symbol][timeframe];
|
|
@@ -2321,6 +2459,9 @@ export default class bitget extends bitgetRest {
|
|
|
2321
2459
|
else if (channel.startsWith('candle')) {
|
|
2322
2460
|
this.handleOHLCVUnSubscription(client, message);
|
|
2323
2461
|
}
|
|
2462
|
+
else if (channel.startsWith('kline')) {
|
|
2463
|
+
this.handleOHLCVUnSubscription(client, message);
|
|
2464
|
+
}
|
|
2324
2465
|
}
|
|
2325
2466
|
return message;
|
|
2326
2467
|
}
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -220,7 +220,7 @@ export default class bitmart extends bitmartRest {
|
|
|
220
220
|
// "fz_bal":"0.100000000000000000000000000000"
|
|
221
221
|
// }
|
|
222
222
|
// ],
|
|
223
|
-
// "event_time":"
|
|
223
|
+
// "event_time":"1701632345416",
|
|
224
224
|
// "event_type":"TRANSACTION_COMPLETED"
|
|
225
225
|
// }
|
|
226
226
|
// ],
|
package/js/src/pro/gemini.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export default class gemini extends geminiRest {
|
|
|
79
79
|
*/
|
|
80
80
|
watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
81
81
|
handleBidsAsksForMultidata(client: Client, rawBidAskChanges: any, timestamp: Int, nonce: Int): void;
|
|
82
|
-
helperForWatchMultipleConstruct(itemHashName: string, symbols
|
|
82
|
+
helperForWatchMultipleConstruct(itemHashName: string, symbols?: string[], params?: {}): Promise<any>;
|
|
83
83
|
handleOrderBookForMultidata(client: Client, rawOrderBookChanges: any, timestamp: Int, nonce: Int): void;
|
|
84
84
|
handleL2Updates(client: Client, message: any): void;
|
|
85
85
|
/**
|
package/js/src/pro/gemini.js
CHANGED
|
@@ -491,11 +491,16 @@ export default class gemini extends geminiRest {
|
|
|
491
491
|
currentBidAsk['timestamp'] = timestamp;
|
|
492
492
|
currentBidAsk['datetime'] = this.iso8601(timestamp);
|
|
493
493
|
currentBidAsk['info'] = rawBidAskChanges;
|
|
494
|
+
const bidsAsksDict = {};
|
|
495
|
+
bidsAsksDict[symbol] = currentBidAsk;
|
|
494
496
|
this.bidsasks[symbol] = currentBidAsk;
|
|
495
|
-
client.resolve(
|
|
497
|
+
client.resolve(bidsAsksDict, messageHash);
|
|
496
498
|
}
|
|
497
|
-
async helperForWatchMultipleConstruct(itemHashName, symbols, params = {}) {
|
|
499
|
+
async helperForWatchMultipleConstruct(itemHashName, symbols = undefined, params = {}) {
|
|
498
500
|
await this.loadMarkets();
|
|
501
|
+
if (symbols === undefined) {
|
|
502
|
+
throw new NotSupported(this.id + ' watchMultiple requires at least one symbol');
|
|
503
|
+
}
|
|
499
504
|
symbols = this.marketSymbols(symbols, undefined, false, true, true);
|
|
500
505
|
const firstMarket = this.market(symbols[0]);
|
|
501
506
|
if (!firstMarket['spot'] && !firstMarket['linear']) {
|
|
@@ -99,6 +99,11 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
99
99
|
await this.loadMarkets();
|
|
100
100
|
const [order, globalParams] = this.parseCreateEditOrderArgs(undefined, symbol, type, side, amount, price, params);
|
|
101
101
|
const orders = await this.createOrdersWs([order], globalParams);
|
|
102
|
+
const ordersLength = orders.length;
|
|
103
|
+
if (ordersLength === 0) {
|
|
104
|
+
// not sure why but it is happening sometimes
|
|
105
|
+
return this.safeOrder({});
|
|
106
|
+
}
|
|
102
107
|
const parsedOrder = orders[0];
|
|
103
108
|
return parsedOrder;
|
|
104
109
|
}
|
package/js/src/pro/kraken.js
CHANGED
|
@@ -1710,7 +1710,7 @@ export default class kraken extends krakenRest {
|
|
|
1710
1710
|
//
|
|
1711
1711
|
const errorMessage = this.safeString2(message, 'errorMessage', 'error');
|
|
1712
1712
|
if (errorMessage !== undefined) {
|
|
1713
|
-
|
|
1713
|
+
const requestId = this.safeString2(message, 'reqid', 'req_id');
|
|
1714
1714
|
const broad = this.exceptions['ws']['broad'];
|
|
1715
1715
|
const broadKey = this.findBroadlyMatchedKey(broad, errorMessage);
|
|
1716
1716
|
let exception = undefined;
|
|
@@ -1720,11 +1720,9 @@ export default class kraken extends krakenRest {
|
|
|
1720
1720
|
else {
|
|
1721
1721
|
exception = new broad[broadKey](errorMessage);
|
|
1722
1722
|
}
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
client.reject(exception);
|
|
1727
|
-
// }
|
|
1723
|
+
if (requestId !== undefined) {
|
|
1724
|
+
client.reject(exception, requestId);
|
|
1725
|
+
}
|
|
1728
1726
|
return false;
|
|
1729
1727
|
}
|
|
1730
1728
|
return true;
|
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.2",
|
|
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;
|