ccxt 4.5.55 → 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 +215 -10
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/aftermath.js +10 -5
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/apex.js +26 -17
- package/dist/cjs/src/arkham.js +10 -7
- package/dist/cjs/src/ascendex.js +8 -5
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +72 -35
- 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 +10 -7
- package/dist/cjs/src/binance.js +196 -198
- package/dist/cjs/src/bingx.js +7 -7
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitflyer.js +2 -1
- package/dist/cjs/src/bitget.js +16 -5
- package/dist/cjs/src/bitmart.js +18 -10
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +4 -3
- package/dist/cjs/src/bitso.js +7 -4
- package/dist/cjs/src/bitstamp.js +7 -4
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +28 -4
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bybit.js +19 -17
- package/dist/cjs/src/bybiteu.js +1 -0
- 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 +4 -3
- package/dist/cjs/src/coinbaseinternational.js +17 -10
- package/dist/cjs/src/coinex.js +79 -77
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +52 -54
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +9 -5
- package/dist/cjs/src/delta.js +53 -53
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/derive.js +31 -31
- package/dist/cjs/src/digifinex.js +45 -45
- package/dist/cjs/src/exmo.js +104 -122
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +72 -76
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +45 -45
- package/dist/cjs/src/grvt.js +17 -11
- package/dist/cjs/src/hashkey.js +56 -58
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +5 -14
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +84 -72
- package/dist/cjs/src/hyperliquid.js +60 -55
- package/dist/cjs/src/indodax.js +4 -3
- package/dist/cjs/src/kraken.js +71 -71
- package/dist/cjs/src/krakenfutures.js +2 -1
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +64 -60
- package/dist/cjs/src/lighter.js +36 -38
- package/dist/cjs/src/luno.js +36 -44
- package/dist/cjs/src/mercado.js +2 -1
- package/dist/cjs/src/mexc.js +72 -63
- package/dist/cjs/src/modetrade.js +51 -53
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +23 -5
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/p2b.js +8 -4
- package/dist/cjs/src/paradex.js +3 -2
- package/dist/cjs/src/phemex.js +47 -47
- package/dist/cjs/src/poloniex.js +19 -13
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +11 -2
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/aster.js +10 -9
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bingx.js +7 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +10 -0
- package/dist/cjs/src/pro/bitmex.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/grvt.js +8 -0
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/krakenfutures.js +16 -4
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/okx.js +4 -4
- 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/pro/woo.js +4 -4
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.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 +3 -3
- 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 +66 -55
- package/dist/cjs/src/woofipro.js +54 -48
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zebpay.js +73 -75
- 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/abstract/mexc.d.ts +1 -0
- package/js/src/aftermath.js +10 -5
- package/js/src/alpaca.js +2 -2
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +26 -17
- package/js/src/arkham.js +10 -7
- package/js/src/ascendex.js +8 -5
- 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 +72 -35
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +10 -7
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +200 -202
- package/js/src/bingx.js +7 -7
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitflyer.js +2 -1
- package/js/src/bitget.js +16 -5
- package/js/src/bitmart.js +18 -10
- package/js/src/bitmex.js +8 -5
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.js +4 -3
- package/js/src/bitso.js +7 -4
- package/js/src/bitstamp.js +7 -4
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +2 -2
- 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 +28 -4
- package/js/src/bullish.js +6 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +19 -17
- package/js/src/bybiteu.js +1 -0
- 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 +4 -3
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +17 -10
- package/js/src/coinex.d.ts +2 -1
- package/js/src/coinex.js +79 -77
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +5 -5
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +52 -54
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +9 -5
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +53 -53
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +35 -35
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +31 -31
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +45 -45
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +104 -122
- 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 +72 -76
- 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 +45 -45
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +17 -11
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +56 -58
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +5 -14
- 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 +84 -72
- package/js/src/hyperliquid.d.ts +5 -4
- package/js/src/hyperliquid.js +60 -55
- package/js/src/indodax.js +4 -3
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +71 -71
- package/js/src/krakenfutures.js +2 -1
- 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 +64 -60
- package/js/src/lighter.d.ts +2 -1
- package/js/src/lighter.js +36 -38
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +36 -44
- package/js/src/mercado.js +2 -1
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +72 -63
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +51 -53
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +23 -5
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/p2b.js +8 -4
- package/js/src/paradex.js +3 -2
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +47 -47
- package/js/src/poloniex.js +19 -13
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +11 -2
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/aster.js +10 -9
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bingx.js +7 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmart.js +10 -0
- package/js/src/pro/bitmex.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/grvt.js +8 -0
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/krakenfutures.d.ts +4 -4
- package/js/src/pro/krakenfutures.js +16 -4
- 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/modetrade.d.ts +3 -3
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- 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/pro/woo.d.ts +4 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/pro/woofipro.d.ts +3 -3
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +3 -3
- 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 +66 -55
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +54 -48
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +4 -2
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +73 -75
- package/package.json +25 -11
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2931
- 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 -2924
- 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/js/src/whitebit.js
CHANGED
|
@@ -639,76 +639,74 @@ export default class whitebit extends Exchange {
|
|
|
639
639
|
// }
|
|
640
640
|
// }
|
|
641
641
|
//
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
'active': undefined,
|
|
667
|
-
'deposit': this.inArray(networkId, depositsNetworks),
|
|
668
|
-
'withdraw': this.inArray(networkId, withdrawsNetworks),
|
|
669
|
-
'fee': undefined,
|
|
670
|
-
'precision': undefined,
|
|
671
|
-
'limits': {
|
|
672
|
-
'deposit': {
|
|
673
|
-
'min': this.safeNumber(networkDepositLimits, 'min'),
|
|
674
|
-
'max': this.safeNumber(networkDepositLimits, 'max'),
|
|
675
|
-
},
|
|
676
|
-
'withdraw': {
|
|
677
|
-
'min': this.safeNumber(networkWithdrawLimits, 'min'),
|
|
678
|
-
'max': this.safeNumber(networkWithdrawLimits, 'max'),
|
|
679
|
-
},
|
|
680
|
-
},
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
result[code] = this.safeCurrencyStructure({
|
|
684
|
-
'id': id,
|
|
685
|
-
'code': code,
|
|
686
|
-
'info': currency,
|
|
687
|
-
'name': undefined,
|
|
642
|
+
const enhancedArray = this.addKeyInArrayItems(response, '_coin_id');
|
|
643
|
+
return this.parseCurrencies(enhancedArray);
|
|
644
|
+
}
|
|
645
|
+
parseCurrency(rawCurrency) {
|
|
646
|
+
// const name = this.safeString (currency, 'name'); // breaks down in Python due to utf8 encoding issues on the exchange side
|
|
647
|
+
const id = this.safeString(rawCurrency, '_coin_id');
|
|
648
|
+
const code = this.safeCurrencyCode(id);
|
|
649
|
+
const hasProvider = ('providers' in rawCurrency);
|
|
650
|
+
const networks = {};
|
|
651
|
+
const rawNetworks = this.safeDict(rawCurrency, 'networks', {});
|
|
652
|
+
const depositsNetworks = this.safeList(rawNetworks, 'deposits', []);
|
|
653
|
+
const withdrawsNetworks = this.safeList(rawNetworks, 'withdraws', []);
|
|
654
|
+
const networkLimits = this.safeDict(rawCurrency, 'limits', {});
|
|
655
|
+
const depositLimits = this.safeDict(networkLimits, 'deposit', {});
|
|
656
|
+
const withdrawLimits = this.safeDict(networkLimits, 'withdraw', {});
|
|
657
|
+
const allNetworks = this.arrayConcat(depositsNetworks, withdrawsNetworks);
|
|
658
|
+
for (let j = 0; j < allNetworks.length; j++) {
|
|
659
|
+
const networkId = allNetworks[j];
|
|
660
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
661
|
+
const networkDepositLimits = this.safeDict(depositLimits, networkId, {});
|
|
662
|
+
const networkWithdrawLimits = this.safeDict(withdrawLimits, networkId, {});
|
|
663
|
+
networks[networkCode] = {
|
|
664
|
+
'id': networkId,
|
|
665
|
+
'network': networkCode,
|
|
688
666
|
'active': undefined,
|
|
689
|
-
'deposit': this.
|
|
690
|
-
'withdraw': this.
|
|
667
|
+
'deposit': this.inArray(networkId, depositsNetworks),
|
|
668
|
+
'withdraw': this.inArray(networkId, withdrawsNetworks),
|
|
691
669
|
'fee': undefined,
|
|
692
|
-
'
|
|
693
|
-
'type': hasProvider ? 'fiat' : 'crypto',
|
|
694
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'currency_precision'))),
|
|
670
|
+
'precision': undefined,
|
|
695
671
|
'limits': {
|
|
696
|
-
'
|
|
697
|
-
'min':
|
|
698
|
-
'max':
|
|
672
|
+
'deposit': {
|
|
673
|
+
'min': this.safeNumber(networkDepositLimits, 'min'),
|
|
674
|
+
'max': this.safeNumber(networkDepositLimits, 'max'),
|
|
699
675
|
},
|
|
700
676
|
'withdraw': {
|
|
701
|
-
'min': this.safeNumber(
|
|
702
|
-
'max': this.safeNumber(
|
|
703
|
-
},
|
|
704
|
-
'deposit': {
|
|
705
|
-
'min': this.safeNumber(currency, 'min_deposit'),
|
|
706
|
-
'max': this.safeNumber(currency, 'max_deposit'),
|
|
677
|
+
'min': this.safeNumber(networkWithdrawLimits, 'min'),
|
|
678
|
+
'max': this.safeNumber(networkWithdrawLimits, 'max'),
|
|
707
679
|
},
|
|
708
680
|
},
|
|
709
|
-
}
|
|
681
|
+
};
|
|
710
682
|
}
|
|
711
|
-
return
|
|
683
|
+
return this.safeCurrencyStructure({
|
|
684
|
+
'id': id,
|
|
685
|
+
'code': code,
|
|
686
|
+
'info': rawCurrency,
|
|
687
|
+
'name': undefined,
|
|
688
|
+
'active': undefined,
|
|
689
|
+
'deposit': this.safeBool(rawCurrency, 'can_deposit'),
|
|
690
|
+
'withdraw': this.safeBool(rawCurrency, 'can_withdraw'),
|
|
691
|
+
'fee': undefined,
|
|
692
|
+
'networks': networks,
|
|
693
|
+
'type': hasProvider ? 'fiat' : 'crypto',
|
|
694
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 'currency_precision'))),
|
|
695
|
+
'limits': {
|
|
696
|
+
'amount': {
|
|
697
|
+
'min': undefined,
|
|
698
|
+
'max': undefined,
|
|
699
|
+
},
|
|
700
|
+
'withdraw': {
|
|
701
|
+
'min': this.safeNumber(rawCurrency, 'min_withdraw'),
|
|
702
|
+
'max': this.safeNumber(rawCurrency, 'max_withdraw'),
|
|
703
|
+
},
|
|
704
|
+
'deposit': {
|
|
705
|
+
'min': this.safeNumber(rawCurrency, 'min_deposit'),
|
|
706
|
+
'max': this.safeNumber(rawCurrency, 'max_deposit'),
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
});
|
|
712
710
|
}
|
|
713
711
|
/**
|
|
714
712
|
* @method
|
|
@@ -896,7 +894,7 @@ export default class whitebit extends Exchange {
|
|
|
896
894
|
if (networkId !== undefined) {
|
|
897
895
|
const networkLength = networkId.length;
|
|
898
896
|
networkId = networkId.slice(1, networkLength - 1);
|
|
899
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
897
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
900
898
|
depositWithdrawFees[code]['networks'][networkCode] = {
|
|
901
899
|
'withdraw': withdrawResult,
|
|
902
900
|
'deposit': depositResult,
|
package/js/src/woo.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export default class woo extends Exchange {
|
|
|
85
85
|
* @returns {object} an associative dictionary of currencies
|
|
86
86
|
*/
|
|
87
87
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
88
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
88
89
|
/**
|
|
89
90
|
* @method
|
|
90
91
|
* @name woo#createMarketBuyOrderWithCost
|
package/js/src/woo.js
CHANGED
|
@@ -1019,65 +1019,76 @@ export default class woo extends Exchange {
|
|
|
1019
1019
|
const tokensById = this.groupBy(tokenRows, 'balance_token');
|
|
1020
1020
|
const currencyIds = Object.keys(tokensById);
|
|
1021
1021
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
1022
|
-
const
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1052
|
-
},
|
|
1053
|
-
'info': [networkEntry, tokenEntry],
|
|
1054
|
-
};
|
|
1055
|
-
}
|
|
1056
|
-
result[code] = this.safeCurrencyStructure({
|
|
1057
|
-
'id': currencyId,
|
|
1058
|
-
'name': undefined,
|
|
1059
|
-
'code': code,
|
|
1060
|
-
'precision': undefined,
|
|
1022
|
+
const id = currencyIds[i];
|
|
1023
|
+
const customCurrency = {
|
|
1024
|
+
'_coin_id': id,
|
|
1025
|
+
'_tokens_by_id': tokensById[id],
|
|
1026
|
+
'_networks_by_id': networksById[id],
|
|
1027
|
+
};
|
|
1028
|
+
const parsed = this.parseCurrency(customCurrency);
|
|
1029
|
+
const code = parsed['code'];
|
|
1030
|
+
result[code] = parsed;
|
|
1031
|
+
}
|
|
1032
|
+
return result;
|
|
1033
|
+
}
|
|
1034
|
+
parseCurrency(rawCurrency) {
|
|
1035
|
+
const currencyId = this.safeString(rawCurrency, '_coin_id');
|
|
1036
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1037
|
+
const tokensByNetworkId = this.indexBy(rawCurrency['_tokens_by_id'], 'network');
|
|
1038
|
+
const chainsByNetworkId = this.indexBy(rawCurrency['_networks_by_id'], 'network');
|
|
1039
|
+
const keys = Object.keys(chainsByNetworkId);
|
|
1040
|
+
const resultingNetworks = {};
|
|
1041
|
+
for (let j = 0; j < keys.length; j++) {
|
|
1042
|
+
const networkId = keys[j];
|
|
1043
|
+
const tokenEntry = this.safeDict(tokensByNetworkId, networkId, {});
|
|
1044
|
+
const networkEntry = this.safeDict(chainsByNetworkId, networkId, {});
|
|
1045
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
1046
|
+
const specialNetworkId = this.safeString(tokenEntry, 'token');
|
|
1047
|
+
resultingNetworks[networkCode] = {
|
|
1048
|
+
'id': networkId,
|
|
1049
|
+
'currencyNetworkId': specialNetworkId,
|
|
1050
|
+
'network': networkCode,
|
|
1061
1051
|
'active': undefined,
|
|
1062
|
-
'
|
|
1063
|
-
'
|
|
1064
|
-
'
|
|
1065
|
-
'
|
|
1066
|
-
'type': 'crypto',
|
|
1052
|
+
'deposit': this.safeString(networkEntry, 'allow_deposit') === '1',
|
|
1053
|
+
'withdraw': this.safeString(networkEntry, 'allow_withdraw') === '1',
|
|
1054
|
+
'fee': this.safeNumber(networkEntry, 'withdrawal_fee'),
|
|
1055
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(tokenEntry, 'decimals'))),
|
|
1067
1056
|
'limits': {
|
|
1068
|
-
'
|
|
1069
|
-
'min':
|
|
1057
|
+
'withdraw': {
|
|
1058
|
+
'min': this.safeNumber(networkEntry, 'minimum_withdrawal'),
|
|
1070
1059
|
'max': undefined,
|
|
1071
1060
|
},
|
|
1072
|
-
'
|
|
1061
|
+
'deposit': {
|
|
1073
1062
|
'min': undefined,
|
|
1074
1063
|
'max': undefined,
|
|
1075
1064
|
},
|
|
1076
1065
|
},
|
|
1077
|
-
'info':
|
|
1078
|
-
}
|
|
1066
|
+
'info': { 'network': networkEntry, 'token': tokenEntry },
|
|
1067
|
+
};
|
|
1079
1068
|
}
|
|
1080
|
-
return
|
|
1069
|
+
return this.safeCurrencyStructure({
|
|
1070
|
+
'id': currencyId,
|
|
1071
|
+
'name': undefined,
|
|
1072
|
+
'code': code,
|
|
1073
|
+
'precision': undefined,
|
|
1074
|
+
'active': undefined,
|
|
1075
|
+
'fee': undefined,
|
|
1076
|
+
'networks': resultingNetworks,
|
|
1077
|
+
'deposit': undefined,
|
|
1078
|
+
'withdraw': undefined,
|
|
1079
|
+
'type': 'crypto',
|
|
1080
|
+
'limits': {
|
|
1081
|
+
'deposit': {
|
|
1082
|
+
'min': undefined,
|
|
1083
|
+
'max': undefined,
|
|
1084
|
+
},
|
|
1085
|
+
'withdraw': {
|
|
1086
|
+
'min': undefined,
|
|
1087
|
+
'max': undefined,
|
|
1088
|
+
},
|
|
1089
|
+
},
|
|
1090
|
+
'info': rawCurrency,
|
|
1091
|
+
});
|
|
1081
1092
|
}
|
|
1082
1093
|
/**
|
|
1083
1094
|
* @method
|
|
@@ -1906,7 +1917,7 @@ export default class woo extends Exchange {
|
|
|
1906
1917
|
'fok': 'FOK',
|
|
1907
1918
|
'post_only': 'PO',
|
|
1908
1919
|
};
|
|
1909
|
-
return this.safeString(timeInForces, timeInForce
|
|
1920
|
+
return this.safeString(timeInForces, timeInForce);
|
|
1910
1921
|
}
|
|
1911
1922
|
parseOrder(order, market = undefined) {
|
|
1912
1923
|
//
|
|
@@ -2477,7 +2488,7 @@ export default class woo extends Exchange {
|
|
|
2477
2488
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2478
2489
|
const request = {
|
|
2479
2490
|
'token': currency['id'],
|
|
2480
|
-
'network': this.networkCodeToId(networkCode),
|
|
2491
|
+
'network': this.networkCodeToId(networkCode, currency['code']),
|
|
2481
2492
|
};
|
|
2482
2493
|
const response = await this.v3PrivateGetAssetWalletDeposit(this.extend(request, params));
|
|
2483
2494
|
//
|
|
@@ -2527,7 +2538,7 @@ export default class woo extends Exchange {
|
|
|
2527
2538
|
let networkCode = undefined;
|
|
2528
2539
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2529
2540
|
if (networkCode !== undefined) {
|
|
2530
|
-
request['network'] = this.networkCodeToId(networkCode);
|
|
2541
|
+
request['network'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2531
2542
|
}
|
|
2532
2543
|
if (since !== undefined) {
|
|
2533
2544
|
request['startTime'] = since;
|
|
@@ -2776,7 +2787,7 @@ export default class woo extends Exchange {
|
|
|
2776
2787
|
'comment': undefined,
|
|
2777
2788
|
'internal': undefined,
|
|
2778
2789
|
'fee': fee,
|
|
2779
|
-
'network': this.networkIdToCode(this.safeString(transaction, 'network')),
|
|
2790
|
+
'network': this.networkIdToCode(this.safeString(transaction, 'network'), code),
|
|
2780
2791
|
};
|
|
2781
2792
|
}
|
|
2782
2793
|
parseTransactionStatus(status) {
|
|
@@ -2999,7 +3010,7 @@ export default class woo extends Exchange {
|
|
|
2999
3010
|
}
|
|
3000
3011
|
params = this.omit(params, 'network');
|
|
3001
3012
|
request['token'] = currency['id'];
|
|
3002
|
-
request['network'] = this.networkCodeToId(network);
|
|
3013
|
+
request['network'] = this.networkCodeToId(network, currency['code']);
|
|
3003
3014
|
const response = await this.v3PrivatePostAssetWalletWithdraw(this.extend(request, params));
|
|
3004
3015
|
//
|
|
3005
3016
|
// {
|
package/js/src/woofipro.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export default class woofipro extends Exchange {
|
|
|
51
51
|
* @returns {object} an associative dictionary of currencies
|
|
52
52
|
*/
|
|
53
53
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
54
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
54
55
|
parseTokenAndFeeTemp(item: any, feeTokenKey: any, feeAmountKey: any): any;
|
|
55
56
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
56
57
|
/**
|
package/js/src/woofipro.js
CHANGED
|
@@ -685,61 +685,67 @@ export default class woofipro extends Exchange {
|
|
|
685
685
|
const indexedChains = this.indexBy(chainRows, 'chain_id');
|
|
686
686
|
for (let i = 0; i < tokenRows.length; i++) {
|
|
687
687
|
const token = tokenRows[i];
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
},
|
|
710
|
-
},
|
|
711
|
-
'active': undefined,
|
|
712
|
-
'deposit': undefined,
|
|
713
|
-
'withdraw': undefined,
|
|
714
|
-
'fee': this.safeNumber(networkEntry, 'withdrawal_fee'),
|
|
715
|
-
'precision': this.parseNumber(this.parsePrecision(this.safeString(networkEntry, 'decimals'))),
|
|
716
|
-
'info': [networkEntry, networkRow],
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
result[code] = this.safeCurrencyStructure({
|
|
720
|
-
'id': currencyId,
|
|
721
|
-
'name': undefined,
|
|
722
|
-
'code': code,
|
|
723
|
-
'precision': undefined,
|
|
724
|
-
'active': undefined,
|
|
725
|
-
'fee': undefined,
|
|
726
|
-
'networks': resultingNetworks,
|
|
727
|
-
'deposit': undefined,
|
|
728
|
-
'withdraw': undefined,
|
|
688
|
+
const parsed = this.parseCurrency({ '_token': token, '_indexedChains': indexedChains });
|
|
689
|
+
result[parsed['code']] = parsed;
|
|
690
|
+
}
|
|
691
|
+
return result;
|
|
692
|
+
}
|
|
693
|
+
parseCurrency(rawCurrency) {
|
|
694
|
+
const token = this.safeDict(rawCurrency, '_token', {});
|
|
695
|
+
const currencyId = this.safeString(token, 'token');
|
|
696
|
+
const networks = this.safeList(token, 'chain_details');
|
|
697
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
698
|
+
const indexedChains = this.safeDict(rawCurrency, '_indexedChains', {});
|
|
699
|
+
const resultingNetworks = {};
|
|
700
|
+
for (let j = 0; j < networks.length; j++) {
|
|
701
|
+
const networkEntry = networks[j];
|
|
702
|
+
const networkId = this.safeString(networkEntry, 'chain_id');
|
|
703
|
+
const networkRow = this.safeDict(indexedChains, networkId);
|
|
704
|
+
const networkName = this.safeString(networkRow, 'name');
|
|
705
|
+
const networkCode = this.networkIdToCode(networkName, code);
|
|
706
|
+
resultingNetworks[networkCode] = {
|
|
707
|
+
'id': networkId,
|
|
708
|
+
'network': networkCode,
|
|
729
709
|
'limits': {
|
|
730
|
-
'
|
|
710
|
+
'withdraw': {
|
|
731
711
|
'min': undefined,
|
|
732
712
|
'max': undefined,
|
|
733
713
|
},
|
|
734
|
-
'
|
|
735
|
-
'min':
|
|
714
|
+
'deposit': {
|
|
715
|
+
'min': undefined,
|
|
736
716
|
'max': undefined,
|
|
737
717
|
},
|
|
738
718
|
},
|
|
739
|
-
'
|
|
740
|
-
|
|
719
|
+
'active': undefined,
|
|
720
|
+
'deposit': undefined,
|
|
721
|
+
'withdraw': undefined,
|
|
722
|
+
'fee': this.safeNumber(networkEntry, 'withdrawal_fee'),
|
|
723
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(networkEntry, 'decimals'))),
|
|
724
|
+
'info': { 'network': networkEntry, 'networkRow': networkRow },
|
|
725
|
+
};
|
|
741
726
|
}
|
|
742
|
-
return
|
|
727
|
+
return this.safeCurrencyStructure({
|
|
728
|
+
'id': currencyId,
|
|
729
|
+
'name': undefined,
|
|
730
|
+
'code': code,
|
|
731
|
+
'precision': undefined,
|
|
732
|
+
'active': undefined,
|
|
733
|
+
'fee': undefined,
|
|
734
|
+
'networks': resultingNetworks,
|
|
735
|
+
'deposit': undefined,
|
|
736
|
+
'withdraw': undefined,
|
|
737
|
+
'limits': {
|
|
738
|
+
'deposit': {
|
|
739
|
+
'min': undefined,
|
|
740
|
+
'max': undefined,
|
|
741
|
+
},
|
|
742
|
+
'withdraw': {
|
|
743
|
+
'min': this.safeNumber(token, 'minimum_withdraw_amount'),
|
|
744
|
+
'max': undefined,
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
'info': token,
|
|
748
|
+
});
|
|
743
749
|
}
|
|
744
750
|
parseTokenAndFeeTemp(item, feeTokenKey, feeAmountKey) {
|
|
745
751
|
const feeCost = this.safeString(item, feeAmountKey);
|
|
@@ -1429,7 +1435,7 @@ export default class woofipro extends Exchange {
|
|
|
1429
1435
|
'fok': 'FOK',
|
|
1430
1436
|
'post_only': 'PO',
|
|
1431
1437
|
};
|
|
1432
|
-
return this.safeString(timeInForces, timeInForce
|
|
1438
|
+
return this.safeString(timeInForces, timeInForce);
|
|
1433
1439
|
}
|
|
1434
1440
|
parseOrderStatus(status) {
|
|
1435
1441
|
if (status !== undefined) {
|
package/js/src/xt.js
CHANGED
|
@@ -564,10 +564,10 @@ export default class xt extends Exchange {
|
|
|
564
564
|
'networks': {
|
|
565
565
|
'ERC20': 'Ethereum',
|
|
566
566
|
'TRC20': 'Tron',
|
|
567
|
+
'TRX': 'Tron',
|
|
567
568
|
'BEP20': 'BNB Smart Chain',
|
|
568
569
|
'BEP2': 'BNB-BEP2',
|
|
569
570
|
'ETH': 'Ethereum',
|
|
570
|
-
'TRON': 'Tron',
|
|
571
571
|
'BNB': 'BNB Smart Chain',
|
|
572
572
|
'AVAX': 'AVAX C-Chain',
|
|
573
573
|
'GAL': 'GAL(FT)',
|
|
@@ -4384,11 +4384,12 @@ export default class xt extends Exchange {
|
|
|
4384
4384
|
const tier = brackets[i];
|
|
4385
4385
|
const marketId = this.safeString(info, 'symbol');
|
|
4386
4386
|
market = this.safeMarket(marketId, market, '_', 'contract');
|
|
4387
|
+
const minNotional = this.safeNumber(brackets[i - 1], 'maxNominalValue', 0);
|
|
4387
4388
|
tiers.push({
|
|
4388
4389
|
'tier': this.safeInteger(tier, 'bracket'),
|
|
4389
4390
|
'symbol': this.safeSymbol(marketId, market, '_', 'contract'),
|
|
4390
4391
|
'currency': market['settle'],
|
|
4391
|
-
'minNotional':
|
|
4392
|
+
'minNotional': minNotional,
|
|
4392
4393
|
'maxNotional': this.safeNumber(tier, 'maxNominalValue'),
|
|
4393
4394
|
'maintenanceMarginRate': this.safeNumber(tier, 'maintMarginRate'),
|
|
4394
4395
|
'maxLeverage': this.safeNumber(tier, 'maxLeverage'),
|
package/js/src/yobit.js
CHANGED
|
@@ -574,7 +574,8 @@ export default class yobit extends Exchange {
|
|
|
574
574
|
await this.loadMarkets();
|
|
575
575
|
let ids = undefined;
|
|
576
576
|
if (symbols === undefined) {
|
|
577
|
-
|
|
577
|
+
const allIds = this.ids;
|
|
578
|
+
ids = allIds.join('-');
|
|
578
579
|
// max URL length is 2083 symbols, including http schema, hostname, tld, etc...
|
|
579
580
|
if (ids.length > 2048) {
|
|
580
581
|
const numIds = this.ids.length;
|
|
@@ -1111,8 +1112,9 @@ export default class yobit extends Exchange {
|
|
|
1111
1112
|
*/
|
|
1112
1113
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1113
1114
|
await this.loadMarkets();
|
|
1115
|
+
const intId = parseInt(id);
|
|
1114
1116
|
const request = {
|
|
1115
|
-
'order_id':
|
|
1117
|
+
'order_id': intId,
|
|
1116
1118
|
};
|
|
1117
1119
|
const response = await this.privatePostOrderInfo(this.extend(request, params));
|
|
1118
1120
|
id = id.toString();
|
package/js/src/zebpay.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/zebpay.js';
|
|
2
|
-
import type { Balances, Currencies, Dict, Int, int, Leverage, Leverages, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees } from './base/types.js';
|
|
2
|
+
import type { Balances, Currencies, Currency, Dict, Int, int, Leverage, Leverages, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class
|
|
5
5
|
* @augments Exchange
|
|
@@ -51,6 +51,7 @@ export default class zebpay extends Exchange {
|
|
|
51
51
|
* @returns {object} an associative dictionary of currencies
|
|
52
52
|
*/
|
|
53
53
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
54
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
54
55
|
/**
|
|
55
56
|
* @method
|
|
56
57
|
* @name zebpay#fetchTradingFee
|