ccxt 4.5.5 → 4.5.7
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 +4 -4
- package/dist/ccxt.browser.min.js +15 -15
- package/dist/cjs/ccxt.js +6 -6
- package/dist/cjs/src/abstract/toobit.js +11 -0
- package/dist/cjs/src/abstract/tradeogre.js +1 -1
- package/dist/cjs/src/apex.js +2 -2
- package/dist/cjs/src/backpack.js +1 -1
- package/dist/cjs/src/base/Exchange.js +129 -2
- package/dist/cjs/src/bigone.js +4 -4
- package/dist/cjs/src/binance.js +82 -20
- package/dist/cjs/src/bingx.js +5 -2
- package/dist/cjs/src/bitbank.js +1 -0
- package/dist/cjs/src/bitbns.js +1 -0
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bitget.js +16 -9
- package/dist/cjs/src/bithumb.js +1 -0
- package/dist/cjs/src/bitso.js +1 -0
- package/dist/cjs/src/bitvavo.js +26 -40
- package/dist/cjs/src/blockchaincom.js +1 -0
- package/dist/cjs/src/btcalpha.js +1 -0
- package/dist/cjs/src/btcbox.js +1 -0
- package/dist/cjs/src/btcmarkets.js +1 -0
- package/dist/cjs/src/btcturk.js +1 -0
- package/dist/cjs/src/bybit.js +186 -127
- package/dist/cjs/src/coinsph.js +4 -1
- package/dist/cjs/src/cryptocom.js +6 -3
- package/dist/cjs/src/deribit.js +3 -2
- package/dist/cjs/src/digifinex.js +1 -1
- package/dist/cjs/src/gate.js +9 -13
- package/dist/cjs/src/gemini.js +5 -5
- package/dist/cjs/src/htx.js +11 -1
- package/dist/cjs/src/hyperliquid.js +3 -0
- package/dist/cjs/src/independentreserve.js +1 -0
- package/dist/cjs/src/indodax.js +17 -6
- package/dist/cjs/src/kraken.js +31 -8
- package/dist/cjs/src/krakenfutures.js +1 -0
- package/dist/cjs/src/kucoin.js +1 -2
- package/dist/cjs/src/luno.js +4 -1
- package/dist/cjs/src/mercado.js +1 -0
- package/dist/cjs/src/mexc.js +84 -37
- package/dist/cjs/src/novadax.js +1 -0
- package/dist/cjs/src/oceanex.js +1 -0
- package/dist/cjs/src/okcoin.js +4 -1
- package/dist/cjs/src/okx.js +52 -8
- package/dist/cjs/src/phemex.js +1 -1
- package/dist/cjs/src/pro/apex.js +8 -4
- package/dist/cjs/src/pro/backpack.js +7 -5
- package/dist/cjs/src/pro/binance.js +150 -19
- package/dist/cjs/src/pro/bingx.js +206 -220
- package/dist/cjs/src/pro/bitget.js +332 -76
- package/dist/cjs/src/pro/cex.js +1 -0
- package/dist/cjs/src/pro/htx.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +1 -0
- package/dist/cjs/src/pro/mexc.js +23 -23
- package/dist/cjs/src/pro/okx.js +46 -10
- package/dist/cjs/src/pro/toobit.js +1163 -0
- package/dist/cjs/src/pro/tradeogre.js +1 -1
- package/dist/cjs/src/toobit.js +2999 -0
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/upbit.js +1 -0
- package/dist/cjs/src/wavesexchange.js +1 -0
- package/dist/cjs/src/yobit.js +1 -0
- package/dist/cjs/src/zaif.js +1 -0
- package/dist/cjs/src/zonda.js +1 -0
- package/js/ccxt.d.ts +8 -8
- package/js/ccxt.js +6 -6
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/abstract/myokx.d.ts +1 -0
- package/js/src/abstract/okx.d.ts +1 -0
- package/js/src/abstract/okxus.d.ts +1 -0
- package/js/src/abstract/toobit.d.ts +66 -0
- package/js/src/apex.js +2 -2
- package/js/src/backpack.js +1 -1
- package/js/src/base/Exchange.d.ts +9 -0
- package/js/src/base/Exchange.js +129 -2
- package/js/src/bigone.js +4 -4
- package/js/src/binance.d.ts +9 -0
- package/js/src/binance.js +82 -20
- package/js/src/bingx.js +5 -2
- package/js/src/bitbank.js +1 -0
- package/js/src/bitbns.js +1 -0
- package/js/src/bitflyer.js +1 -0
- package/js/src/bitget.js +16 -9
- package/js/src/bithumb.js +1 -0
- package/js/src/bitso.js +1 -0
- package/js/src/bitvavo.d.ts +0 -2
- package/js/src/bitvavo.js +27 -41
- package/js/src/blockchaincom.js +1 -0
- package/js/src/btcalpha.js +1 -0
- package/js/src/btcbox.js +1 -0
- package/js/src/btcmarkets.js +1 -0
- package/js/src/btcturk.js +1 -0
- package/js/src/bybit.d.ts +8 -0
- package/js/src/bybit.js +186 -127
- package/js/src/coinsph.js +4 -1
- package/js/src/cryptocom.js +6 -3
- package/js/src/deribit.js +3 -2
- package/js/src/digifinex.js +1 -1
- package/js/src/gate.d.ts +2 -2
- package/js/src/gate.js +9 -13
- package/js/src/gemini.js +5 -5
- package/js/src/htx.js +11 -1
- package/js/src/hyperliquid.js +3 -0
- package/js/src/independentreserve.js +1 -0
- package/js/src/indodax.js +17 -6
- package/js/src/kraken.d.ts +2 -2
- package/js/src/kraken.js +31 -8
- package/js/src/krakenfutures.js +1 -0
- package/js/src/kucoin.js +1 -2
- package/js/src/luno.js +4 -1
- package/js/src/mercado.js +1 -0
- package/js/src/mexc.d.ts +4 -1
- package/js/src/mexc.js +84 -37
- package/js/src/novadax.js +1 -0
- package/js/src/oceanex.js +1 -0
- package/js/src/okcoin.js +4 -1
- package/js/src/okx.js +52 -8
- package/js/src/phemex.js +1 -1
- package/js/src/pro/apex.js +8 -4
- package/js/src/pro/backpack.d.ts +1 -1
- package/js/src/pro/backpack.js +7 -5
- package/js/src/pro/binance.d.ts +24 -0
- package/js/src/pro/binance.js +150 -19
- package/js/src/pro/bingx.d.ts +53 -33
- package/js/src/pro/bingx.js +207 -221
- package/js/src/pro/bitget.d.ts +6 -0
- package/js/src/pro/bitget.js +332 -76
- package/js/src/pro/cex.js +1 -0
- package/js/src/pro/htx.js +1 -1
- package/js/src/pro/independentreserve.js +1 -0
- package/js/src/pro/mexc.js +23 -23
- package/js/src/pro/okx.d.ts +7 -1
- package/js/src/pro/okx.js +46 -10
- package/js/src/pro/toobit.d.ts +174 -0
- package/js/src/pro/toobit.js +1162 -0
- package/js/src/toobit.d.ts +456 -0
- package/js/src/toobit.js +2992 -0
- package/js/src/upbit.js +1 -0
- package/js/src/wavesexchange.js +1 -0
- package/js/src/yobit.js +1 -0
- package/js/src/zaif.js +1 -0
- package/js/src/zonda.js +1 -0
- package/package.json +1 -1
- package/dist/373.ccxt.browser.js +0 -7630
- package/dist/373.ccxt.browser.min.js +0 -1
- package/js/src/abstract/tradeogre.d.ts +0 -21
- package/js/src/pro/tradeogre.d.ts +0 -49
- package/js/src/pro/tradeogre.js +0 -278
- package/js/src/tradeogre.d.ts +0 -149
- package/js/src/tradeogre.js +0 -872
- /package/js/src/abstract/{tradeogre.js → toobit.js} +0 -0
package/dist/cjs/src/coinsph.js
CHANGED
|
@@ -328,6 +328,9 @@ class coinsph extends coinsph$1["default"] {
|
|
|
328
328
|
'features': {
|
|
329
329
|
'spot': {
|
|
330
330
|
'sandbox': false,
|
|
331
|
+
'fetchCurrencies': {
|
|
332
|
+
'private': true,
|
|
333
|
+
},
|
|
331
334
|
'createOrder': {
|
|
332
335
|
'marginMode': false,
|
|
333
336
|
'triggerPrice': true,
|
|
@@ -523,7 +526,7 @@ class coinsph extends coinsph$1["default"] {
|
|
|
523
526
|
*/
|
|
524
527
|
async fetchCurrencies(params = {}) {
|
|
525
528
|
if (!this.checkRequiredCredentials(false)) {
|
|
526
|
-
return
|
|
529
|
+
return {};
|
|
527
530
|
}
|
|
528
531
|
const response = await this.privateGetOpenapiWalletV1ConfigGetall(params);
|
|
529
532
|
//
|
|
@@ -438,6 +438,9 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
438
438
|
},
|
|
439
439
|
'spot': {
|
|
440
440
|
'extends': 'default',
|
|
441
|
+
'fetchCurrencies': {
|
|
442
|
+
'private': true,
|
|
443
|
+
},
|
|
441
444
|
},
|
|
442
445
|
'swap': {
|
|
443
446
|
'linear': {
|
|
@@ -532,13 +535,13 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
532
535
|
async fetchCurrencies(params = {}) {
|
|
533
536
|
// this endpoint requires authentication
|
|
534
537
|
if (!this.checkRequiredCredentials(false)) {
|
|
535
|
-
return
|
|
538
|
+
return {};
|
|
536
539
|
}
|
|
537
540
|
let skipFetchCurrencies = false;
|
|
538
541
|
[skipFetchCurrencies, params] = this.handleOptionAndParams(params, 'fetchCurrencies', 'skipFetchCurrencies', false);
|
|
539
542
|
if (skipFetchCurrencies) {
|
|
540
543
|
// sub-accounts can't access this endpoint
|
|
541
|
-
return
|
|
544
|
+
return {};
|
|
542
545
|
}
|
|
543
546
|
let response = {};
|
|
544
547
|
try {
|
|
@@ -548,7 +551,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
548
551
|
if (e instanceof errors.ExchangeError) {
|
|
549
552
|
// sub-accounts can't access this endpoint
|
|
550
553
|
// {"code":"10001","msg":"SYS_ERROR"}
|
|
551
|
-
return
|
|
554
|
+
return {};
|
|
552
555
|
}
|
|
553
556
|
throw e;
|
|
554
557
|
// do nothing
|
package/dist/cjs/src/deribit.js
CHANGED
|
@@ -2710,8 +2710,9 @@ class deribit extends deribit$1["default"] {
|
|
|
2710
2710
|
'notional': this.parseNumber(notionalStringAbs),
|
|
2711
2711
|
'leverage': this.safeInteger(position, 'leverage'),
|
|
2712
2712
|
'unrealizedPnl': this.parseNumber(unrealizedPnl),
|
|
2713
|
-
'
|
|
2714
|
-
'
|
|
2713
|
+
'realizedPnl': this.safeNumber(position, 'realized_profit_loss'),
|
|
2714
|
+
'contracts': this.safeNumber(position, 'size'),
|
|
2715
|
+
'contractSize': this.safeNumber(position, 'contractSize'),
|
|
2715
2716
|
'marginRatio': undefined,
|
|
2716
2717
|
'liquidationPrice': this.safeNumber(position, 'estimated_liquidation_price'),
|
|
2717
2718
|
'markPrice': this.safeNumber(position, 'mark_price'),
|
|
@@ -528,7 +528,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
528
528
|
const networks = {};
|
|
529
529
|
for (let j = 0; j < networkEntries.length; j++) {
|
|
530
530
|
const networkEntry = networkEntries[j];
|
|
531
|
-
const networkId = this.
|
|
531
|
+
const networkId = this.safeString2(networkEntry, 'chain', 'currency');
|
|
532
532
|
const networkCode = this.networkIdToCode(networkId);
|
|
533
533
|
networks[networkCode] = {
|
|
534
534
|
'id': networkId,
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -1444,8 +1444,8 @@ class gate extends gate$1["default"] {
|
|
|
1444
1444
|
// "leverage_min": "1",
|
|
1445
1445
|
// "leverage_max": "100",
|
|
1446
1446
|
// "risk_limit_max": "8000000",
|
|
1447
|
-
// "maker_fee_rate": "-0.00025",
|
|
1448
|
-
// "taker_fee_rate": "0.00075",
|
|
1447
|
+
// "maker_fee_rate": "-0.00025", // not actual value for regular users
|
|
1448
|
+
// "taker_fee_rate": "0.00075", // not actual value for regular users
|
|
1449
1449
|
// "funding_rate": "0.002053",
|
|
1450
1450
|
// "order_size_max": 1000000,
|
|
1451
1451
|
// "funding_next_apply": 1610035200,
|
|
@@ -1489,8 +1489,8 @@ class gate extends gate$1["default"] {
|
|
|
1489
1489
|
// "risk_limit_base": "140.726652109199",
|
|
1490
1490
|
// "risk_limit_step": "1000000",
|
|
1491
1491
|
// "risk_limit_max": "8000000",
|
|
1492
|
-
// "maker_fee_rate": "-0.00025",
|
|
1493
|
-
// "taker_fee_rate": "0.00075",
|
|
1492
|
+
// "maker_fee_rate": "-0.00025", // not actual value for regular users
|
|
1493
|
+
// "taker_fee_rate": "0.00075", // not actual value for regular users
|
|
1494
1494
|
// "ref_discount_rate": "0",
|
|
1495
1495
|
// "ref_rebate_rate": "0.2",
|
|
1496
1496
|
// "order_price_deviate": "0.5",
|
|
@@ -1529,8 +1529,6 @@ class gate extends gate$1["default"] {
|
|
|
1529
1529
|
const maxMultiplier = Precise["default"].stringAdd('1', priceDeviate);
|
|
1530
1530
|
const minPrice = Precise["default"].stringMul(minMultiplier, markPrice);
|
|
1531
1531
|
const maxPrice = Precise["default"].stringMul(maxMultiplier, markPrice);
|
|
1532
|
-
const takerPercent = this.safeString(market, 'taker_fee_rate');
|
|
1533
|
-
const makerPercent = this.safeString(market, 'maker_fee_rate', takerPercent);
|
|
1534
1532
|
const isLinear = quote === settle;
|
|
1535
1533
|
let contractSize = this.safeString(market, 'quanto_multiplier');
|
|
1536
1534
|
// exception only for one market: https://api.gateio.ws/api/v4/futures/btc/contracts
|
|
@@ -1556,8 +1554,8 @@ class gate extends gate$1["default"] {
|
|
|
1556
1554
|
'contract': true,
|
|
1557
1555
|
'linear': isLinear,
|
|
1558
1556
|
'inverse': !isLinear,
|
|
1559
|
-
'taker':
|
|
1560
|
-
'maker':
|
|
1557
|
+
'taker': undefined,
|
|
1558
|
+
'maker': undefined,
|
|
1561
1559
|
'contractSize': this.parseNumber(contractSize),
|
|
1562
1560
|
'expiry': expiry,
|
|
1563
1561
|
'expiryDatetime': this.iso8601(expiry),
|
|
@@ -1656,8 +1654,6 @@ class gate extends gate$1["default"] {
|
|
|
1656
1654
|
const maxMultiplier = Precise["default"].stringAdd('1', priceDeviate);
|
|
1657
1655
|
const minPrice = Precise["default"].stringMul(minMultiplier, markPrice);
|
|
1658
1656
|
const maxPrice = Precise["default"].stringMul(maxMultiplier, markPrice);
|
|
1659
|
-
const takerPercent = this.safeString(market, 'taker_fee_rate');
|
|
1660
|
-
const makerPercent = this.safeString(market, 'maker_fee_rate', takerPercent);
|
|
1661
1657
|
result.push({
|
|
1662
1658
|
'id': id,
|
|
1663
1659
|
'symbol': symbol,
|
|
@@ -1677,8 +1673,8 @@ class gate extends gate$1["default"] {
|
|
|
1677
1673
|
'contract': true,
|
|
1678
1674
|
'linear': true,
|
|
1679
1675
|
'inverse': false,
|
|
1680
|
-
'taker':
|
|
1681
|
-
'maker':
|
|
1676
|
+
'taker': undefined,
|
|
1677
|
+
'maker': undefined,
|
|
1682
1678
|
'contractSize': this.parseNumber('1'),
|
|
1683
1679
|
'expiry': expiry,
|
|
1684
1680
|
'expiryDatetime': this.iso8601(expiry),
|
|
@@ -1874,7 +1870,7 @@ class gate extends gate$1["default"] {
|
|
|
1874
1870
|
// sandbox/testnet only supports future markets
|
|
1875
1871
|
const apiBackup = this.safeValue(this.urls, 'apiBackup');
|
|
1876
1872
|
if (apiBackup !== undefined) {
|
|
1877
|
-
return
|
|
1873
|
+
return {};
|
|
1878
1874
|
}
|
|
1879
1875
|
const response = await this.publicSpotGetCurrencies(params);
|
|
1880
1876
|
//
|
package/dist/cjs/src/gemini.js
CHANGED
|
@@ -388,7 +388,7 @@ class gemini extends gemini$1["default"] {
|
|
|
388
388
|
async fetchCurrenciesFromWeb(params = {}) {
|
|
389
389
|
const data = await this.fetchWebEndpoint('fetchCurrencies', 'webExchangeGet', true, '="currencyData">', '</script>');
|
|
390
390
|
if (data === undefined) {
|
|
391
|
-
return
|
|
391
|
+
return {};
|
|
392
392
|
}
|
|
393
393
|
//
|
|
394
394
|
// {
|
|
@@ -670,9 +670,9 @@ class gemini extends gemini$1["default"] {
|
|
|
670
670
|
const indexedTradingPairs = this.indexBy(tradingPairs, 0);
|
|
671
671
|
for (let i = 0; i < marketIds.length; i++) {
|
|
672
672
|
const marketId = marketIds[i];
|
|
673
|
-
const
|
|
674
|
-
if (
|
|
675
|
-
result.push(this.parseMarket(
|
|
673
|
+
const pairInfo = this.safeList(indexedTradingPairs, marketId.toUpperCase());
|
|
674
|
+
if (pairInfo !== undefined && !this.inArray(marketId, brokenPairs)) {
|
|
675
|
+
result.push(this.parseMarket(pairInfo));
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
}
|
|
@@ -1457,7 +1457,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1457
1457
|
// "is_hidden":false,
|
|
1458
1458
|
// "was_forced":false,
|
|
1459
1459
|
// "executed_amount":"0",
|
|
1460
|
-
// "client_order_id":"
|
|
1460
|
+
// "client_order_id":"1650398445701",
|
|
1461
1461
|
// "options":[],
|
|
1462
1462
|
// "price":"2000.00",
|
|
1463
1463
|
// "original_amount":"0.01",
|
package/dist/cjs/src/htx.js
CHANGED
|
@@ -2796,7 +2796,17 @@ class htx extends htx$1["default"] {
|
|
|
2796
2796
|
'currency': feeCurrency,
|
|
2797
2797
|
};
|
|
2798
2798
|
}
|
|
2799
|
-
|
|
2799
|
+
// htx's multi-market trade-id is a bit complex to parse accordingly.
|
|
2800
|
+
// - for `id` which contains hyphen, it would be the unique id, eg. xxxxxx-1, xxxxxx-2 (this happens mostly for contract markets)
|
|
2801
|
+
// - otherwise the least priority is given to the `id` key
|
|
2802
|
+
let id = undefined;
|
|
2803
|
+
const safeId = this.safeString(trade, 'id');
|
|
2804
|
+
if (safeId !== undefined && safeId.indexOf('-') >= 0) {
|
|
2805
|
+
id = safeId;
|
|
2806
|
+
}
|
|
2807
|
+
else {
|
|
2808
|
+
id = this.safeStringN(trade, ['trade_id', 'trade-id', 'id']);
|
|
2809
|
+
}
|
|
2800
2810
|
return this.safeTrade({
|
|
2801
2811
|
'id': id,
|
|
2802
2812
|
'info': trade,
|
|
@@ -3567,6 +3567,9 @@ class hyperliquid extends hyperliquid$1["default"] {
|
|
|
3567
3567
|
}
|
|
3568
3568
|
const until = this.safeInteger(params, 'until');
|
|
3569
3569
|
if (until !== undefined) {
|
|
3570
|
+
if (since === undefined) {
|
|
3571
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchDeposits requires since while until is set');
|
|
3572
|
+
}
|
|
3570
3573
|
request['endTime'] = until;
|
|
3571
3574
|
params = this.omit(params, ['until']);
|
|
3572
3575
|
}
|
|
@@ -52,6 +52,7 @@ class independentreserve extends independentreserve$1["default"] {
|
|
|
52
52
|
'fetchClosedOrders': true,
|
|
53
53
|
'fetchCrossBorrowRate': false,
|
|
54
54
|
'fetchCrossBorrowRates': false,
|
|
55
|
+
'fetchCurrencies': false,
|
|
55
56
|
'fetchDepositAddress': true,
|
|
56
57
|
'fetchDepositAddresses': false,
|
|
57
58
|
'fetchDepositAddressesByNetwork': false,
|
package/dist/cjs/src/indodax.js
CHANGED
|
@@ -56,6 +56,7 @@ class indodax extends indodax$1["default"] {
|
|
|
56
56
|
'fetchClosedOrders': true,
|
|
57
57
|
'fetchCrossBorrowRate': false,
|
|
58
58
|
'fetchCrossBorrowRates': false,
|
|
59
|
+
'fetchCurrencies': false,
|
|
59
60
|
'fetchDeposit': false,
|
|
60
61
|
'fetchDepositAddress': 'emulated',
|
|
61
62
|
'fetchDepositAddresses': true,
|
|
@@ -365,7 +366,7 @@ class indodax extends indodax$1["default"] {
|
|
|
365
366
|
const result = [];
|
|
366
367
|
for (let i = 0; i < response.length; i++) {
|
|
367
368
|
const market = response[i];
|
|
368
|
-
const id = this.safeString(market, '
|
|
369
|
+
const id = this.safeString(market, 'id');
|
|
369
370
|
const baseId = this.safeString(market, 'traded_currency');
|
|
370
371
|
const quoteId = this.safeString(market, 'base_currency');
|
|
371
372
|
const base = this.safeCurrencyCode(baseId);
|
|
@@ -504,7 +505,7 @@ class indodax extends indodax$1["default"] {
|
|
|
504
505
|
await this.loadMarkets();
|
|
505
506
|
const market = this.market(symbol);
|
|
506
507
|
const request = {
|
|
507
|
-
'pair': market['
|
|
508
|
+
'pair': market['id'],
|
|
508
509
|
};
|
|
509
510
|
const orderbook = await this.publicGetApiDepthPair(this.extend(request, params));
|
|
510
511
|
return this.parseOrderBook(orderbook, market['symbol'], undefined, 'buy', 'sell');
|
|
@@ -563,7 +564,7 @@ class indodax extends indodax$1["default"] {
|
|
|
563
564
|
await this.loadMarkets();
|
|
564
565
|
const market = this.market(symbol);
|
|
565
566
|
const request = {
|
|
566
|
-
'pair': market['
|
|
567
|
+
'pair': market['id'],
|
|
567
568
|
};
|
|
568
569
|
const response = await this.publicGetApiTickerPair(this.extend(request, params));
|
|
569
570
|
//
|
|
@@ -612,7 +613,17 @@ class indodax extends indodax$1["default"] {
|
|
|
612
613
|
//
|
|
613
614
|
const response = await this.publicGetApiTickerAll(params);
|
|
614
615
|
const tickers = this.safeDict(response, 'tickers', {});
|
|
615
|
-
|
|
616
|
+
const keys = Object.keys(tickers);
|
|
617
|
+
const parsedTickers = {};
|
|
618
|
+
for (let i = 0; i < keys.length; i++) {
|
|
619
|
+
const key = keys[i];
|
|
620
|
+
const rawTicker = tickers[key];
|
|
621
|
+
const marketId = key.replace('_', '');
|
|
622
|
+
const market = this.safeMarket(marketId);
|
|
623
|
+
const parsed = this.parseTicker(rawTicker, market);
|
|
624
|
+
parsedTickers[marketId] = parsed;
|
|
625
|
+
}
|
|
626
|
+
return this.filterByArray(parsedTickers, 'symbol', symbols);
|
|
616
627
|
}
|
|
617
628
|
parseTrade(trade, market = undefined) {
|
|
618
629
|
const timestamp = this.safeTimestamp(trade, 'date');
|
|
@@ -647,7 +658,7 @@ class indodax extends indodax$1["default"] {
|
|
|
647
658
|
await this.loadMarkets();
|
|
648
659
|
const market = this.market(symbol);
|
|
649
660
|
const request = {
|
|
650
|
-
'pair': market['
|
|
661
|
+
'pair': market['id'],
|
|
651
662
|
};
|
|
652
663
|
const response = await this.publicGetApiTradesPair(this.extend(request, params));
|
|
653
664
|
return this.parseTrades(response, market, since, limit);
|
|
@@ -694,7 +705,7 @@ class indodax extends indodax$1["default"] {
|
|
|
694
705
|
const request = {
|
|
695
706
|
'to': until,
|
|
696
707
|
'tf': selectedTimeframe,
|
|
697
|
-
'symbol': market['
|
|
708
|
+
'symbol': market['id'],
|
|
698
709
|
};
|
|
699
710
|
if (limit === undefined) {
|
|
700
711
|
limit = 1000;
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -236,6 +236,23 @@ class kraken extends kraken$1["default"] {
|
|
|
236
236
|
'XBT': 'BTC',
|
|
237
237
|
'XDG': 'DOGE',
|
|
238
238
|
'FEE': 'KFEE',
|
|
239
|
+
'XETC': 'ETC',
|
|
240
|
+
'XETH': 'ETH',
|
|
241
|
+
'XLTC': 'LTC',
|
|
242
|
+
'XMLN': 'MLN',
|
|
243
|
+
'XREP': 'REP',
|
|
244
|
+
'XXBT': 'BTC',
|
|
245
|
+
'XXDG': 'DOGE',
|
|
246
|
+
'XXLM': 'XLM',
|
|
247
|
+
'XXMR': 'XMR',
|
|
248
|
+
'XXRP': 'XRP',
|
|
249
|
+
'XZEC': 'ZEC',
|
|
250
|
+
'ZAUD': 'AUD',
|
|
251
|
+
'ZCAD': 'CAD',
|
|
252
|
+
'ZEUR': 'EUR',
|
|
253
|
+
'ZGBP': 'GBP',
|
|
254
|
+
'ZJPY': 'JPY',
|
|
255
|
+
'ZUSD': 'USD',
|
|
239
256
|
},
|
|
240
257
|
'options': {
|
|
241
258
|
'timeDifference': 0,
|
|
@@ -429,6 +446,7 @@ class kraken extends kraken$1["default"] {
|
|
|
429
446
|
'OriginTrail': 'OTP',
|
|
430
447
|
'Celestia': 'TIA',
|
|
431
448
|
},
|
|
449
|
+
'marketHelperProps': ['marketsByAltname', 'delistedMarketsById'], // used by setMarketsFromExchange
|
|
432
450
|
},
|
|
433
451
|
'features': {
|
|
434
452
|
'spot': {
|
|
@@ -615,10 +633,12 @@ class kraken extends kraken$1["default"] {
|
|
|
615
633
|
for (let i = 0; i < keys.length; i++) {
|
|
616
634
|
const id = keys[i];
|
|
617
635
|
const market = markets[id];
|
|
618
|
-
const
|
|
619
|
-
const
|
|
620
|
-
const
|
|
621
|
-
const
|
|
636
|
+
const baseIdRaw = this.safeString(market, 'base');
|
|
637
|
+
const quoteIdRaw = this.safeString(market, 'quote');
|
|
638
|
+
const baseId = this.safeCurrencyCode(baseIdRaw);
|
|
639
|
+
const quoteId = this.safeCurrencyCode(quoteIdRaw);
|
|
640
|
+
const base = baseId;
|
|
641
|
+
const quote = quoteId;
|
|
622
642
|
const makerFees = this.safeList(market, 'fees_maker', []);
|
|
623
643
|
const firstMakerFee = this.safeList(makerFees, 0, []);
|
|
624
644
|
const firstMakerFeeRate = this.safeString(firstMakerFee, 1);
|
|
@@ -2528,7 +2548,7 @@ class kraken extends kraken$1["default"] {
|
|
|
2528
2548
|
* @name kraken#cancelAllOrders
|
|
2529
2549
|
* @description cancel all open orders
|
|
2530
2550
|
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelAllOrders
|
|
2531
|
-
* @param {string} symbol unified market symbol,
|
|
2551
|
+
* @param {string} symbol unified market symbol, not used by kraken cancelAllOrders (all open orders are cancelled)
|
|
2532
2552
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2533
2553
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2534
2554
|
*/
|
|
@@ -3193,22 +3213,25 @@ class kraken extends kraken$1["default"] {
|
|
|
3193
3213
|
* @see https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
|
|
3194
3214
|
* @param {string} code unified currency code
|
|
3195
3215
|
* @param {float} amount the amount to withdraw
|
|
3196
|
-
* @param {string} address the address to withdraw to
|
|
3216
|
+
* @param {string} address the address to withdraw to, not required can be '' or undefined/none/null
|
|
3197
3217
|
* @param {string} tag
|
|
3198
3218
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3199
3219
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3200
3220
|
*/
|
|
3201
3221
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3202
3222
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
3203
|
-
this.checkAddress(address);
|
|
3204
3223
|
if ('key' in params) {
|
|
3205
3224
|
await this.loadMarkets();
|
|
3206
3225
|
const currency = this.currency(code);
|
|
3207
3226
|
const request = {
|
|
3208
3227
|
'asset': currency['id'],
|
|
3209
3228
|
'amount': amount,
|
|
3210
|
-
'address': address,
|
|
3229
|
+
// 'address': address,
|
|
3211
3230
|
};
|
|
3231
|
+
if (address !== undefined && address !== '') {
|
|
3232
|
+
request['address'] = address;
|
|
3233
|
+
this.checkAddress(address);
|
|
3234
|
+
}
|
|
3212
3235
|
const response = await this.privatePostWithdraw(this.extend(request, params));
|
|
3213
3236
|
//
|
|
3214
3237
|
// {
|
|
@@ -52,6 +52,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
52
52
|
'fetchClosedOrders': true,
|
|
53
53
|
'fetchCrossBorrowRate': false,
|
|
54
54
|
'fetchCrossBorrowRates': false,
|
|
55
|
+
'fetchCurrencies': false,
|
|
55
56
|
'fetchDepositAddress': false,
|
|
56
57
|
'fetchDepositAddresses': false,
|
|
57
58
|
'fetchDepositAddressesByNetwork': false,
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -1390,7 +1390,6 @@ class kucoin extends kucoin$1["default"] {
|
|
|
1390
1390
|
//
|
|
1391
1391
|
const currenciesData = this.safeList(response, 'data', []);
|
|
1392
1392
|
const brokenCurrencies = this.safeList(this.options, 'brokenCurrencies', ['00', 'OPEN_ERROR', 'HUF', 'BDT']);
|
|
1393
|
-
const otherFiats = this.safeList(this.options, 'fiats', ['KWD', 'IRR', 'PKR']);
|
|
1394
1393
|
const result = {};
|
|
1395
1394
|
for (let i = 0; i < currenciesData.length; i++) {
|
|
1396
1395
|
const entry = currenciesData[i];
|
|
@@ -1431,7 +1430,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
1431
1430
|
// kucoin has determined 'fiat' currencies with below logic
|
|
1432
1431
|
const rawPrecision = this.safeString(entry, 'precision');
|
|
1433
1432
|
const precision = this.parseNumber(this.parsePrecision(rawPrecision));
|
|
1434
|
-
const isFiat =
|
|
1433
|
+
const isFiat = chainsLength === 0;
|
|
1435
1434
|
result[code] = this.safeCurrencyStructure({
|
|
1436
1435
|
'id': id,
|
|
1437
1436
|
'name': this.safeString(entry, 'fullName'),
|
package/dist/cjs/src/luno.js
CHANGED
|
@@ -225,6 +225,9 @@ class luno extends luno$1["default"] {
|
|
|
225
225
|
'features': {
|
|
226
226
|
'spot': {
|
|
227
227
|
'sandbox': false,
|
|
228
|
+
'fetchCurrencies': {
|
|
229
|
+
'private': true,
|
|
230
|
+
},
|
|
228
231
|
'createOrder': {
|
|
229
232
|
'marginMode': false,
|
|
230
233
|
'triggerPrice': true,
|
|
@@ -311,7 +314,7 @@ class luno extends luno$1["default"] {
|
|
|
311
314
|
*/
|
|
312
315
|
async fetchCurrencies(params = {}) {
|
|
313
316
|
if (!this.checkRequiredCredentials(false)) {
|
|
314
|
-
return
|
|
317
|
+
return {};
|
|
315
318
|
}
|
|
316
319
|
const response = await this.privateGetSendNetworks(params);
|
|
317
320
|
//
|
package/dist/cjs/src/mercado.js
CHANGED
|
@@ -52,6 +52,7 @@ class mercado extends mercado$1["default"] {
|
|
|
52
52
|
'fetchBorrowRatesPerSymbol': false,
|
|
53
53
|
'fetchCrossBorrowRate': false,
|
|
54
54
|
'fetchCrossBorrowRates': false,
|
|
55
|
+
'fetchCurrencies': false,
|
|
55
56
|
'fetchDepositAddress': false,
|
|
56
57
|
'fetchDepositAddresses': false,
|
|
57
58
|
'fetchDepositAddressesByNetwork': false,
|