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/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
|
|
@@ -1144,7 +1140,7 @@ class foxbit extends foxbit$1["default"] {
|
|
|
1144
1140
|
// "remark": "A remarkable note for the order.",
|
|
1145
1141
|
// "funds_received": "290.0"
|
|
1146
1142
|
// }
|
|
1147
|
-
return this.parseOrder(response
|
|
1143
|
+
return this.parseOrder(response);
|
|
1148
1144
|
}
|
|
1149
1145
|
/**
|
|
1150
1146
|
* @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
|
|
@@ -825,6 +823,7 @@ class gemini extends gemini$1["default"] {
|
|
|
825
823
|
inverse = false;
|
|
826
824
|
}
|
|
827
825
|
const type = swap ? 'swap' : 'spot';
|
|
826
|
+
const isSpot = !swap;
|
|
828
827
|
return {
|
|
829
828
|
'id': marketId,
|
|
830
829
|
'symbol': symbol,
|
|
@@ -835,7 +834,7 @@ class gemini extends gemini$1["default"] {
|
|
|
835
834
|
'quoteId': quoteId,
|
|
836
835
|
'settleId': settleId,
|
|
837
836
|
'type': type,
|
|
838
|
-
'spot':
|
|
837
|
+
'spot': isSpot,
|
|
839
838
|
'margin': false,
|
|
840
839
|
'swap': swap,
|
|
841
840
|
'future': false,
|
|
@@ -1911,7 +1910,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1911
1910
|
if (networkCode === undefined) {
|
|
1912
1911
|
throw new errors.ArgumentsRequired(this.id + ' fetchDepositAddresses() requires a network parameter');
|
|
1913
1912
|
}
|
|
1914
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1913
|
+
const networkId = this.networkCodeToId(networkCode, currency['code']);
|
|
1915
1914
|
const request = {
|
|
1916
1915
|
'network': networkId,
|
|
1917
1916
|
};
|
|
@@ -1929,8 +1928,9 @@ class gemini extends gemini$1["default"] {
|
|
|
1929
1928
|
throw new errors.AuthenticationError(this.id + ' sign() requires an account-key, master-keys are not-supported');
|
|
1930
1929
|
}
|
|
1931
1930
|
const nonce = this.nonce().toString();
|
|
1931
|
+
const finalUrl = url;
|
|
1932
1932
|
const request = this.extend({
|
|
1933
|
-
'request':
|
|
1933
|
+
'request': finalUrl,
|
|
1934
1934
|
'nonce': nonce,
|
|
1935
1935
|
}, query);
|
|
1936
1936
|
let payload = this.json(request);
|
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,
|
|
@@ -1831,7 +1831,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
async loadAccountInfos() {
|
|
1833
1833
|
if (this.safeString(this.options, 'userMainAccountId') !== undefined) {
|
|
1834
|
-
return;
|
|
1834
|
+
return false;
|
|
1835
1835
|
}
|
|
1836
1836
|
const promises = [];
|
|
1837
1837
|
promises.push(this.privateTradingPostFullV1AggregatedAccountSummary());
|
|
@@ -1884,6 +1884,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1884
1884
|
const subAccountId = this.safeString(subAccountIds, 0);
|
|
1885
1885
|
this.options['accountId'] = subAccountId;
|
|
1886
1886
|
}
|
|
1887
|
+
return true;
|
|
1887
1888
|
}
|
|
1888
1889
|
/**
|
|
1889
1890
|
* @method
|
|
@@ -1911,7 +1912,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1911
1912
|
'signature': this.defaultSignature(),
|
|
1912
1913
|
};
|
|
1913
1914
|
const [networkCode, query] = this.handleNetworkCodeAndParams(params);
|
|
1914
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1915
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
1915
1916
|
if (networkId === undefined) {
|
|
1916
1917
|
throw new errors.BadRequest(this.id + ' withdraw() requires a network parameter');
|
|
1917
1918
|
}
|
|
@@ -1976,8 +1977,10 @@ class grvt extends grvt$1["default"] {
|
|
|
1976
1977
|
}
|
|
1977
1978
|
params = this.omit(params, ['clientOrderId']);
|
|
1978
1979
|
const isMarketOrder = (type === 'market');
|
|
1980
|
+
const subAccountId = this.getSubAccountId(params);
|
|
1981
|
+
const isReduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1979
1982
|
const orderRequest = {
|
|
1980
|
-
'sub_account_id':
|
|
1983
|
+
'sub_account_id': subAccountId,
|
|
1981
1984
|
'time_in_force': undefined,
|
|
1982
1985
|
'legs': [orderLeg],
|
|
1983
1986
|
'signature': this.defaultSignature(),
|
|
@@ -1986,7 +1989,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1986
1989
|
},
|
|
1987
1990
|
'is_market': isMarketOrder,
|
|
1988
1991
|
'post_only': false,
|
|
1989
|
-
'reduce_only':
|
|
1992
|
+
'reduce_only': isReduceOnly,
|
|
1990
1993
|
// 'order_id': null,
|
|
1991
1994
|
// 'state': null,
|
|
1992
1995
|
};
|
|
@@ -2619,8 +2622,9 @@ class grvt extends grvt$1["default"] {
|
|
|
2619
2622
|
*/
|
|
2620
2623
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2621
2624
|
await this.loadMarketsAndSignIn();
|
|
2625
|
+
const subAccountId = this.getSubAccountId(params);
|
|
2622
2626
|
let request = {
|
|
2623
|
-
'sub_account_id':
|
|
2627
|
+
'sub_account_id': subAccountId,
|
|
2624
2628
|
};
|
|
2625
2629
|
let market = undefined;
|
|
2626
2630
|
if (symbol !== undefined) {
|
|
@@ -2796,8 +2800,9 @@ class grvt extends grvt$1["default"] {
|
|
|
2796
2800
|
*/
|
|
2797
2801
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
2798
2802
|
await this.loadMarketsAndSignIn();
|
|
2803
|
+
const subAccountId = this.getSubAccountId(params);
|
|
2799
2804
|
const request = {
|
|
2800
|
-
'sub_account_id':
|
|
2805
|
+
'sub_account_id': subAccountId,
|
|
2801
2806
|
};
|
|
2802
2807
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client_order_id');
|
|
2803
2808
|
if (clientOrderId !== undefined) {
|
|
@@ -3060,7 +3065,7 @@ class grvt extends grvt$1["default"] {
|
|
|
3060
3065
|
// }
|
|
3061
3066
|
//
|
|
3062
3067
|
const result = this.safeDict(response, 'result', {});
|
|
3063
|
-
return this.parseOrders([result]
|
|
3068
|
+
return this.parseOrders([result]);
|
|
3064
3069
|
}
|
|
3065
3070
|
/**
|
|
3066
3071
|
* @method
|
|
@@ -3075,8 +3080,9 @@ class grvt extends grvt$1["default"] {
|
|
|
3075
3080
|
*/
|
|
3076
3081
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
3077
3082
|
await this.loadMarketsAndSignIn();
|
|
3083
|
+
const subAccoubntId = this.getSubAccountId(params);
|
|
3078
3084
|
const request = {
|
|
3079
|
-
'sub_account_id':
|
|
3085
|
+
'sub_account_id': subAccoubntId,
|
|
3080
3086
|
};
|
|
3081
3087
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client_order_id');
|
|
3082
3088
|
if (clientOrderId !== undefined) {
|