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/js/src/foxbit.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { Balances, Currencies, Currency, DepositAddress, Dict, Int, Market,
|
|
|
7
7
|
export default class foxbit extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
10
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
10
11
|
/**
|
|
11
12
|
* @method
|
|
12
13
|
* @name foxbit#fetchMarkets
|
package/js/src/foxbit.js
CHANGED
|
@@ -362,83 +362,79 @@ export default class foxbit extends Exchange {
|
|
|
362
362
|
// ]
|
|
363
363
|
// }
|
|
364
364
|
const data = this.safeList(response, 'data', []);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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
|
-
'deposit': {
|
|
401
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
402
|
-
'max': undefined,
|
|
403
|
-
},
|
|
404
|
-
'withdraw': {
|
|
405
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
406
|
-
'max': undefined,
|
|
407
|
-
},
|
|
365
|
+
return this.parseCurrencies(data);
|
|
366
|
+
}
|
|
367
|
+
parseCurrency(rawCurrency) {
|
|
368
|
+
const precision = this.safeInteger(rawCurrency, 'precision');
|
|
369
|
+
const currencyId = this.safeString(rawCurrency, 'symbol');
|
|
370
|
+
const name = this.safeString(rawCurrency, 'name');
|
|
371
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
372
|
+
const depositInfo = this.safeDict(rawCurrency, 'deposit_info');
|
|
373
|
+
const withdrawInfo = this.safeDict(rawCurrency, 'withdraw_info');
|
|
374
|
+
const networks = this.safeList(rawCurrency, 'networks', []);
|
|
375
|
+
const type = this.safeStringLower(rawCurrency, 'type');
|
|
376
|
+
const parsedNetworks = {};
|
|
377
|
+
for (let j = 0; j < networks.length; j++) {
|
|
378
|
+
const network = networks[j];
|
|
379
|
+
const networkId = this.safeString(network, 'code');
|
|
380
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
381
|
+
const networkWithdrawInfo = this.safeDict(network, 'withdraw_info');
|
|
382
|
+
const networkDepositInfo = this.safeDict(network, 'deposit_info');
|
|
383
|
+
const isWithdrawEnabled = this.safeString(networkWithdrawInfo, 'status') === 'ENABLED';
|
|
384
|
+
const isDepositEnabled = this.safeString(networkDepositInfo, 'status') === 'ENABLED';
|
|
385
|
+
parsedNetworks[networkCode] = {
|
|
386
|
+
'info': rawCurrency,
|
|
387
|
+
'id': networkId,
|
|
388
|
+
'network': networkCode,
|
|
389
|
+
'name': this.safeString(network, 'name'),
|
|
390
|
+
'deposit': isDepositEnabled,
|
|
391
|
+
'withdraw': isWithdrawEnabled,
|
|
392
|
+
'active': true,
|
|
393
|
+
'precision': precision,
|
|
394
|
+
'fee': this.safeNumber(networkWithdrawInfo, 'fee'),
|
|
395
|
+
'limits': {
|
|
396
|
+
'amount': {
|
|
397
|
+
'min': undefined,
|
|
398
|
+
'max': undefined,
|
|
408
399
|
},
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
result[code] = this.safeCurrencyStructure({
|
|
413
|
-
'id': currencyId,
|
|
414
|
-
'code': code,
|
|
415
|
-
'info': currency,
|
|
416
|
-
'name': name,
|
|
417
|
-
'active': true,
|
|
418
|
-
'type': type,
|
|
419
|
-
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
420
|
-
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
421
|
-
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
422
|
-
'precision': precision,
|
|
423
|
-
'limits': {
|
|
424
|
-
'amount': {
|
|
425
|
-
'min': undefined,
|
|
426
|
-
'max': undefined,
|
|
427
|
-
},
|
|
428
|
-
'deposit': {
|
|
429
|
-
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
430
|
-
'max': undefined,
|
|
431
|
-
},
|
|
432
|
-
'withdraw': {
|
|
433
|
-
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
434
|
-
'max': undefined,
|
|
435
|
-
},
|
|
400
|
+
'deposit': {
|
|
401
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
402
|
+
'max': undefined,
|
|
436
403
|
},
|
|
437
|
-
'
|
|
438
|
-
|
|
439
|
-
|
|
404
|
+
'withdraw': {
|
|
405
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
406
|
+
'max': undefined,
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
};
|
|
440
410
|
}
|
|
441
|
-
return
|
|
411
|
+
return this.safeCurrencyStructure({
|
|
412
|
+
'id': currencyId,
|
|
413
|
+
'code': code,
|
|
414
|
+
'info': rawCurrency,
|
|
415
|
+
'name': name,
|
|
416
|
+
'active': true,
|
|
417
|
+
'type': type,
|
|
418
|
+
'deposit': this.safeBool(depositInfo, 'enabled', false),
|
|
419
|
+
'withdraw': this.safeBool(withdrawInfo, 'enabled', false),
|
|
420
|
+
'fee': this.safeNumber(withdrawInfo, 'fee'),
|
|
421
|
+
'precision': precision,
|
|
422
|
+
'limits': {
|
|
423
|
+
'amount': {
|
|
424
|
+
'min': undefined,
|
|
425
|
+
'max': undefined,
|
|
426
|
+
},
|
|
427
|
+
'deposit': {
|
|
428
|
+
'min': this.safeNumber(depositInfo, 'min_amount'),
|
|
429
|
+
'max': undefined,
|
|
430
|
+
},
|
|
431
|
+
'withdraw': {
|
|
432
|
+
'min': this.safeNumber(withdrawInfo, 'min_amount'),
|
|
433
|
+
'max': undefined,
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
'networks': parsedNetworks,
|
|
437
|
+
});
|
|
442
438
|
}
|
|
443
439
|
/**
|
|
444
440
|
* @method
|
|
@@ -1533,7 +1529,7 @@ export default class foxbit extends Exchange {
|
|
|
1533
1529
|
let networkCode = undefined;
|
|
1534
1530
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
1535
1531
|
if (networkCode !== undefined) {
|
|
1536
|
-
request['network_code'] = this.networkCodeToId(networkCode);
|
|
1532
|
+
request['network_code'] = this.networkCodeToId(networkCode, code);
|
|
1537
1533
|
}
|
|
1538
1534
|
const response = await this.v3PrivatePostWithdrawals(this.extend(request, params));
|
|
1539
1535
|
// {
|
package/js/src/gate.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export default class gate extends Exchange {
|
|
|
111
111
|
* @returns {object} an associative dictionary of currencies
|
|
112
112
|
*/
|
|
113
113
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
114
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
114
115
|
/**
|
|
115
116
|
* @method
|
|
116
117
|
* @name gate#fetchFundingRate
|
package/js/src/gate.js
CHANGED
|
@@ -1987,56 +1987,53 @@ export default class gate extends Exchange {
|
|
|
1987
1987
|
// },
|
|
1988
1988
|
// ]
|
|
1989
1989
|
//
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2011
|
-
'fee': undefined,
|
|
2012
|
-
'precision': this.parseNumber('0.0001'),
|
|
2013
|
-
'limits': {
|
|
2014
|
-
'deposit': {
|
|
2015
|
-
'min': undefined,
|
|
2016
|
-
'max': undefined,
|
|
2017
|
-
},
|
|
2018
|
-
'withdraw': {
|
|
2019
|
-
'min': undefined,
|
|
2020
|
-
'max': undefined,
|
|
2021
|
-
},
|
|
2022
|
-
},
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
result[code] = this.safeCurrencyStructure({
|
|
2026
|
-
'id': currencyId,
|
|
2027
|
-
'code': code,
|
|
2028
|
-
'name': this.safeString(entry, 'name'),
|
|
2029
|
-
'type': type,
|
|
2030
|
-
'active': !this.safeBool(entry, 'delisted'),
|
|
2031
|
-
'deposit': !this.safeBool(entry, 'deposit_disabled'),
|
|
2032
|
-
'withdraw': !this.safeBool(entry, 'withdraw_disabled'),
|
|
1990
|
+
return this.parseCurrencies(response);
|
|
1991
|
+
}
|
|
1992
|
+
parseCurrency(rawCurrency) {
|
|
1993
|
+
const currencyId = this.safeString(rawCurrency, 'currency');
|
|
1994
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1995
|
+
// check leveraged tokens (e.g. BTC3S, ETH5L)
|
|
1996
|
+
const type = this.isLeveragedCurrency(currencyId) ? 'leveraged' : 'crypto';
|
|
1997
|
+
const chains = this.safeList(rawCurrency, 'chains', []);
|
|
1998
|
+
const networks = {};
|
|
1999
|
+
for (let j = 0; j < chains.length; j++) {
|
|
2000
|
+
const chain = chains[j];
|
|
2001
|
+
const networkId = this.safeString(chain, 'name');
|
|
2002
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2003
|
+
networks[networkCode] = {
|
|
2004
|
+
'info': chain,
|
|
2005
|
+
'id': networkId,
|
|
2006
|
+
'network': networkCode,
|
|
2007
|
+
'active': undefined,
|
|
2008
|
+
'deposit': !this.safeBool(chain, 'deposit_disabled'),
|
|
2009
|
+
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
2033
2010
|
'fee': undefined,
|
|
2034
|
-
'networks': networks,
|
|
2035
2011
|
'precision': this.parseNumber('0.0001'),
|
|
2036
|
-
'
|
|
2037
|
-
|
|
2012
|
+
'limits': {
|
|
2013
|
+
'deposit': {
|
|
2014
|
+
'min': undefined,
|
|
2015
|
+
'max': undefined,
|
|
2016
|
+
},
|
|
2017
|
+
'withdraw': {
|
|
2018
|
+
'min': undefined,
|
|
2019
|
+
'max': undefined,
|
|
2020
|
+
},
|
|
2021
|
+
},
|
|
2022
|
+
};
|
|
2038
2023
|
}
|
|
2039
|
-
return
|
|
2024
|
+
return this.safeCurrencyStructure({
|
|
2025
|
+
'id': currencyId,
|
|
2026
|
+
'code': code,
|
|
2027
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
2028
|
+
'type': type,
|
|
2029
|
+
'active': !this.safeBool(rawCurrency, 'delisted'),
|
|
2030
|
+
'deposit': !this.safeBool(rawCurrency, 'deposit_disabled'),
|
|
2031
|
+
'withdraw': !this.safeBool(rawCurrency, 'withdraw_disabled'),
|
|
2032
|
+
'fee': undefined,
|
|
2033
|
+
'networks': networks,
|
|
2034
|
+
'precision': this.parseNumber('0.0001'),
|
|
2035
|
+
'info': rawCurrency,
|
|
2036
|
+
});
|
|
2040
2037
|
}
|
|
2041
2038
|
/**
|
|
2042
2039
|
* @method
|
|
@@ -2340,12 +2337,13 @@ export default class gate extends Exchange {
|
|
|
2340
2337
|
//
|
|
2341
2338
|
const address = this.safeString(depositAddress, 'address');
|
|
2342
2339
|
this.checkAddress(address);
|
|
2340
|
+
const code = this.safeString(currency, 'code');
|
|
2343
2341
|
return {
|
|
2344
2342
|
'info': depositAddress,
|
|
2345
|
-
'currency':
|
|
2343
|
+
'currency': code,
|
|
2346
2344
|
'address': address,
|
|
2347
2345
|
'tag': this.safeString(depositAddress, 'payment_id'),
|
|
2348
|
-
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain')),
|
|
2346
|
+
'network': this.networkIdToCode(this.safeString(depositAddress, 'chain'), code),
|
|
2349
2347
|
};
|
|
2350
2348
|
}
|
|
2351
2349
|
/**
|
|
@@ -2494,7 +2492,7 @@ export default class gate extends Exchange {
|
|
|
2494
2492
|
const networkIds = Object.keys(withdrawFixOnChains);
|
|
2495
2493
|
for (let j = 0; j < networkIds.length; j++) {
|
|
2496
2494
|
const networkId = networkIds[j];
|
|
2497
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
2495
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
2498
2496
|
withdrawFees[networkCode] = this.parseNumber(withdrawFixOnChains[networkId]);
|
|
2499
2497
|
}
|
|
2500
2498
|
}
|
|
@@ -2574,7 +2572,9 @@ export default class gate extends Exchange {
|
|
|
2574
2572
|
const chainKeys = Object.keys(withdrawFixOnChains);
|
|
2575
2573
|
for (let i = 0; i < chainKeys.length; i++) {
|
|
2576
2574
|
const chainKey = chainKeys[i];
|
|
2577
|
-
const
|
|
2575
|
+
const currencyId = this.safeString(fee, 'currency');
|
|
2576
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2577
|
+
const networkCode = this.networkIdToCode(chainKey, code);
|
|
2578
2578
|
result['networks'][networkCode] = {
|
|
2579
2579
|
'withdraw': {
|
|
2580
2580
|
'fee': this.parseNumber(withdrawFixOnChains[chainKey]),
|
|
@@ -4095,7 +4095,7 @@ export default class gate extends Exchange {
|
|
|
4095
4095
|
let networkCode = undefined;
|
|
4096
4096
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
4097
4097
|
if (networkCode !== undefined) {
|
|
4098
|
-
request['chain'] = this.networkCodeToId(networkCode);
|
|
4098
|
+
request['chain'] = this.networkCodeToId(networkCode, code);
|
|
4099
4099
|
}
|
|
4100
4100
|
const response = await this.privateWithdrawalsPostWithdrawals(this.extend(request, params));
|
|
4101
4101
|
//
|
|
@@ -4227,7 +4227,7 @@ export default class gate extends Exchange {
|
|
|
4227
4227
|
'txid': txid,
|
|
4228
4228
|
'currency': code,
|
|
4229
4229
|
'amount': this.parseNumber(amountString),
|
|
4230
|
-
'network': this.networkIdToCode(networkId),
|
|
4230
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4231
4231
|
'address': address,
|
|
4232
4232
|
'addressTo': undefined,
|
|
4233
4233
|
'addressFrom': undefined,
|
package/js/src/gemini.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ export default class gemini extends Exchange {
|
|
|
22
22
|
* @param {object} [params] extra parameters specific to the endpoint
|
|
23
23
|
* @returns {object} an associative dictionary of currencies
|
|
24
24
|
*/
|
|
25
|
-
fetchCurrenciesFromWeb(params?: {}): Promise<
|
|
25
|
+
fetchCurrenciesFromWeb(params?: {}): Promise<Currencies>;
|
|
26
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
26
27
|
/**
|
|
27
28
|
* @method
|
|
28
29
|
* @name gemini#fetchMarkets
|
package/js/src/gemini.js
CHANGED
|
@@ -435,51 +435,28 @@ export default class gemini extends Exchange {
|
|
|
435
435
|
// ]
|
|
436
436
|
// }
|
|
437
437
|
//
|
|
438
|
-
const result = {};
|
|
439
438
|
this.options['tradingPairs'] = this.safeList(data, 'tradingPairs');
|
|
440
439
|
const currenciesArray = this.safeValue(data, 'currencies', []);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
'deposit': undefined,
|
|
458
|
-
'withdraw': undefined,
|
|
459
|
-
'fee': undefined,
|
|
460
|
-
'precision': precision,
|
|
461
|
-
'limits': {
|
|
462
|
-
'deposit': {
|
|
463
|
-
'min': undefined,
|
|
464
|
-
'max': undefined,
|
|
465
|
-
},
|
|
466
|
-
'withdraw': {
|
|
467
|
-
'min': undefined,
|
|
468
|
-
'max': undefined,
|
|
469
|
-
},
|
|
470
|
-
},
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
result[code] = this.safeCurrencyStructure({
|
|
474
|
-
'info': currency,
|
|
475
|
-
'id': id,
|
|
476
|
-
'code': code,
|
|
477
|
-
'name': this.safeString(currency, 1),
|
|
440
|
+
return this.parseCurrencies(currenciesArray);
|
|
441
|
+
}
|
|
442
|
+
parseCurrency(rawCurrency) {
|
|
443
|
+
const id = this.safeString(rawCurrency, 0);
|
|
444
|
+
const code = this.safeCurrencyCode(id);
|
|
445
|
+
const type = this.safeString(rawCurrency, 7) ? 'fiat' : 'crypto';
|
|
446
|
+
const precision = this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 5)));
|
|
447
|
+
const networks = {};
|
|
448
|
+
const networkId = this.safeString(rawCurrency, 9);
|
|
449
|
+
let networkCode = undefined;
|
|
450
|
+
if (networkId !== undefined) {
|
|
451
|
+
networkCode = this.networkIdToCode(networkId, code);
|
|
452
|
+
networks[networkCode] = {
|
|
453
|
+
'info': rawCurrency,
|
|
454
|
+
'id': networkId,
|
|
455
|
+
'network': networkCode,
|
|
478
456
|
'active': undefined,
|
|
479
457
|
'deposit': undefined,
|
|
480
458
|
'withdraw': undefined,
|
|
481
459
|
'fee': undefined,
|
|
482
|
-
'type': type,
|
|
483
460
|
'precision': precision,
|
|
484
461
|
'limits': {
|
|
485
462
|
'deposit': {
|
|
@@ -491,10 +468,31 @@ export default class gemini extends Exchange {
|
|
|
491
468
|
'max': undefined,
|
|
492
469
|
},
|
|
493
470
|
},
|
|
494
|
-
|
|
495
|
-
});
|
|
471
|
+
};
|
|
496
472
|
}
|
|
497
|
-
return
|
|
473
|
+
return this.safeCurrencyStructure({
|
|
474
|
+
'info': rawCurrency,
|
|
475
|
+
'id': id,
|
|
476
|
+
'code': code,
|
|
477
|
+
'name': this.safeString(rawCurrency, 1),
|
|
478
|
+
'active': undefined,
|
|
479
|
+
'deposit': undefined,
|
|
480
|
+
'withdraw': undefined,
|
|
481
|
+
'fee': undefined,
|
|
482
|
+
'type': type,
|
|
483
|
+
'precision': precision,
|
|
484
|
+
'limits': {
|
|
485
|
+
'deposit': {
|
|
486
|
+
'min': undefined,
|
|
487
|
+
'max': undefined,
|
|
488
|
+
},
|
|
489
|
+
'withdraw': {
|
|
490
|
+
'min': undefined,
|
|
491
|
+
'max': undefined,
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
'networks': networks,
|
|
495
|
+
});
|
|
498
496
|
}
|
|
499
497
|
/**
|
|
500
498
|
* @method
|
|
@@ -1907,7 +1905,7 @@ export default class gemini extends Exchange {
|
|
|
1907
1905
|
if (networkCode === undefined) {
|
|
1908
1906
|
throw new ArgumentsRequired(this.id + ' fetchDepositAddresses() requires a network parameter');
|
|
1909
1907
|
}
|
|
1910
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1908
|
+
const networkId = this.networkCodeToId(networkCode, currency['code']);
|
|
1911
1909
|
const request = {
|
|
1912
1910
|
'network': networkId,
|
|
1913
1911
|
};
|
package/js/src/grvt.js
CHANGED
|
@@ -1588,13 +1588,15 @@ export default class grvt extends Exchange {
|
|
|
1588
1588
|
let networkCode = undefined;
|
|
1589
1589
|
let addressFrom = this.safeString(transaction, 'from_account_id');
|
|
1590
1590
|
let addressTo = this.safeString(transaction, 'to_account_id');
|
|
1591
|
+
const currencyId = this.safeString(transaction, 'currency');
|
|
1592
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1591
1593
|
if ('transfer_metadata' in transaction) {
|
|
1592
1594
|
const metaData = this.omitZero(this.safeString(transaction, 'transfer_metadata'));
|
|
1593
1595
|
if (metaData !== undefined) {
|
|
1594
1596
|
const parsedMeta = this.parseJson(metaData);
|
|
1595
1597
|
direction = this.safeStringLower(parsedMeta, 'direction');
|
|
1596
1598
|
txId = this.safeString(parsedMeta, 'provider_tx_id');
|
|
1597
|
-
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'));
|
|
1599
|
+
networkCode = this.networkIdToCode(this.safeString(parsedMeta, 'chainid'), code);
|
|
1598
1600
|
if (direction === 'withdrawal') {
|
|
1599
1601
|
addressTo = this.safeString(parsedMeta, 'endpoint');
|
|
1600
1602
|
}
|
|
@@ -1604,8 +1606,6 @@ export default class grvt extends Exchange {
|
|
|
1604
1606
|
}
|
|
1605
1607
|
}
|
|
1606
1608
|
const timestamp = this.safeIntegerProduct2(transaction, 'event_time', 'initiated_time', 0.000001);
|
|
1607
|
-
const currencyId = this.safeString(transaction, 'currency');
|
|
1608
|
-
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1609
1609
|
return {
|
|
1610
1610
|
'info': transaction,
|
|
1611
1611
|
'id': undefined,
|
|
@@ -1907,7 +1907,7 @@ export default class grvt extends Exchange {
|
|
|
1907
1907
|
'signature': this.defaultSignature(),
|
|
1908
1908
|
};
|
|
1909
1909
|
const [networkCode, query] = this.handleNetworkCodeAndParams(params);
|
|
1910
|
-
const networkId = this.networkCodeToId(networkCode);
|
|
1910
|
+
const networkId = this.networkCodeToId(networkCode, code);
|
|
1911
1911
|
if (networkId === undefined) {
|
|
1912
1912
|
throw new BadRequest(this.id + ' withdraw() requires a network parameter');
|
|
1913
1913
|
}
|
package/js/src/hashkey.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export default class hashkey extends Exchange {
|
|
|
50
50
|
* @returns {object} an associative dictionary of currencies
|
|
51
51
|
*/
|
|
52
52
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
53
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
53
54
|
/**
|
|
54
55
|
* @method
|
|
55
56
|
* @name hashkey#fetchOrderBook
|
package/js/src/hashkey.js
CHANGED
|
@@ -1165,65 +1165,63 @@ export default class hashkey extends Exchange {
|
|
|
1165
1165
|
// ]
|
|
1166
1166
|
// }
|
|
1167
1167
|
//
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
'limits': {
|
|
1183
|
-
'withdraw': {
|
|
1184
|
-
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1185
|
-
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1186
|
-
},
|
|
1187
|
-
'deposit': {
|
|
1188
|
-
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1189
|
-
'max': undefined,
|
|
1190
|
-
},
|
|
1191
|
-
},
|
|
1192
|
-
'active': undefined,
|
|
1193
|
-
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1194
|
-
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1195
|
-
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1196
|
-
'precision': undefined,
|
|
1197
|
-
'info': network,
|
|
1198
|
-
};
|
|
1199
|
-
}
|
|
1200
|
-
const rawType = this.safeString(currecy, 'tokenType');
|
|
1201
|
-
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1202
|
-
result[code] = this.safeCurrencyStructure({
|
|
1203
|
-
'id': currencyId,
|
|
1204
|
-
'code': code,
|
|
1205
|
-
'precision': undefined,
|
|
1206
|
-
'type': type,
|
|
1207
|
-
'name': this.safeString(currecy, 'coinFullName'),
|
|
1208
|
-
'active': undefined,
|
|
1209
|
-
'deposit': this.safeBool(currecy, 'allowDeposit'),
|
|
1210
|
-
'withdraw': this.safeBool(currecy, 'allowWithdraw'),
|
|
1211
|
-
'fee': undefined,
|
|
1168
|
+
return this.parseCurrencies(coins);
|
|
1169
|
+
}
|
|
1170
|
+
parseCurrency(rawCurrency) {
|
|
1171
|
+
const currencyId = this.safeString(rawCurrency, 'coinId');
|
|
1172
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1173
|
+
const networks = this.safeList(rawCurrency, 'chainTypes');
|
|
1174
|
+
const parsedNetworks = {};
|
|
1175
|
+
for (let j = 0; j < networks.length; j++) {
|
|
1176
|
+
const network = networks[j];
|
|
1177
|
+
const networkId = this.safeString(network, 'chainType');
|
|
1178
|
+
const networkCode = this.networkCodeToId(networkId, code);
|
|
1179
|
+
parsedNetworks[networkCode] = {
|
|
1180
|
+
'id': networkId,
|
|
1181
|
+
'network': networkCode,
|
|
1212
1182
|
'limits': {
|
|
1213
|
-
'deposit': {
|
|
1214
|
-
'min': undefined,
|
|
1215
|
-
'max': undefined,
|
|
1216
|
-
},
|
|
1217
1183
|
'withdraw': {
|
|
1218
|
-
'min':
|
|
1184
|
+
'min': this.safeNumber(network, 'minWithdrawQuantity'),
|
|
1185
|
+
'max': this.parseNumber(this.omitZero(this.safeString(network, 'maxWithdrawQuantity'))),
|
|
1186
|
+
},
|
|
1187
|
+
'deposit': {
|
|
1188
|
+
'min': this.safeNumber(network, 'minDepositQuantity'),
|
|
1219
1189
|
'max': undefined,
|
|
1220
1190
|
},
|
|
1221
1191
|
},
|
|
1222
|
-
'
|
|
1223
|
-
'
|
|
1224
|
-
|
|
1192
|
+
'active': undefined,
|
|
1193
|
+
'deposit': this.safeBool(network, 'allowDeposit'),
|
|
1194
|
+
'withdraw': this.safeBool(network, 'allowWithdraw'),
|
|
1195
|
+
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
1196
|
+
'precision': undefined,
|
|
1197
|
+
'info': network,
|
|
1198
|
+
};
|
|
1225
1199
|
}
|
|
1226
|
-
|
|
1200
|
+
const rawType = this.safeString(rawCurrency, 'tokenType');
|
|
1201
|
+
const type = (rawType === 'REAL_MONEY') ? 'fiat' : 'crypto';
|
|
1202
|
+
return this.safeCurrencyStructure({
|
|
1203
|
+
'id': currencyId,
|
|
1204
|
+
'code': code,
|
|
1205
|
+
'precision': undefined,
|
|
1206
|
+
'type': type,
|
|
1207
|
+
'name': this.safeString(rawCurrency, 'coinFullName'),
|
|
1208
|
+
'active': undefined,
|
|
1209
|
+
'deposit': this.safeBool(rawCurrency, 'allowDeposit'),
|
|
1210
|
+
'withdraw': this.safeBool(rawCurrency, 'allowWithdraw'),
|
|
1211
|
+
'fee': undefined,
|
|
1212
|
+
'limits': {
|
|
1213
|
+
'deposit': {
|
|
1214
|
+
'min': undefined,
|
|
1215
|
+
'max': undefined,
|
|
1216
|
+
},
|
|
1217
|
+
'withdraw': {
|
|
1218
|
+
'min': undefined,
|
|
1219
|
+
'max': undefined,
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
'networks': parsedNetworks,
|
|
1223
|
+
'info': rawCurrency,
|
|
1224
|
+
});
|
|
1227
1225
|
}
|
|
1228
1226
|
/**
|
|
1229
1227
|
* @method
|
|
@@ -2049,7 +2047,7 @@ export default class hashkey extends Exchange {
|
|
|
2049
2047
|
let networkCode = undefined;
|
|
2050
2048
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2051
2049
|
if (networkCode !== undefined) {
|
|
2052
|
-
request['chainType'] = this.networkCodeToId(networkCode);
|
|
2050
|
+
request['chainType'] = this.networkCodeToId(networkCode, currency['code']);
|
|
2053
2051
|
}
|
|
2054
2052
|
const response = await this.privatePostApiV1AccountWithdraw(this.extend(request, params));
|
|
2055
2053
|
//
|
package/js/src/hitbtc.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export default class hitbtc extends Exchange {
|
|
|
26
26
|
*/
|
|
27
27
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
28
28
|
parseCurrency(currency: Dict): Currency;
|
|
29
|
-
addKeyInArrayItems(obj: any, keyName: any): any[];
|
|
30
29
|
/**
|
|
31
30
|
* @method
|
|
32
31
|
* @name hitbtc#createDepositAddress
|