ccxt 4.2.84 → 4.2.85
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/build.sh +1 -1
- package/dist/ccxt.browser.js +867 -904
- package/dist/ccxt.browser.min.js +4 -4
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +5 -5
- package/dist/cjs/src/ascendex.js +8 -8
- package/dist/cjs/src/base/Exchange.js +76 -14
- package/dist/cjs/src/bigone.js +12 -12
- package/dist/cjs/src/binance.js +23 -35
- package/dist/cjs/src/bingx.js +13 -9
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +8 -8
- package/dist/cjs/src/bitbns.js +5 -5
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitget.js +30 -24
- package/dist/cjs/src/bithumb.js +5 -5
- package/dist/cjs/src/bitmart.js +16 -16
- package/dist/cjs/src/bitopro.js +1 -1
- package/dist/cjs/src/bitrue.js +4 -4
- package/dist/cjs/src/bitso.js +5 -5
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bitteam.js +8 -8
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/btcturk.js +6 -6
- package/dist/cjs/src/bybit.js +31 -95
- package/dist/cjs/src/coincheck.js +4 -4
- package/dist/cjs/src/coinex.js +11 -11
- package/dist/cjs/src/coinlist.js +7 -7
- package/dist/cjs/src/coinmate.js +4 -4
- package/dist/cjs/src/coinmetro.js +3 -3
- package/dist/cjs/src/coinone.js +5 -5
- package/dist/cjs/src/coinspot.js +2 -2
- package/dist/cjs/src/cryptocom.js +17 -17
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +0 -8
- package/dist/cjs/src/deribit.js +16 -92
- package/dist/cjs/src/digifinex.js +8 -8
- package/dist/cjs/src/exmo.js +8 -8
- package/dist/cjs/src/gate.js +0 -8
- package/dist/cjs/src/hitbtc.js +5 -4
- package/dist/cjs/src/hollaex.js +7 -7
- package/dist/cjs/src/htx.js +7 -7
- package/dist/cjs/src/huobijp.js +3 -3
- package/dist/cjs/src/idex.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +2 -2
- package/dist/cjs/src/kraken.js +8 -8
- package/dist/cjs/src/krakenfutures.js +6 -6
- package/dist/cjs/src/kucoin.js +5 -1
- package/dist/cjs/src/kucoinfutures.js +8 -8
- package/dist/cjs/src/kuna.js +16 -16
- package/dist/cjs/src/latoken.js +2 -2
- package/dist/cjs/src/lbank.js +10 -10
- package/dist/cjs/src/luno.js +4 -4
- package/dist/cjs/src/mercado.js +5 -5
- package/dist/cjs/src/mexc.js +6 -6
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +9 -9
- package/dist/cjs/src/oceanex.js +7 -7
- package/dist/cjs/src/okcoin.js +13 -13
- package/dist/cjs/src/okx.js +23 -31
- package/dist/cjs/src/onetrading.js +4 -4
- package/dist/cjs/src/p2b.js +7 -7
- package/dist/cjs/src/phemex.js +12 -12
- package/dist/cjs/src/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/binance.js +167 -121
- package/dist/cjs/src/pro/kucoin.js +6 -7
- package/dist/cjs/src/pro/okx.js +19 -2
- package/dist/cjs/src/probit.js +11 -11
- package/dist/cjs/src/timex.js +7 -7
- package/dist/cjs/src/tokocrypto.js +9 -9
- package/dist/cjs/src/wavesexchange.js +3 -3
- package/dist/cjs/src/whitebit.js +5 -5
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +7 -7
- package/examples/js/cli.js +0 -1
- package/examples/ts/cli.ts +0 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.js +5 -5
- package/js/src/ascendex.js +8 -8
- package/js/src/base/Exchange.d.ts +4 -3
- package/js/src/base/Exchange.js +76 -14
- package/js/src/bigone.js +12 -12
- package/js/src/binance.d.ts +0 -1
- package/js/src/binance.js +23 -35
- package/js/src/bingx.js +13 -9
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.js +8 -8
- package/js/src/bitbns.js +5 -5
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitget.js +30 -24
- package/js/src/bithumb.js +5 -5
- package/js/src/bitmart.js +16 -16
- package/js/src/bitopro.js +1 -1
- package/js/src/bitrue.js +4 -4
- package/js/src/bitso.js +5 -5
- package/js/src/bitstamp.js +1 -1
- package/js/src/bitteam.js +8 -8
- package/js/src/bl3p.js +1 -1
- package/js/src/btcturk.js +6 -6
- package/js/src/bybit.d.ts +0 -3
- package/js/src/bybit.js +31 -95
- package/js/src/coincheck.js +4 -4
- package/js/src/coinex.js +11 -11
- package/js/src/coinlist.js +7 -7
- package/js/src/coinmate.js +4 -4
- package/js/src/coinmetro.js +3 -3
- package/js/src/coinone.js +5 -5
- package/js/src/coinspot.js +2 -2
- package/js/src/cryptocom.js +17 -17
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.d.ts +0 -1
- package/js/src/delta.js +0 -8
- package/js/src/deribit.d.ts +0 -3
- package/js/src/deribit.js +16 -92
- package/js/src/digifinex.js +8 -8
- package/js/src/exmo.js +8 -8
- package/js/src/gate.d.ts +0 -1
- package/js/src/gate.js +0 -8
- package/js/src/hitbtc.js +5 -4
- package/js/src/hollaex.js +7 -7
- package/js/src/htx.js +7 -7
- package/js/src/huobijp.js +3 -3
- package/js/src/idex.js +2 -2
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.js +2 -2
- package/js/src/kraken.js +8 -8
- package/js/src/krakenfutures.js +6 -6
- package/js/src/kucoin.js +5 -1
- package/js/src/kucoinfutures.js +8 -8
- package/js/src/kuna.js +16 -16
- package/js/src/latoken.js +2 -2
- package/js/src/lbank.js +10 -10
- package/js/src/luno.js +4 -4
- package/js/src/mercado.js +5 -5
- package/js/src/mexc.js +6 -6
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.js +9 -9
- package/js/src/oceanex.js +7 -7
- package/js/src/okcoin.js +13 -13
- package/js/src/okx.d.ts +0 -1
- package/js/src/okx.js +23 -31
- package/js/src/onetrading.js +4 -4
- package/js/src/p2b.js +7 -7
- package/js/src/phemex.js +12 -12
- package/js/src/poloniexfutures.js +5 -5
- package/js/src/pro/binance.d.ts +5 -1
- package/js/src/pro/binance.js +168 -122
- package/js/src/pro/kucoin.js +6 -7
- package/js/src/pro/okx.js +19 -2
- package/js/src/probit.js +11 -11
- package/js/src/timex.js +7 -7
- package/js/src/tokocrypto.js +9 -9
- package/js/src/wavesexchange.js +3 -3
- package/js/src/whitebit.js +5 -5
- package/js/src/woo.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.js +7 -7
- package/package.json +1 -1
|
@@ -623,7 +623,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
623
623
|
// }
|
|
624
624
|
//
|
|
625
625
|
const result = this.safeValue(response, 'result', {});
|
|
626
|
-
const data = this.
|
|
626
|
+
const data = this.safeList(result, 'data', []);
|
|
627
627
|
return this.parseTickers(data, symbols);
|
|
628
628
|
}
|
|
629
629
|
async fetchTicker(symbol, params = {}) {
|
|
@@ -719,7 +719,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
719
719
|
// }
|
|
720
720
|
//
|
|
721
721
|
const data = this.safeValue(response, 'result', {});
|
|
722
|
-
const orders = this.
|
|
722
|
+
const orders = this.safeList(data, 'data', []);
|
|
723
723
|
return this.parseOrders(orders, market, since, limit);
|
|
724
724
|
}
|
|
725
725
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
@@ -779,7 +779,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
779
779
|
// }
|
|
780
780
|
//
|
|
781
781
|
const result = this.safeValue(response, 'result', {});
|
|
782
|
-
const trades = this.
|
|
782
|
+
const trades = this.safeList(result, 'data', []);
|
|
783
783
|
return this.parseTrades(trades, market, since, limit);
|
|
784
784
|
}
|
|
785
785
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -842,7 +842,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
842
842
|
// }
|
|
843
843
|
//
|
|
844
844
|
const result = this.safeValue(response, 'result', {});
|
|
845
|
-
const data = this.
|
|
845
|
+
const data = this.safeList(result, 'data', []);
|
|
846
846
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
847
847
|
}
|
|
848
848
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
@@ -1013,7 +1013,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1013
1013
|
// }
|
|
1014
1014
|
// }
|
|
1015
1015
|
//
|
|
1016
|
-
const order = this.
|
|
1016
|
+
const order = this.safeDict(response, 'result', {});
|
|
1017
1017
|
return this.parseOrder(order, market);
|
|
1018
1018
|
}
|
|
1019
1019
|
createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
|
@@ -1163,7 +1163,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1163
1163
|
// }
|
|
1164
1164
|
// }
|
|
1165
1165
|
//
|
|
1166
|
-
const result = this.
|
|
1166
|
+
const result = this.safeDict(response, 'result', {});
|
|
1167
1167
|
return this.parseOrder(result, market);
|
|
1168
1168
|
}
|
|
1169
1169
|
async createOrders(orders, params = {}) {
|
|
@@ -1427,7 +1427,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1427
1427
|
// }
|
|
1428
1428
|
// }
|
|
1429
1429
|
//
|
|
1430
|
-
const result = this.
|
|
1430
|
+
const result = this.safeDict(response, 'result', {});
|
|
1431
1431
|
return this.parseOrder(result, market);
|
|
1432
1432
|
}
|
|
1433
1433
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
@@ -1460,7 +1460,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1460
1460
|
'order_list': orderRequests,
|
|
1461
1461
|
};
|
|
1462
1462
|
const response = await this.v1PrivatePostPrivateCancelOrderList(this.extend(request, params));
|
|
1463
|
-
const result = this.
|
|
1463
|
+
const result = this.safeList(response, 'result', []);
|
|
1464
1464
|
return this.parseOrders(result, market, undefined, undefined, params);
|
|
1465
1465
|
}
|
|
1466
1466
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1521,7 +1521,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1521
1521
|
// }
|
|
1522
1522
|
//
|
|
1523
1523
|
const data = this.safeValue(response, 'result', {});
|
|
1524
|
-
const orders = this.
|
|
1524
|
+
const orders = this.safeList(data, 'data', []);
|
|
1525
1525
|
return this.parseOrders(orders, market, since, limit);
|
|
1526
1526
|
}
|
|
1527
1527
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1592,7 +1592,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1592
1592
|
// }
|
|
1593
1593
|
//
|
|
1594
1594
|
const result = this.safeValue(response, 'result', {});
|
|
1595
|
-
const trades = this.
|
|
1595
|
+
const trades = this.safeList(result, 'data', []);
|
|
1596
1596
|
return this.parseTrades(trades, market, since, limit);
|
|
1597
1597
|
}
|
|
1598
1598
|
parseAddress(addressString) {
|
|
@@ -1656,7 +1656,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1656
1656
|
// }
|
|
1657
1657
|
// }
|
|
1658
1658
|
//
|
|
1659
|
-
const result = this.
|
|
1659
|
+
const result = this.safeDict(response, 'result');
|
|
1660
1660
|
return this.parseTransaction(result, currency);
|
|
1661
1661
|
}
|
|
1662
1662
|
async fetchDepositAddressesByNetwork(code, params = {}) {
|
|
@@ -1808,7 +1808,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1808
1808
|
// }
|
|
1809
1809
|
//
|
|
1810
1810
|
const data = this.safeValue(response, 'result', {});
|
|
1811
|
-
const depositList = this.
|
|
1811
|
+
const depositList = this.safeList(data, 'deposit_list', []);
|
|
1812
1812
|
return this.parseTransactions(depositList, currency, since, limit);
|
|
1813
1813
|
}
|
|
1814
1814
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1869,7 +1869,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1869
1869
|
// }
|
|
1870
1870
|
//
|
|
1871
1871
|
const data = this.safeValue(response, 'result', {});
|
|
1872
|
-
const withdrawalList = this.
|
|
1872
|
+
const withdrawalList = this.safeList(data, 'withdrawal_list', []);
|
|
1873
1873
|
return this.parseTransactions(withdrawalList, currency, since, limit);
|
|
1874
1874
|
}
|
|
1875
1875
|
parseTicker(ticker, market = undefined) {
|
|
@@ -2324,7 +2324,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2324
2324
|
await this.loadMarkets();
|
|
2325
2325
|
const response = await this.v1PrivatePostPrivateGetCurrencyNetworks(params);
|
|
2326
2326
|
const data = this.safeValue(response, 'result');
|
|
2327
|
-
const currencyMap = this.
|
|
2327
|
+
const currencyMap = this.safeList(data, 'currency_map');
|
|
2328
2328
|
return this.parseDepositWithdrawFees(currencyMap, codes, 'full_name');
|
|
2329
2329
|
}
|
|
2330
2330
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2753,8 +2753,8 @@ class cryptocom extends cryptocom$1 {
|
|
|
2753
2753
|
// }
|
|
2754
2754
|
// }
|
|
2755
2755
|
//
|
|
2756
|
-
const result = this.
|
|
2757
|
-
const data = this.
|
|
2756
|
+
const result = this.safeDict(response, 'result', {});
|
|
2757
|
+
const data = this.safeList(result, 'data', []);
|
|
2758
2758
|
return this.parsePosition(data[0], market);
|
|
2759
2759
|
}
|
|
2760
2760
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
@@ -2947,7 +2947,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2947
2947
|
// }
|
|
2948
2948
|
// }
|
|
2949
2949
|
//
|
|
2950
|
-
const result = this.
|
|
2950
|
+
const result = this.safeDict(response, 'result');
|
|
2951
2951
|
return this.parseOrder(result, market);
|
|
2952
2952
|
}
|
|
2953
2953
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
@@ -1934,7 +1934,7 @@ class currencycom extends currencycom$1 {
|
|
|
1934
1934
|
// ]
|
|
1935
1935
|
// }
|
|
1936
1936
|
//
|
|
1937
|
-
const data = this.
|
|
1937
|
+
const data = this.safeList(response, 'positions', []);
|
|
1938
1938
|
return this.parsePositions(data, symbols);
|
|
1939
1939
|
}
|
|
1940
1940
|
parsePosition(position, market = undefined) {
|
package/dist/cjs/src/delta.js
CHANGED
|
@@ -243,14 +243,6 @@ class delta extends delta$1 {
|
|
|
243
243
|
},
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
convertExpireDate(date) {
|
|
247
|
-
// parse YYMMDD to timestamp
|
|
248
|
-
const year = date.slice(0, 2);
|
|
249
|
-
const month = date.slice(2, 4);
|
|
250
|
-
const day = date.slice(4, 6);
|
|
251
|
-
const reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z';
|
|
252
|
-
return reconstructedDate;
|
|
253
|
-
}
|
|
254
246
|
createExpiredOptionMarket(symbol) {
|
|
255
247
|
// support expired option contracts
|
|
256
248
|
const quote = 'USDT';
|
package/dist/cjs/src/deribit.js
CHANGED
|
@@ -404,82 +404,6 @@ class deribit extends deribit$1 {
|
|
|
404
404
|
},
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
convertExpireDate(date) {
|
|
408
|
-
// parse YYMMDD to timestamp
|
|
409
|
-
const year = date.slice(0, 2);
|
|
410
|
-
const month = date.slice(2, 4);
|
|
411
|
-
const day = date.slice(4, 6);
|
|
412
|
-
const reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z';
|
|
413
|
-
return reconstructedDate;
|
|
414
|
-
}
|
|
415
|
-
convertMarketIdExpireDate(date) {
|
|
416
|
-
// parse 19JAN24 to 240119
|
|
417
|
-
const monthMappping = {
|
|
418
|
-
'JAN': '01',
|
|
419
|
-
'FEB': '02',
|
|
420
|
-
'MAR': '03',
|
|
421
|
-
'APR': '04',
|
|
422
|
-
'MAY': '05',
|
|
423
|
-
'JUN': '06',
|
|
424
|
-
'JUL': '07',
|
|
425
|
-
'AUG': '08',
|
|
426
|
-
'SEP': '09',
|
|
427
|
-
'OCT': '10',
|
|
428
|
-
'NOV': '11',
|
|
429
|
-
'DEC': '12',
|
|
430
|
-
};
|
|
431
|
-
const year = date.slice(0, 2);
|
|
432
|
-
const monthName = date.slice(2, 5);
|
|
433
|
-
const month = this.safeString(monthMappping, monthName);
|
|
434
|
-
const day = date.slice(5, 7);
|
|
435
|
-
const reconstructedDate = day + month + year;
|
|
436
|
-
return reconstructedDate;
|
|
437
|
-
}
|
|
438
|
-
convertExpireDateToMarketIdDate(date) {
|
|
439
|
-
// parse 240119 to 19JAN24
|
|
440
|
-
const year = date.slice(0, 2);
|
|
441
|
-
const monthRaw = date.slice(2, 4);
|
|
442
|
-
let month = undefined;
|
|
443
|
-
const day = date.slice(4, 6);
|
|
444
|
-
if (monthRaw === '01') {
|
|
445
|
-
month = 'JAN';
|
|
446
|
-
}
|
|
447
|
-
else if (monthRaw === '02') {
|
|
448
|
-
month = 'FEB';
|
|
449
|
-
}
|
|
450
|
-
else if (monthRaw === '03') {
|
|
451
|
-
month = 'MAR';
|
|
452
|
-
}
|
|
453
|
-
else if (monthRaw === '04') {
|
|
454
|
-
month = 'APR';
|
|
455
|
-
}
|
|
456
|
-
else if (monthRaw === '05') {
|
|
457
|
-
month = 'MAY';
|
|
458
|
-
}
|
|
459
|
-
else if (monthRaw === '06') {
|
|
460
|
-
month = 'JUN';
|
|
461
|
-
}
|
|
462
|
-
else if (monthRaw === '07') {
|
|
463
|
-
month = 'JUL';
|
|
464
|
-
}
|
|
465
|
-
else if (monthRaw === '08') {
|
|
466
|
-
month = 'AUG';
|
|
467
|
-
}
|
|
468
|
-
else if (monthRaw === '09') {
|
|
469
|
-
month = 'SEP';
|
|
470
|
-
}
|
|
471
|
-
else if (monthRaw === '10') {
|
|
472
|
-
month = 'OCT';
|
|
473
|
-
}
|
|
474
|
-
else if (monthRaw === '11') {
|
|
475
|
-
month = 'NOV';
|
|
476
|
-
}
|
|
477
|
-
else if (monthRaw === '12') {
|
|
478
|
-
month = 'DEC';
|
|
479
|
-
}
|
|
480
|
-
const reconstructedDate = day + month + year;
|
|
481
|
-
return reconstructedDate;
|
|
482
|
-
}
|
|
483
407
|
createExpiredOptionMarket(symbol) {
|
|
484
408
|
// support expired option contracts
|
|
485
409
|
let quote = 'USD';
|
|
@@ -1266,7 +1190,7 @@ class deribit extends deribit$1 {
|
|
|
1266
1190
|
// "testnet": false
|
|
1267
1191
|
// }
|
|
1268
1192
|
//
|
|
1269
|
-
const result = this.
|
|
1193
|
+
const result = this.safeDict(response, 'result');
|
|
1270
1194
|
return this.parseTicker(result, market);
|
|
1271
1195
|
}
|
|
1272
1196
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
@@ -1553,7 +1477,7 @@ class deribit extends deribit$1 {
|
|
|
1553
1477
|
// }
|
|
1554
1478
|
//
|
|
1555
1479
|
const result = this.safeValue(response, 'result', {});
|
|
1556
|
-
const trades = this.
|
|
1480
|
+
const trades = this.safeList(result, 'trades', []);
|
|
1557
1481
|
return this.parseTrades(trades, market, since, limit);
|
|
1558
1482
|
}
|
|
1559
1483
|
async fetchTradingFees(params = {}) {
|
|
@@ -1915,7 +1839,7 @@ class deribit extends deribit$1 {
|
|
|
1915
1839
|
// }
|
|
1916
1840
|
// }
|
|
1917
1841
|
//
|
|
1918
|
-
const result = this.
|
|
1842
|
+
const result = this.safeDict(response, 'result');
|
|
1919
1843
|
return this.parseOrder(result, market);
|
|
1920
1844
|
}
|
|
1921
1845
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
@@ -2157,7 +2081,7 @@ class deribit extends deribit$1 {
|
|
|
2157
2081
|
'order_id': id,
|
|
2158
2082
|
};
|
|
2159
2083
|
const response = await this.privateGetCancel(this.extend(request, params));
|
|
2160
|
-
const result = this.
|
|
2084
|
+
const result = this.safeDict(response, 'result', {});
|
|
2161
2085
|
return this.parseOrder(result);
|
|
2162
2086
|
}
|
|
2163
2087
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
@@ -2212,7 +2136,7 @@ class deribit extends deribit$1 {
|
|
|
2212
2136
|
request['instrument_name'] = market['id'];
|
|
2213
2137
|
response = await this.privateGetGetOpenOrdersByInstrument(this.extend(request, params));
|
|
2214
2138
|
}
|
|
2215
|
-
const result = this.
|
|
2139
|
+
const result = this.safeList(response, 'result', []);
|
|
2216
2140
|
return this.parseOrders(result, market, since, limit);
|
|
2217
2141
|
}
|
|
2218
2142
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2243,7 +2167,7 @@ class deribit extends deribit$1 {
|
|
|
2243
2167
|
request['instrument_name'] = market['id'];
|
|
2244
2168
|
response = await this.privateGetGetOrderHistoryByInstrument(this.extend(request, params));
|
|
2245
2169
|
}
|
|
2246
|
-
const result = this.
|
|
2170
|
+
const result = this.safeList(response, 'result', []);
|
|
2247
2171
|
return this.parseOrders(result, market, since, limit);
|
|
2248
2172
|
}
|
|
2249
2173
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2297,7 +2221,7 @@ class deribit extends deribit$1 {
|
|
|
2297
2221
|
// }
|
|
2298
2222
|
// }
|
|
2299
2223
|
//
|
|
2300
|
-
const result = this.
|
|
2224
|
+
const result = this.safeList(response, 'result', []);
|
|
2301
2225
|
return this.parseTrades(result, undefined, since, limit);
|
|
2302
2226
|
}
|
|
2303
2227
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2381,7 +2305,7 @@ class deribit extends deribit$1 {
|
|
|
2381
2305
|
// }
|
|
2382
2306
|
//
|
|
2383
2307
|
const result = this.safeValue(response, 'result', {});
|
|
2384
|
-
const trades = this.
|
|
2308
|
+
const trades = this.safeList(result, 'trades', []);
|
|
2385
2309
|
return this.parseTrades(trades, market, since, limit);
|
|
2386
2310
|
}
|
|
2387
2311
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2429,7 +2353,7 @@ class deribit extends deribit$1 {
|
|
|
2429
2353
|
// }
|
|
2430
2354
|
//
|
|
2431
2355
|
const result = this.safeValue(response, 'result', {});
|
|
2432
|
-
const data = this.
|
|
2356
|
+
const data = this.safeList(result, 'data', []);
|
|
2433
2357
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
2434
2358
|
}
|
|
2435
2359
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2481,7 +2405,7 @@ class deribit extends deribit$1 {
|
|
|
2481
2405
|
// }
|
|
2482
2406
|
//
|
|
2483
2407
|
const result = this.safeValue(response, 'result', {});
|
|
2484
|
-
const data = this.
|
|
2408
|
+
const data = this.safeList(result, 'data', []);
|
|
2485
2409
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
2486
2410
|
}
|
|
2487
2411
|
parseTransactionStatus(status) {
|
|
@@ -2668,7 +2592,7 @@ class deribit extends deribit$1 {
|
|
|
2668
2592
|
// }
|
|
2669
2593
|
// }
|
|
2670
2594
|
//
|
|
2671
|
-
const result = this.
|
|
2595
|
+
const result = this.safeDict(response, 'result');
|
|
2672
2596
|
return this.parsePosition(result);
|
|
2673
2597
|
}
|
|
2674
2598
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
@@ -2741,7 +2665,7 @@ class deribit extends deribit$1 {
|
|
|
2741
2665
|
// ]
|
|
2742
2666
|
// }
|
|
2743
2667
|
//
|
|
2744
|
-
const result = this.
|
|
2668
|
+
const result = this.safeList(response, 'result');
|
|
2745
2669
|
return this.parsePositions(result, symbols);
|
|
2746
2670
|
}
|
|
2747
2671
|
async fetchVolatilityHistory(code, params = {}) {
|
|
@@ -2863,7 +2787,7 @@ class deribit extends deribit$1 {
|
|
|
2863
2787
|
// }
|
|
2864
2788
|
//
|
|
2865
2789
|
const result = this.safeValue(response, 'result', {});
|
|
2866
|
-
const transfers = this.
|
|
2790
|
+
const transfers = this.safeList(result, 'data', []);
|
|
2867
2791
|
return this.parseTransfers(transfers, currency, since, limit, params);
|
|
2868
2792
|
}
|
|
2869
2793
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
@@ -2917,7 +2841,7 @@ class deribit extends deribit$1 {
|
|
|
2917
2841
|
// }
|
|
2918
2842
|
// }
|
|
2919
2843
|
//
|
|
2920
|
-
const result = this.
|
|
2844
|
+
const result = this.safeDict(response, 'result', {});
|
|
2921
2845
|
return this.parseTransfer(result, currency);
|
|
2922
2846
|
}
|
|
2923
2847
|
parseTransfer(transfer, currency = undefined) {
|
|
@@ -3050,7 +2974,7 @@ class deribit extends deribit$1 {
|
|
|
3050
2974
|
// "testnet": true
|
|
3051
2975
|
// }
|
|
3052
2976
|
//
|
|
3053
|
-
const data = this.
|
|
2977
|
+
const data = this.safeList(response, 'result', []);
|
|
3054
2978
|
return this.parseDepositWithdrawFees(data, codes, 'currency');
|
|
3055
2979
|
}
|
|
3056
2980
|
async fetchFundingRate(symbol, params = {}) {
|
|
@@ -3316,7 +3240,7 @@ class deribit extends deribit$1 {
|
|
|
3316
3240
|
// }
|
|
3317
3241
|
//
|
|
3318
3242
|
const result = this.safeValue(response, 'result', {});
|
|
3319
|
-
const settlements = this.
|
|
3243
|
+
const settlements = this.safeList(result, 'settlements', []);
|
|
3320
3244
|
return this.parseLiquidations(settlements, market, since, limit);
|
|
3321
3245
|
}
|
|
3322
3246
|
parseLiquidation(liquidation, market = undefined) {
|
|
@@ -1448,7 +1448,7 @@ class digifinex extends digifinex$1 {
|
|
|
1448
1448
|
// ]
|
|
1449
1449
|
// }
|
|
1450
1450
|
//
|
|
1451
|
-
const data = this.
|
|
1451
|
+
const data = this.safeList(response, 'data', []);
|
|
1452
1452
|
return this.parseTrades(data, market, since, limit);
|
|
1453
1453
|
}
|
|
1454
1454
|
parseOHLCV(ohlcv, market = undefined) {
|
|
@@ -2234,7 +2234,7 @@ class digifinex extends digifinex$1 {
|
|
|
2234
2234
|
// ]
|
|
2235
2235
|
// }
|
|
2236
2236
|
//
|
|
2237
|
-
const data = this.
|
|
2237
|
+
const data = this.safeList(response, 'data', []);
|
|
2238
2238
|
return this.parseOrders(data, market, since, limit);
|
|
2239
2239
|
}
|
|
2240
2240
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2342,7 +2342,7 @@ class digifinex extends digifinex$1 {
|
|
|
2342
2342
|
// ]
|
|
2343
2343
|
// }
|
|
2344
2344
|
//
|
|
2345
|
-
const data = this.
|
|
2345
|
+
const data = this.safeList(response, 'data', []);
|
|
2346
2346
|
return this.parseOrders(data, market, since, limit);
|
|
2347
2347
|
}
|
|
2348
2348
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
@@ -2545,7 +2545,7 @@ class digifinex extends digifinex$1 {
|
|
|
2545
2545
|
// }
|
|
2546
2546
|
//
|
|
2547
2547
|
const responseRequest = (marketType === 'swap') ? 'data' : 'list';
|
|
2548
|
-
const data = this.
|
|
2548
|
+
const data = this.safeList(response, responseRequest, []);
|
|
2549
2549
|
return this.parseTrades(data, market, since, limit);
|
|
2550
2550
|
}
|
|
2551
2551
|
parseLedgerEntryType(type) {
|
|
@@ -2794,7 +2794,7 @@ class digifinex extends digifinex$1 {
|
|
|
2794
2794
|
// ]
|
|
2795
2795
|
// }
|
|
2796
2796
|
//
|
|
2797
|
-
const data = this.
|
|
2797
|
+
const data = this.safeList(response, 'data', []);
|
|
2798
2798
|
return this.parseTransactions(data, currency, since, limit, { 'type': type });
|
|
2799
2799
|
}
|
|
2800
2800
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -3757,7 +3757,7 @@ class digifinex extends digifinex$1 {
|
|
|
3757
3757
|
// ]
|
|
3758
3758
|
// }
|
|
3759
3759
|
//
|
|
3760
|
-
const transfers = this.
|
|
3760
|
+
const transfers = this.safeList(response, 'data', []);
|
|
3761
3761
|
return this.parseTransfers(transfers, currency, since, limit);
|
|
3762
3762
|
}
|
|
3763
3763
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
@@ -3983,7 +3983,7 @@ class digifinex extends digifinex$1 {
|
|
|
3983
3983
|
// "code": 200,
|
|
3984
3984
|
// }
|
|
3985
3985
|
//
|
|
3986
|
-
const data = this.
|
|
3986
|
+
const data = this.safeList(response, 'data');
|
|
3987
3987
|
return this.parseDepositWithdrawFees(data, codes);
|
|
3988
3988
|
}
|
|
3989
3989
|
parseDepositWithdrawFees(response, codes = undefined, currencyIdKey = undefined) {
|
|
@@ -4180,7 +4180,7 @@ class digifinex extends digifinex$1 {
|
|
|
4180
4180
|
// ]
|
|
4181
4181
|
// }
|
|
4182
4182
|
//
|
|
4183
|
-
const data = this.
|
|
4183
|
+
const data = this.safeList(response, 'data', []);
|
|
4184
4184
|
return this.parseIncomes(data, market, since, limit);
|
|
4185
4185
|
}
|
|
4186
4186
|
parseIncome(income, market = undefined) {
|
package/dist/cjs/src/exmo.js
CHANGED
|
@@ -897,7 +897,7 @@ class exmo extends exmo$1 {
|
|
|
897
897
|
// ]
|
|
898
898
|
// }
|
|
899
899
|
//
|
|
900
|
-
const candles = this.
|
|
900
|
+
const candles = this.safeList(response, 'candles', []);
|
|
901
901
|
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
902
902
|
}
|
|
903
903
|
parseOHLCV(ohlcv, market = undefined) {
|
|
@@ -1024,7 +1024,7 @@ class exmo extends exmo$1 {
|
|
|
1024
1024
|
request['limit'] = limit;
|
|
1025
1025
|
}
|
|
1026
1026
|
const response = await this.publicGetOrderBook(this.extend(request, params));
|
|
1027
|
-
const result = this.
|
|
1027
|
+
const result = this.safeDict(response, market['id']);
|
|
1028
1028
|
return this.parseOrderBook(result, market['symbol'], undefined, 'bid', 'ask');
|
|
1029
1029
|
}
|
|
1030
1030
|
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
@@ -1292,7 +1292,7 @@ class exmo extends exmo$1 {
|
|
|
1292
1292
|
// ]
|
|
1293
1293
|
// }
|
|
1294
1294
|
//
|
|
1295
|
-
const data = this.
|
|
1295
|
+
const data = this.safeList(response, market['id'], []);
|
|
1296
1296
|
return this.parseTrades(data, market, since, limit);
|
|
1297
1297
|
}
|
|
1298
1298
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1683,7 +1683,7 @@ class exmo extends exmo$1 {
|
|
|
1683
1683
|
// }
|
|
1684
1684
|
//
|
|
1685
1685
|
}
|
|
1686
|
-
const trades = this.
|
|
1686
|
+
const trades = this.safeList(response, 'trades');
|
|
1687
1687
|
return this.parseTrades(trades, market, since, limit);
|
|
1688
1688
|
}
|
|
1689
1689
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2425,7 +2425,7 @@ class exmo extends exmo$1 {
|
|
|
2425
2425
|
// "count": 23
|
|
2426
2426
|
// }
|
|
2427
2427
|
//
|
|
2428
|
-
const items = this.
|
|
2428
|
+
const items = this.safeList(response, 'items', []);
|
|
2429
2429
|
return this.parseTransactions(items, currency, since, limit);
|
|
2430
2430
|
}
|
|
2431
2431
|
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
@@ -2477,7 +2477,7 @@ class exmo extends exmo$1 {
|
|
|
2477
2477
|
// }
|
|
2478
2478
|
//
|
|
2479
2479
|
const items = this.safeValue(response, 'items', []);
|
|
2480
|
-
const first = this.
|
|
2480
|
+
const first = this.safeDict(items, 0, {});
|
|
2481
2481
|
return this.parseTransaction(first, currency);
|
|
2482
2482
|
}
|
|
2483
2483
|
async fetchDeposit(id = undefined, code = undefined, params = {}) {
|
|
@@ -2529,7 +2529,7 @@ class exmo extends exmo$1 {
|
|
|
2529
2529
|
// }
|
|
2530
2530
|
//
|
|
2531
2531
|
const items = this.safeValue(response, 'items', []);
|
|
2532
|
-
const first = this.
|
|
2532
|
+
const first = this.safeDict(items, 0, {});
|
|
2533
2533
|
return this.parseTransaction(first, currency);
|
|
2534
2534
|
}
|
|
2535
2535
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2583,7 +2583,7 @@ class exmo extends exmo$1 {
|
|
|
2583
2583
|
// "count": 23
|
|
2584
2584
|
// }
|
|
2585
2585
|
//
|
|
2586
|
-
const items = this.
|
|
2586
|
+
const items = this.safeList(response, 'items', []);
|
|
2587
2587
|
return this.parseTransactions(items, currency, since, limit);
|
|
2588
2588
|
}
|
|
2589
2589
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -870,14 +870,6 @@ class gate extends gate$1 {
|
|
|
870
870
|
super.setSandboxMode(enable);
|
|
871
871
|
this.options['sandboxMode'] = enable;
|
|
872
872
|
}
|
|
873
|
-
convertExpireDate(date) {
|
|
874
|
-
// parse YYMMDD to timestamp
|
|
875
|
-
const year = date.slice(0, 2);
|
|
876
|
-
const month = date.slice(2, 4);
|
|
877
|
-
const day = date.slice(4, 6);
|
|
878
|
-
const reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z';
|
|
879
|
-
return reconstructedDate;
|
|
880
|
-
}
|
|
881
873
|
createExpiredOptionMarket(symbol) {
|
|
882
874
|
// support expired option contracts
|
|
883
875
|
const quote = 'USDT';
|
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -1450,15 +1450,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
1450
1450
|
// ],
|
|
1451
1451
|
// "fee": "1.22" // only for WITHDRAW
|
|
1452
1452
|
// }
|
|
1453
|
-
// }
|
|
1454
|
-
//
|
|
1453
|
+
// },
|
|
1454
|
+
// "operation_id": "084cfcd5-06b9-4826-882e-fdb75ec3625d", // only for WITHDRAW
|
|
1455
|
+
// "commit_risk": {}
|
|
1455
1456
|
// withdraw
|
|
1456
1457
|
//
|
|
1457
1458
|
// {
|
|
1458
1459
|
// "id":"084cfcd5-06b9-4826-882e-fdb75ec3625d"
|
|
1459
1460
|
// }
|
|
1460
1461
|
//
|
|
1461
|
-
const id = this.
|
|
1462
|
+
const id = this.safeString2(transaction, 'operation_id', 'id');
|
|
1462
1463
|
const timestamp = this.parse8601(this.safeString(transaction, 'created_at'));
|
|
1463
1464
|
const updated = this.parse8601(this.safeString(transaction, 'updated_at'));
|
|
1464
1465
|
const type = this.parseTransactionType(this.safeString(transaction, 'type'));
|
|
@@ -1931,7 +1932,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
1931
1932
|
// }
|
|
1932
1933
|
// ]
|
|
1933
1934
|
//
|
|
1934
|
-
const order = this.
|
|
1935
|
+
const order = this.safeDict(response, 0);
|
|
1935
1936
|
return this.parseOrder(order, market);
|
|
1936
1937
|
}
|
|
1937
1938
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
package/dist/cjs/src/hollaex.js
CHANGED
|
@@ -632,7 +632,7 @@ class hollaex extends hollaex$1 {
|
|
|
632
632
|
// ]
|
|
633
633
|
// }
|
|
634
634
|
//
|
|
635
|
-
const trades = this.
|
|
635
|
+
const trades = this.safeList(response, market['id'], []);
|
|
636
636
|
return this.parseTrades(trades, market, since, limit);
|
|
637
637
|
}
|
|
638
638
|
parseTrade(trade, market = undefined) {
|
|
@@ -1055,7 +1055,7 @@ class hollaex extends hollaex$1 {
|
|
|
1055
1055
|
// ]
|
|
1056
1056
|
// }
|
|
1057
1057
|
//
|
|
1058
|
-
const data = this.
|
|
1058
|
+
const data = this.safeList(response, 'data', []);
|
|
1059
1059
|
return this.parseOrders(data, market, since, limit);
|
|
1060
1060
|
}
|
|
1061
1061
|
parseOrderStatus(status) {
|
|
@@ -1319,7 +1319,7 @@ class hollaex extends hollaex$1 {
|
|
|
1319
1319
|
// ]
|
|
1320
1320
|
// }
|
|
1321
1321
|
//
|
|
1322
|
-
const data = this.
|
|
1322
|
+
const data = this.safeList(response, 'data', []);
|
|
1323
1323
|
return this.parseTrades(data, market, since, limit);
|
|
1324
1324
|
}
|
|
1325
1325
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
@@ -1472,7 +1472,7 @@ class hollaex extends hollaex$1 {
|
|
|
1472
1472
|
// ]
|
|
1473
1473
|
// }
|
|
1474
1474
|
//
|
|
1475
|
-
const data = this.
|
|
1475
|
+
const data = this.safeList(response, 'data', []);
|
|
1476
1476
|
return this.parseTransactions(data, currency, since, limit);
|
|
1477
1477
|
}
|
|
1478
1478
|
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
@@ -1520,7 +1520,7 @@ class hollaex extends hollaex$1 {
|
|
|
1520
1520
|
// }
|
|
1521
1521
|
//
|
|
1522
1522
|
const data = this.safeValue(response, 'data', []);
|
|
1523
|
-
const transaction = this.
|
|
1523
|
+
const transaction = this.safeDict(data, 0, {});
|
|
1524
1524
|
return this.parseTransaction(transaction, currency);
|
|
1525
1525
|
}
|
|
1526
1526
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1580,7 +1580,7 @@ class hollaex extends hollaex$1 {
|
|
|
1580
1580
|
// ]
|
|
1581
1581
|
// }
|
|
1582
1582
|
//
|
|
1583
|
-
const data = this.
|
|
1583
|
+
const data = this.safeList(response, 'data', []);
|
|
1584
1584
|
return this.parseTransactions(data, currency, since, limit);
|
|
1585
1585
|
}
|
|
1586
1586
|
parseTransaction(transaction, currency = undefined) {
|
|
@@ -1841,7 +1841,7 @@ class hollaex extends hollaex$1 {
|
|
|
1841
1841
|
// "network":"https://api.hollaex.network"
|
|
1842
1842
|
// }
|
|
1843
1843
|
//
|
|
1844
|
-
const coins = this.
|
|
1844
|
+
const coins = this.safeList(response, 'coins');
|
|
1845
1845
|
return this.parseDepositWithdrawFees(coins, codes, 'symbol');
|
|
1846
1846
|
}
|
|
1847
1847
|
normalizeNumberIfNeeded(number) {
|