ccxt 4.5.56 → 4.5.57
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 +10 -9
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/apex.js +1 -1
- package/dist/cjs/src/arkham.js +3 -3
- package/dist/cjs/src/ascendex.js +2 -2
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +69 -32
- package/dist/cjs/src/base/functions/io.js +25 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bigone.js +3 -3
- package/dist/cjs/src/binance.js +192 -194
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bitmart.js +13 -6
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitopro.js +1 -1
- package/dist/cjs/src/bitrue.js +2 -2
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +2 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +0 -1
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +26 -3
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +3 -3
- package/dist/cjs/src/coinbase.js +75 -65
- package/dist/cjs/src/coinbaseexchange.js +2 -2
- package/dist/cjs/src/coinbaseinternational.js +2 -1
- package/dist/cjs/src/coinex.js +74 -74
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/cryptocom.js +46 -48
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +3 -2
- package/dist/cjs/src/delta.js +51 -52
- package/dist/cjs/src/deribit.js +31 -33
- package/dist/cjs/src/derive.js +26 -28
- package/dist/cjs/src/digifinex.js +43 -44
- package/dist/cjs/src/exmo.js +92 -83
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +71 -75
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +41 -43
- package/dist/cjs/src/grvt.js +4 -4
- package/dist/cjs/src/hashkey.js +52 -54
- package/dist/cjs/src/hitbtc.js +3 -13
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +75 -67
- package/dist/cjs/src/hyperliquid.js +41 -42
- package/dist/cjs/src/indodax.js +2 -2
- package/dist/cjs/src/kraken.js +57 -58
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +56 -56
- package/dist/cjs/src/lighter.js +35 -37
- package/dist/cjs/src/luno.js +35 -43
- package/dist/cjs/src/mexc.js +48 -49
- package/dist/cjs/src/modetrade.js +50 -52
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +17 -2
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/phemex.js +43 -45
- package/dist/cjs/src/poloniex.js +17 -12
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +1 -1
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +3 -3
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +3 -1
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +865 -0
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/toobit.js +1 -1
- package/dist/cjs/src/pro/weex.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +2 -2
- package/dist/cjs/src/upbit.js +3 -3
- package/dist/cjs/src/weex.js +57 -62
- package/dist/cjs/src/whitebit.js +61 -63
- package/dist/cjs/src/woo.js +65 -54
- package/dist/cjs/src/woofipro.js +53 -47
- package/dist/cjs/src/xt.js +1 -1
- package/dist/cjs/src/zebpay.js +70 -72
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/bitvavo.d.ts +15 -7
- package/js/src/abstract/extended.d.ts +58 -0
- package/js/src/apex.js +1 -1
- package/js/src/arkham.js +3 -3
- package/js/src/ascendex.js +2 -2
- package/js/src/aster.js +7 -4
- package/js/src/backpack.js +4 -4
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +69 -32
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +3 -3
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +196 -198
- package/js/src/bingx.js +3 -3
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitget.js +2 -2
- package/js/src/bitmart.js +13 -6
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.js +1 -1
- package/js/src/bitrue.js +2 -2
- package/js/src/bitso.js +1 -1
- package/js/src/bitstamp.js +2 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +0 -1
- package/js/src/bitvavo.d.ts +114 -21
- package/js/src/bitvavo.js +457 -34
- package/js/src/blofin.d.ts +1 -0
- package/js/src/blofin.js +26 -3
- package/js/src/bullish.js +6 -5
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.js +3 -3
- package/js/src/coinbase.d.ts +63 -56
- package/js/src/coinbase.js +75 -65
- package/js/src/coinbaseexchange.js +2 -2
- package/js/src/coinbaseinternational.js +2 -1
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +74 -74
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +46 -48
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +3 -2
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +51 -52
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +31 -33
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +26 -28
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +43 -44
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +92 -83
- package/js/src/extended.d.ts +554 -0
- package/js/src/extended.js +3490 -0
- package/js/src/foxbit.d.ts +1 -0
- package/js/src/foxbit.js +71 -75
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +53 -53
- package/js/src/gemini.d.ts +2 -1
- package/js/src/gemini.js +41 -43
- package/js/src/grvt.js +4 -4
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +52 -54
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +3 -13
- package/js/src/hollaex.d.ts +1 -0
- package/js/src/hollaex.js +51 -54
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +75 -67
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +41 -42
- package/js/src/indodax.js +2 -2
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +57 -58
- package/js/src/kucoin.js +3 -2
- package/js/src/latoken.d.ts +1 -0
- package/js/src/latoken.js +30 -32
- package/js/src/lbank.d.ts +1 -0
- package/js/src/lbank.js +56 -56
- package/js/src/lighter.d.ts +1 -0
- package/js/src/lighter.js +35 -37
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +35 -43
- package/js/src/mexc.d.ts +2 -1
- package/js/src/mexc.js +48 -49
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +50 -52
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +17 -2
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +43 -45
- package/js/src/poloniex.js +17 -12
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +1 -1
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.js +3 -3
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +3 -1
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +126 -0
- package/js/src/pro/extended.js +858 -0
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +3 -3
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/toobit.js +1 -1
- package/js/src/pro/weex.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.js +2 -2
- package/js/src/upbit.js +3 -3
- package/js/src/weex.d.ts +1 -0
- package/js/src/weex.js +57 -62
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +61 -63
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +65 -54
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +53 -47
- package/js/src/xt.js +1 -1
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +70 -72
- package/package.json +7 -7
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2933
- package/dist/cjs/src/pro/gateio.js +0 -18
- package/dist/cjs/src/pro/oxfun.js +0 -1113
- package/js/src/abstract/gateio.d.ts +0 -346
- package/js/src/abstract/gateio.js +0 -5
- package/js/src/abstract/oxfun.d.ts +0 -37
- package/js/src/gateio.d.ts +0 -4
- package/js/src/gateio.js +0 -11
- package/js/src/oxfun.d.ts +0 -442
- package/js/src/oxfun.js +0 -2926
- package/js/src/pro/gateio.d.ts +0 -4
- package/js/src/pro/gateio.js +0 -11
- package/js/src/pro/oxfun.d.ts +0 -234
- package/js/src/pro/oxfun.js +0 -1106
- /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
- /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/dist/cjs/src/foxbit.js
CHANGED
|
@@ -367,83 +367,79 @@ class foxbit extends foxbit$1["default"] {
|
|
|
367
367
|
// ]
|
|
368
368
|
// }
|
|
369
369
|
const data = this.safeList(response, 'data', []);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
'deposit': {
|
|
406
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
407
|
-
'max': undefined,
|
|
408
|
-
},
|
|
409
|
-
'withdraw': {
|
|
410
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
411
|
-
'max': undefined,
|
|
412
|
-
},
|
|
370
|
+
return this.parseCurrencies(data);
|
|
371
|
+
}
|
|
372
|
+
parseCurrency(rawCurrency) {
|
|
373
|
+
const precision = this.safeInteger(rawCurrency, 'precision');
|
|
374
|
+
const currencyId = this.safeString(rawCurrency, 'symbol');
|
|
375
|
+
const name = this.safeString(rawCurrency, 'name');
|
|
376
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
377
|
+
const depositInfo = this.safeDict(rawCurrency, 'deposit_info');
|
|
378
|
+
const withdrawInfo = this.safeDict(rawCurrency, 'withdraw_info');
|
|
379
|
+
const networks = this.safeList(rawCurrency, 'networks', []);
|
|
380
|
+
const type = this.safeStringLower(rawCurrency, 'type');
|
|
381
|
+
const parsedNetworks = {};
|
|
382
|
+
for (let j = 0; j < networks.length; j++) {
|
|
383
|
+
const network = networks[j];
|
|
384
|
+
const networkId = this.safeString(network, 'code');
|
|
385
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
386
|
+
const networkWithdrawInfo = this.safeDict(network, 'withdraw_info');
|
|
387
|
+
const networkDepositInfo = this.safeDict(network, 'deposit_info');
|
|
388
|
+
const isWithdrawEnabled = this.safeString(networkWithdrawInfo, 'status') === 'ENABLED';
|
|
389
|
+
const isDepositEnabled = this.safeString(networkDepositInfo, 'status') === 'ENABLED';
|
|
390
|
+
parsedNetworks[networkCode] = {
|
|
391
|
+
'info': rawCurrency,
|
|
392
|
+
'id': networkId,
|
|
393
|
+
'network': networkCode,
|
|
394
|
+
'name': this.safeString(network, 'name'),
|
|
395
|
+
'deposit': isDepositEnabled,
|
|
396
|
+
'withdraw': isWithdrawEnabled,
|
|
397
|
+
'active': true,
|
|
398
|
+
'precision': precision,
|
|
399
|
+
'fee': this.safeNumber(networkWithdrawInfo, 'fee'),
|
|
400
|
+
'limits': {
|
|
401
|
+
'amount': {
|
|
402
|
+
'min': undefined,
|
|
403
|
+
'max': undefined,
|
|
413
404
|
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
result[code] = this.safeCurrencyStructure({
|
|
418
|
-
'id': currencyId,
|
|
419
|
-
'code': code,
|
|
420
|
-
'info': currency,
|
|
421
|
-
'name': name,
|
|
422
|
-
'active': true,
|
|
423
|
-
'type': type,
|
|
424
|
-
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
425
|
-
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
426
|
-
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
427
|
-
'precision': precision,
|
|
428
|
-
'limits': {
|
|
429
|
-
'amount': {
|
|
430
|
-
'min': undefined,
|
|
431
|
-
'max': undefined,
|
|
432
|
-
},
|
|
433
|
-
'deposit': {
|
|
434
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
435
|
-
'max': undefined,
|
|
436
|
-
},
|
|
437
|
-
'withdraw': {
|
|
438
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
439
|
-
'max': undefined,
|
|
440
|
-
},
|
|
405
|
+
'deposit': {
|
|
406
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
407
|
+
'max': undefined,
|
|
441
408
|
},
|
|
442
|
-
'
|
|
443
|
-
|
|
444
|
-
|
|
409
|
+
'withdraw': {
|
|
410
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
411
|
+
'max': undefined,
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
};
|
|
445
415
|
}
|
|
446
|
-
return
|
|
416
|
+
return this.safeCurrencyStructure({
|
|
417
|
+
'id': currencyId,
|
|
418
|
+
'code': code,
|
|
419
|
+
'info': rawCurrency,
|
|
420
|
+
'name': name,
|
|
421
|
+
'active': true,
|
|
422
|
+
'type': type,
|
|
423
|
+
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
424
|
+
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
425
|
+
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
426
|
+
'precision': precision,
|
|
427
|
+
'limits': {
|
|
428
|
+
'amount': {
|
|
429
|
+
'min': undefined,
|
|
430
|
+
'max': undefined,
|
|
431
|
+
},
|
|
432
|
+
'deposit': {
|
|
433
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
434
|
+
'max': undefined,
|
|
435
|
+
},
|
|
436
|
+
'withdraw': {
|
|
437
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
438
|
+
'max': undefined,
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
'networks': parsedNetworks,
|
|
442
|
+
});
|
|
447
443
|
}
|
|
448
444
|
/**
|
|
449
445
|
* @method
|
|
@@ -1538,7 +1534,7 @@ class foxbit extends foxbit$1["default"] {
|
|
|
1538
1534
|
let networkCode = undefined;
|
|
1539
1535
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
1540
1536
|
if (networkCode !== undefined) {
|
|
1541
|
-
request['network_code'] = this.networkCodeToId(networkCode);
|
|
1537
|
+
request['network_code'] = this.networkCodeToId(networkCode, code);
|
|
1542
1538
|
}
|
|
1543
1539
|
const response = await this.v3PrivatePostWithdrawals(this.extend(request, params));
|
|
1544
1540
|
// {
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -1992,56 +1992,53 @@ class gate extends gate$1["default"] {
|
|
|
1992
1992
|
// },
|
|
1993
1993
|
// ]
|
|
1994
1994
|
//
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2016
|
-
'fee': undefined,
|
|
2017
|
-
'precision': this.parseNumber('0.0001'),
|
|
2018
|
-
'limits': {
|
|
2019
|
-
'deposit': {
|
|
2020
|
-
'min': undefined,
|
|
2021
|
-
'max': undefined,
|
|
2022
|
-
},
|
|
2023
|
-
'withdraw': {
|
|
2024
|
-
'min': undefined,
|
|
2025
|
-
'max': undefined,
|
|
2026
|
-
},
|
|
2027
|
-
},
|
|
2028
|
-
};
|
|
2029
|
-
}
|
|
2030
|
-
result[code] = this.safeCurrencyStructure({
|
|
2031
|
-
'id': currencyId,
|
|
2032
|
-
'code': code,
|
|
2033
|
-
'name': this.safeString(entry, 'name'),
|
|
2034
|
-
'type': type,
|
|
2035
|
-
'active': !this.safeBool(entry, 'delisted'),
|
|
2036
|
-
'deposit': !this.safeBool(entry, 'deposit_disabled'),
|
|
2037
|
-
'withdraw': !this.safeBool(entry, 'withdraw_disabled'),
|
|
1995
|
+
return this.parseCurrencies(response);
|
|
1996
|
+
}
|
|
1997
|
+
parseCurrency(rawCurrency) {
|
|
1998
|
+
const currencyId = this.safeString(rawCurrency, 'currency');
|
|
1999
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
2000
|
+
// check leveraged tokens (e.g. BTC3S, ETH5L)
|
|
2001
|
+
const type = this.isLeveragedCurrency(currencyId) ? 'leveraged' : 'crypto';
|
|
2002
|
+
const chains = this.safeList(rawCurrency, 'chains', []);
|
|
2003
|
+
const networks = {};
|
|
2004
|
+
for (let j = 0; j < chains.length; j++) {
|
|
2005
|
+
const chain = chains[j];
|
|
2006
|
+
const networkId = this.safeString(chain, 'name');
|
|
2007
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2008
|
+
networks[networkCode] = {
|
|
2009
|
+
'info': chain,
|
|
2010
|
+
'id': networkId,
|
|
2011
|
+
'network': networkCode,
|
|
2012
|
+
'active': undefined,
|
|
2013
|
+
'deposit': !this.safeBool(chain, 'deposit_disabled'),
|
|
2014
|
+
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2038
2015
|
'fee': undefined,
|
|
2039
|
-
'networks': networks,
|
|
2040
2016
|
'precision': this.parseNumber('0.0001'),
|
|
2041
|
-
'
|
|
2042
|
-
|
|
2017
|
+
'limits': {
|
|
2018
|
+
'deposit': {
|
|
2019
|
+
'min': undefined,
|
|
2020
|
+
'max': undefined,
|
|
2021
|
+
},
|
|
2022
|
+
'withdraw': {
|
|
2023
|
+
'min': undefined,
|
|
2024
|
+
'max': undefined,
|
|
2025
|
+
},
|
|
2026
|
+
},
|
|
2027
|
+
};
|
|
2043
2028
|
}
|
|
2044
|
-
return
|
|
2029
|
+
return this.safeCurrencyStructure({
|
|
2030
|
+
'id': currencyId,
|
|
2031
|
+
'code': code,
|
|
2032
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
2033
|
+
'type': type,
|
|
2034
|
+
'active': !this.safeBool(rawCurrency, 'delisted'),
|
|
2035
|
+
'deposit': !this.safeBool(rawCurrency, 'deposit_disabled'),
|
|
2036
|
+
'withdraw': !this.safeBool(rawCurrency, 'withdraw_disabled'),
|
|
2037
|
+
'fee': undefined,
|
|
2038
|
+
'networks': networks,
|
|
2039
|
+
'precision': this.parseNumber('0.0001'),
|
|
2040
|
+
'info': rawCurrency,
|
|
2041
|
+
});
|
|
2045
2042
|
}
|
|
2046
2043
|
/**
|
|
2047
2044
|
* @method
|
|
@@ -2345,12 +2342,13 @@ class gate extends gate$1["default"] {
|
|
|
2345
2342
|
//
|
|
2346
2343
|
const address = this.safeString(depositAddress, 'address');
|
|
2347
2344
|
this.checkAddress(address);
|
|
2345
|
+
const code = this.safeString(currency, 'code');
|
|
2348
2346
|
return {
|
|
2349
2347
|
'info': depositAddress,
|
|
2350
|
-
'currency':
|
|
2348
|
+
'currency': code,
|
|
2351
2349
|
'address': address,
|
|
2352
2350
|
'tag': this.safeString(depositAddress, 'payment_id'),
|
|
2353
|
-
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain')),
|
|
2351
|
+
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain'), code),
|
|
2354
2352
|
};
|
|
2355
2353
|
}
|
|
2356
2354
|
/**
|
|
@@ -2499,7 +2497,7 @@ class gate extends gate$1["default"] {
|
|
|
2499
2497
|
const networkIds = Object.keys(withdrawFixOnChains);
|
|
2500
2498
|
for (let j = 0; j < networkIds.length; j++) {
|
|
2501
2499
|
const networkId = networkIds[j];
|
|
2502
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
2500
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2503
2501
|
withdrawFees[networkCode] = this.parseNumber(withdrawFixOnChains[networkId]);
|
|
2504
2502
|
}
|
|
2505
2503
|
}
|
|
@@ -2579,7 +2577,9 @@ class gate extends gate$1["default"] {
|
|
|
2579
2577
|
const chainKeys = Object.keys(withdrawFixOnChains);
|
|
2580
2578
|
for (let i = 0; i < chainKeys.length; i++) {
|
|
2581
2579
|
const chainKey = chainKeys[i];
|
|
2582
|
-
const
|
|
2580
|
+
const currencyId = this.safeString(fee, 'currency');
|
|
2581
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2582
|
+
const networkCode = this.networkIdToCode(chainKey, code);
|
|
2583
2583
|
result['networks'][networkCode] = {
|
|
2584
2584
|
'withdraw': {
|
|
2585
2585
|
'fee': this.parseNumber(withdrawFixOnChains[chainKey]),
|
|
@@ -4100,7 +4100,7 @@ class gate extends gate$1["default"] {
|
|
|
4100
4100
|
let networkCode = undefined;
|
|
4101
4101
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
4102
4102
|
if (networkCode !== undefined) {
|
|
4103
|
-
request['chain'] = this.networkCodeToId(networkCode);
|
|
4103
|
+
request['chain'] = this.networkCodeToId(networkCode, code);
|
|
4104
4104
|
}
|
|
4105
4105
|
const response = await this.privateWithdrawalsPostWithdrawals(this.extend(request, params));
|
|
4106
4106
|
//
|
|
@@ -4232,7 +4232,7 @@ class gate extends gate$1["default"] {
|
|
|
4232
4232
|
'txid': txid,
|
|
4233
4233
|
'currency': code,
|
|
4234
4234
|
'amount': this.parseNumber(amountString),
|
|
4235
|
-
'network': this.networkIdToCode(networkId),
|
|
4235
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4236
4236
|
'address': address,
|
|
4237
4237
|
'addressTo': undefined,
|
|
4238
4238
|
'addressFrom': undefined,
|
package/dist/cjs/src/gemini.js
CHANGED
|
@@ -440,51 +440,28 @@ class gemini extends gemini$1["default"] {
|
|
|
440
440
|
// ]
|
|
441
441
|
// }
|
|
442
442
|
//
|
|
443
|
-
const result = {};
|
|
444
443
|
this.options['tradingPairs'] = this.safeList(data, 'tradingPairs');
|
|
445
444
|
const currenciesArray = this.safeValue(data, 'currencies', []);
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
'deposit': undefined,
|
|
463
|
-
'withdraw': undefined,
|
|
464
|
-
'fee': undefined,
|
|
465
|
-
'precision': precision,
|
|
466
|
-
'limits': {
|
|
467
|
-
'deposit': {
|
|
468
|
-
'min': undefined,
|
|
469
|
-
'max': undefined,
|
|
470
|
-
},
|
|
471
|
-
'withdraw': {
|
|
472
|
-
'min': undefined,
|
|
473
|
-
'max': undefined,
|
|
474
|
-
},
|
|
475
|
-
},
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
result[code] = this.safeCurrencyStructure({
|
|
479
|
-
'info': currency,
|
|
480
|
-
'id': id,
|
|
481
|
-
'code': code,
|
|
482
|
-
'name': this.safeString(currency, 1),
|
|
445
|
+
return this.parseCurrencies(currenciesArray);
|
|
446
|
+
}
|
|
447
|
+
parseCurrency(rawCurrency) {
|
|
448
|
+
const id = this.safeString(rawCurrency, 0);
|
|
449
|
+
const code = this.safeCurrencyCode(id);
|
|
450
|
+
const type = this.safeString(rawCurrency, 7) ? 'fiat' : 'crypto';
|
|
451
|
+
const precision = this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 5)));
|
|
452
|
+
const networks = {};
|
|
453
|
+
const networkId = this.safeString(rawCurrency, 9);
|
|
454
|
+
let networkCode = undefined;
|
|
455
|
+
if (networkId !== undefined) {
|
|
456
|
+
networkCode = this.networkIdToCode(networkId, code);
|
|
457
|
+
networks[networkCode] = {
|
|
458
|
+
'info': rawCurrency,
|
|
459
|
+
'id': networkId,
|
|
460
|
+
'network': networkCode,
|
|
483
461
|
'active': undefined,
|
|
484
462
|
'deposit': undefined,
|
|
485
463
|
'withdraw': undefined,
|
|
486
464
|
'fee': undefined,
|
|
487
|
-
'type': type,
|
|
488
465
|
'precision': precision,
|
|
489
466
|
'limits': {
|
|
490
467
|
'deposit': {
|
|
@@ -496,10 +473,31 @@ class gemini extends gemini$1["default"] {
|
|
|
496
473
|
'max': undefined,
|
|
497
474
|
},
|
|
498
475
|
},
|
|
499
|
-
|
|
500
|
-
});
|
|
476
|
+
};
|
|
501
477
|
}
|
|
502
|
-
return
|
|
478
|
+
return this.safeCurrencyStructure({
|
|
479
|
+
'info': rawCurrency,
|
|
480
|
+
'id': id,
|
|
481
|
+
'code': code,
|
|
482
|
+
'name': this.safeString(rawCurrency, 1),
|
|
483
|
+
'active': undefined,
|
|
484
|
+
'deposit': undefined,
|
|
485
|
+
'withdraw': undefined,
|
|
486
|
+
'fee': undefined,
|
|
487
|
+
'type': type,
|
|
488
|
+
'precision': precision,
|
|
489
|
+
'limits': {
|
|
490
|
+
'deposit': {
|
|
491
|
+
'min': undefined,
|
|
492
|
+
'max': undefined,
|
|
493
|
+
},
|
|
494
|
+
'withdraw': {
|
|
495
|
+
'min': undefined,
|
|
496
|
+
'max': undefined,
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
'networks': networks,
|
|
500
|
+
});
|
|
503
501
|
}
|
|
504
502
|
/**
|
|
505
503
|
* @method
|
|
@@ -1912,7 +1910,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1912
1910
|
if (networkCode === undefined) {
|
|
1913
1911
|
throw new errors.ArgumentsRequired(this.id + ' fetchDepositAddresses() requires a network parameter');
|
|
1914
1912
|
}
|
|
1915
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1913
|
+
const networkId = this.networkCodeToId(networkCode, currency['code']);
|
|
1916
1914
|
const request = {
|
|
1917
1915
|
'network': networkId,
|
|
1918
1916
|
};
|
package/dist/cjs/src/grvt.js
CHANGED
|
@@ -1593,13 +1593,15 @@ class grvt extends grvt$1["default"] {
|
|
|
1593
1593
|
let networkCode = undefined;
|
|
1594
1594
|
let addressFrom = this.safeString(transaction, 'from_account_id');
|
|
1595
1595
|
let addressTo = this.safeString(transaction, 'to_account_id');
|
|
1596
|
+
const currencyId = this.safeString(transaction, 'currency');
|
|
1597
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1596
1598
|
if ('transfer_metadata' in transaction) {
|
|
1597
1599
|
const metaData = this.omitZero(this.safeString(transaction, 'transfer_metadata'));
|
|
1598
1600
|
if (metaData !== undefined) {
|
|
1599
1601
|
const parsedMeta = this.parseJson(metaData);
|
|
1600
1602
|
direction = this.safeStringLower(parsedMeta, 'direction');
|
|
1601
1603
|
txId = this.safeString(parsedMeta, 'provider_tx_id');
|
|
1602
|
-
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'));
|
|
1604
|
+
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'), code);
|
|
1603
1605
|
if (direction === 'withdrawal') {
|
|
1604
1606
|
addressTo = this.safeString(parsedMeta, 'endpoint');
|
|
1605
1607
|
}
|
|
@@ -1609,8 +1611,6 @@ class grvt extends grvt$1["default"] {
|
|
|
1609
1611
|
}
|
|
1610
1612
|
}
|
|
1611
1613
|
const timestamp = this.safeIntegerProduct2(transaction, 'event_time', 'initiated_time', 0.000001);
|
|
1612
|
-
const currencyId = this.safeString(transaction, 'currency');
|
|
1613
|
-
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1614
1614
|
return {
|
|
1615
1615
|
'info': transaction,
|
|
1616
1616
|
'id': undefined,
|
|
@@ -1912,7 +1912,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1912
1912
|
'signature': this.defaultSignature(),
|
|
1913
1913
|
};
|
|
1914
1914
|
const [networkCode, query] = this.handleNetworkCodeAndParams(params);
|
|
1915
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1915
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
1916
1916
|
if (networkId === undefined) {
|
|
1917
1917
|
throw new errors.BadRequest(this.id + ' withdraw() requires a network parameter');
|
|
1918
1918
|
}
|
package/dist/cjs/src/hashkey.js
CHANGED
|
@@ -1170,65 +1170,63 @@ class hashkey extends hashkey$1["default"] {
|
|
|
1170
1170
|
// ]
|
|
1171
1171
|
// }
|
|
1172
1172
|
//
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
'limits': {
|
|
1188
|
-
'withdraw': {
|
|
1189
|
-
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1190
|
-
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1191
|
-
},
|
|
1192
|
-
'deposit': {
|
|
1193
|
-
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1194
|
-
'max': undefined,
|
|
1195
|
-
},
|
|
1196
|
-
},
|
|
1197
|
-
'active': undefined,
|
|
1198
|
-
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1199
|
-
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1200
|
-
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1201
|
-
'precision': undefined,
|
|
1202
|
-
'info': network,
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
|
-
const rawType = this.safeString(currecy, 'tokenType');
|
|
1206
|
-
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1207
|
-
result[code] = this.safeCurrencyStructure({
|
|
1208
|
-
'id': currencyId,
|
|
1209
|
-
'code': code,
|
|
1210
|
-
'precision': undefined,
|
|
1211
|
-
'type': type,
|
|
1212
|
-
'name': this.safeString(currecy, 'coinFullName'),
|
|
1213
|
-
'active': undefined,
|
|
1214
|
-
'deposit': this.safeBool(currecy, 'allowDeposit'),
|
|
1215
|
-
'withdraw': this.safeBool(currecy, 'allowWithdraw'),
|
|
1216
|
-
'fee': undefined,
|
|
1173
|
+
return this.parseCurrencies(coins);
|
|
1174
|
+
}
|
|
1175
|
+
parseCurrency(rawCurrency) {
|
|
1176
|
+
const currencyId = this.safeString(rawCurrency, 'coinId');
|
|
1177
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1178
|
+
const networks = this.safeList(rawCurrency, 'chainTypes');
|
|
1179
|
+
const parsedNetworks = {};
|
|
1180
|
+
for (let j = 0; j < networks.length; j++) {
|
|
1181
|
+
const network = networks[j];
|
|
1182
|
+
const networkId = this.safeString(network, 'chainType');
|
|
1183
|
+
const networkCode = this.networkCodeToId(networkId, code);
|
|
1184
|
+
parsedNetworks[networkCode] = {
|
|
1185
|
+
'id': networkId,
|
|
1186
|
+
'network': networkCode,
|
|
1217
1187
|
'limits': {
|
|
1218
|
-
'deposit': {
|
|
1219
|
-
'min': undefined,
|
|
1220
|
-
'max': undefined,
|
|
1221
|
-
},
|
|
1222
1188
|
'withdraw': {
|
|
1223
|
-
'min':
|
|
1189
|
+
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1190
|
+
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1191
|
+
},
|
|
1192
|
+
'deposit': {
|
|
1193
|
+
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1224
1194
|
'max': undefined,
|
|
1225
1195
|
},
|
|
1226
1196
|
},
|
|
1227
|
-
'
|
|
1228
|
-
'
|
|
1229
|
-
|
|
1197
|
+
'active': undefined,
|
|
1198
|
+
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1199
|
+
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1200
|
+
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1201
|
+
'precision': undefined,
|
|
1202
|
+
'info': network,
|
|
1203
|
+
};
|
|
1230
1204
|
}
|
|
1231
|
-
|
|
1205
|
+
const rawType = this.safeString(rawCurrency, 'tokenType');
|
|
1206
|
+
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1207
|
+
return this.safeCurrencyStructure({
|
|
1208
|
+
'id': currencyId,
|
|
1209
|
+
'code': code,
|
|
1210
|
+
'precision': undefined,
|
|
1211
|
+
'type': type,
|
|
1212
|
+
'name': this.safeString(rawCurrency, 'coinFullName'),
|
|
1213
|
+
'active': undefined,
|
|
1214
|
+
'deposit': this.safeBool(rawCurrency, 'allowDeposit'),
|
|
1215
|
+
'withdraw': this.safeBool(rawCurrency, 'allowWithdraw'),
|
|
1216
|
+
'fee': undefined,
|
|
1217
|
+
'limits': {
|
|
1218
|
+
'deposit': {
|
|
1219
|
+
'min': undefined,
|
|
1220
|
+
'max': undefined,
|
|
1221
|
+
},
|
|
1222
|
+
'withdraw': {
|
|
1223
|
+
'min': undefined,
|
|
1224
|
+
'max': undefined,
|
|
1225
|
+
},
|
|
1226
|
+
},
|
|
1227
|
+
'networks': parsedNetworks,
|
|
1228
|
+
'info': rawCurrency,
|
|
1229
|
+
});
|
|
1232
1230
|
}
|
|
1233
1231
|
/**
|
|
1234
1232
|
* @method
|
|
@@ -2054,7 +2052,7 @@ class hashkey extends hashkey$1["default"] {
|
|
|
2054
2052
|
let networkCode = undefined;
|
|
2055
2053
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2056
2054
|
if (networkCode !== undefined) {
|
|
2057
|
-
request['chainType'] = this.networkCodeToId(networkCode);
|
|
2055
|
+
request['chainType'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2058
2056
|
}
|
|
2059
2057
|
const response = await this.privatePostApiV1AccountWithdraw(this.extend(request, params));
|
|
2060
2058
|
//
|
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -973,7 +973,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
973
973
|
for (let j = 0; j < rawNetworks.length; j++) {
|
|
974
974
|
const rawNetwork = rawNetworks[j];
|
|
975
975
|
const networkId = this.safeString2(rawNetwork, 'protocol', 'network');
|
|
976
|
-
let networkCode = this.networkIdToCode(networkId);
|
|
976
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
977
977
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : code; // as hitbtc is white label, ensure we safeguard from possible bugs
|
|
978
978
|
networks[networkCode] = {
|
|
979
979
|
'info': rawNetwork,
|
|
@@ -1012,17 +1012,6 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1012
1012
|
'type': undefined, // 'crypto' field emits incorrect values
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
1015
|
-
addKeyInArrayItems(obj, keyName) {
|
|
1016
|
-
const result = [];
|
|
1017
|
-
const keys = Object.keys(obj);
|
|
1018
|
-
for (let i = 0; i < keys.length; i++) {
|
|
1019
|
-
const key = keys[i];
|
|
1020
|
-
const item = obj[key];
|
|
1021
|
-
item[keyName] = key;
|
|
1022
|
-
result.push(item);
|
|
1023
|
-
}
|
|
1024
|
-
return result;
|
|
1025
|
-
}
|
|
1026
1015
|
/**
|
|
1027
1016
|
* @method
|
|
1028
1017
|
* @name hitbtc#createDepositAddress
|
|
@@ -3708,7 +3697,8 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3708
3697
|
for (let j = 0; j < networks.length; j++) {
|
|
3709
3698
|
const networkEntry = networks[j];
|
|
3710
3699
|
const networkId = this.safeString(networkEntry, 'network');
|
|
3711
|
-
|
|
3700
|
+
const code = this.safeString(currency, 'code');
|
|
3701
|
+
let networkCode = this.networkIdToCode(networkId, code);
|
|
3712
3702
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
3713
3703
|
const withdrawFee = this.safeNumber(networkEntry, 'payout_fee');
|
|
3714
3704
|
const isDefault = this.safeValue(networkEntry, 'default');
|