ccxt 4.4.82 → 4.4.85
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 +5 -7
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -9
- package/dist/cjs/src/apex.js +2 -1
- package/dist/cjs/src/base/Exchange.js +15 -2
- package/dist/cjs/src/bitget.js +1 -3
- package/dist/cjs/src/bitrue.js +14 -35
- package/dist/cjs/src/bitso.js +33 -0
- package/dist/cjs/src/bitstamp.js +33 -0
- package/dist/cjs/src/blofin.js +154 -13
- package/dist/cjs/src/btcbox.js +25 -5
- package/dist/cjs/src/bybit.js +16 -40
- package/dist/cjs/src/cex.js +2 -4
- package/dist/cjs/src/coinbase.js +56 -40
- package/dist/cjs/src/coinbaseexchange.js +142 -32
- package/dist/cjs/src/coincatch.js +14 -67
- package/dist/cjs/src/coinex.js +29 -32
- package/dist/cjs/src/coinlist.js +16 -15
- package/dist/cjs/src/coinmetro.js +22 -11
- package/dist/cjs/src/coinone.js +8 -10
- package/dist/cjs/src/coinsph.js +126 -1
- package/dist/cjs/src/cryptocom.js +111 -1
- package/dist/cjs/src/cryptomus.js +43 -89
- package/dist/cjs/src/delta.js +76 -36
- package/dist/cjs/src/derive.js +46 -10
- package/dist/cjs/src/ellipx.js +175 -79
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/gemini.js +3 -5
- package/dist/cjs/src/hitbtc.js +56 -69
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/kraken.js +29 -24
- package/dist/cjs/src/kucoinfutures.js +6 -0
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/paradex.js +119 -3
- package/dist/cjs/src/pro/binance.js +31 -33
- package/dist/cjs/src/pro/bithumb.js +5 -3
- package/dist/cjs/src/pro/kraken.js +289 -79
- package/dist/cjs/src/pro/mexc.js +302 -8
- package/dist/cjs/src/pro/poloniex.js +6 -2
- package/examples/js/cli.js +127 -13
- package/js/ccxt.d.ts +2 -11
- package/js/ccxt.js +2 -8
- package/js/src/abstract/blofin.d.ts +8 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/apex.js +2 -1
- package/js/src/base/Exchange.d.ts +15 -1
- package/js/src/base/Exchange.js +15 -2
- package/js/src/base/types.d.ts +3 -0
- package/js/src/bitget.js +1 -3
- package/js/src/bitrue.js +14 -35
- package/js/src/bitso.js +33 -0
- package/js/src/bitstamp.js +33 -0
- package/js/src/blofin.d.ts +42 -2
- package/js/src/blofin.js +154 -13
- package/js/src/btcbox.js +25 -5
- package/js/src/bybit.js +16 -40
- package/js/src/cex.js +2 -4
- package/js/src/coinbase.js +56 -40
- package/js/src/coinbaseexchange.js +142 -32
- package/js/src/coincatch.js +14 -67
- package/js/src/coinex.js +28 -29
- package/js/src/coinlist.js +16 -15
- package/js/src/coinmetro.js +22 -11
- package/js/src/coinone.js +8 -10
- package/js/src/coinsph.d.ts +10 -1
- package/js/src/coinsph.js +126 -1
- package/js/src/cryptocom.d.ts +10 -1
- package/js/src/cryptocom.js +111 -1
- package/js/src/cryptomus.js +43 -89
- package/js/src/delta.js +76 -36
- package/js/src/derive.js +46 -10
- package/js/src/ellipx.d.ts +2 -3
- package/js/src/ellipx.js +175 -80
- package/js/src/gate.js +1 -1
- package/js/src/gemini.js +3 -5
- package/js/src/hitbtc.js +56 -69
- package/js/src/hyperliquid.js +2 -2
- package/js/src/kraken.js +29 -24
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +6 -0
- package/js/src/lbank.js +1 -1
- package/js/src/paradex.d.ts +12 -1
- package/js/src/paradex.js +119 -3
- package/js/src/pro/binance.d.ts +26 -26
- package/js/src/pro/binance.js +31 -33
- package/js/src/pro/bithumb.js +5 -3
- package/js/src/pro/kraken.d.ts +7 -6
- package/js/src/pro/kraken.js +290 -80
- package/js/src/pro/mexc.d.ts +58 -0
- package/js/src/pro/mexc.js +302 -8
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -2
- package/package.json +1 -1
- package/js/src/abstract/bl3p.d.ts +0 -22
- package/js/src/abstract/bl3p.js +0 -11
- package/js/src/abstract/idex.d.ts +0 -29
- package/js/src/abstract/idex.js +0 -11
- package/js/src/bl3p.d.ts +0 -116
- package/js/src/bl3p.js +0 -552
- package/js/src/idex.d.ts +0 -312
- package/js/src/idex.js +0 -1961
- package/js/src/pro/idex.d.ts +0 -81
- package/js/src/pro/idex.js +0 -720
|
@@ -296,6 +296,78 @@ class coinbaseexchange extends coinbaseexchange$1 {
|
|
|
296
296
|
'inverse': undefined,
|
|
297
297
|
},
|
|
298
298
|
},
|
|
299
|
+
'options': {
|
|
300
|
+
'networks': {
|
|
301
|
+
'BTC': 'bitcoin',
|
|
302
|
+
// LIGHTNING unsupported
|
|
303
|
+
'ETH': 'ethereum',
|
|
304
|
+
// TRON unsupported
|
|
305
|
+
'SOL': 'solana',
|
|
306
|
+
// BSC unsupported
|
|
307
|
+
'ARBONE': 'arbitrum',
|
|
308
|
+
'AVAXC': 'avacchain',
|
|
309
|
+
'MATIC': 'polygon',
|
|
310
|
+
'BASE': 'base',
|
|
311
|
+
'SUI': 'sui',
|
|
312
|
+
'OP': 'optimism',
|
|
313
|
+
'NEAR': 'near',
|
|
314
|
+
// CRONOS unsupported
|
|
315
|
+
// GNO unsupported
|
|
316
|
+
'APT': 'aptos',
|
|
317
|
+
// SCROLL unsupported
|
|
318
|
+
'KAVA': 'kava',
|
|
319
|
+
// TAIKO unsupported
|
|
320
|
+
// BOB unsupported
|
|
321
|
+
// LINEA unsupported
|
|
322
|
+
'BLAST': 'blast',
|
|
323
|
+
'XLM': 'stellar',
|
|
324
|
+
// RSK unsupported
|
|
325
|
+
'SEI': 'sei',
|
|
326
|
+
// TON unsupported
|
|
327
|
+
// MANTLE unsupported
|
|
328
|
+
'ADA': 'cardano',
|
|
329
|
+
// HYPE unsupported
|
|
330
|
+
'CORE': 'coredao',
|
|
331
|
+
'ALGO': 'algorand',
|
|
332
|
+
// RUNE unsupported
|
|
333
|
+
'OSMO': 'osmosis',
|
|
334
|
+
// XIN unsupported
|
|
335
|
+
'CELO': 'celo',
|
|
336
|
+
'HBAR': 'hedera',
|
|
337
|
+
// FTM unsupported
|
|
338
|
+
// WEMIX unsupported
|
|
339
|
+
'ZKSYNC': 'zksync',
|
|
340
|
+
// KLAY unsupported
|
|
341
|
+
// HT unsupported
|
|
342
|
+
// FSN unsupported
|
|
343
|
+
// EOS unsupported, eosio?
|
|
344
|
+
// ACA unsupported
|
|
345
|
+
'STX': 'stacks',
|
|
346
|
+
'XTZ': 'tezos',
|
|
347
|
+
// NEO unsupported
|
|
348
|
+
// METIS unsupported
|
|
349
|
+
// TLOS unsupported
|
|
350
|
+
'EGLD': 'elrond',
|
|
351
|
+
// ASTR unsupported
|
|
352
|
+
// CFX unsupported
|
|
353
|
+
// GLMR unsupported
|
|
354
|
+
// CANTO unsupported
|
|
355
|
+
// SCRT unsupported
|
|
356
|
+
'LTC': 'litecoin',
|
|
357
|
+
// AURORA unsupported
|
|
358
|
+
// ONG unsupported
|
|
359
|
+
'ATOM': 'cosmos',
|
|
360
|
+
// CHZ unsupported
|
|
361
|
+
'FIL': 'filecoin',
|
|
362
|
+
'DOT': 'polkadot',
|
|
363
|
+
'DOGE': 'dogecoin',
|
|
364
|
+
// BRC20 unsupported
|
|
365
|
+
'XRP': 'ripple',
|
|
366
|
+
// XMR unsupported
|
|
367
|
+
'DASH': 'dash',
|
|
368
|
+
// akash, aleo, axelar, bitcoincash, berachain, deso, ethereumclassic, unichain, flow, flare, dfinity, story,kusama, mina, ronin, oasis, bittensor, celestia, noble, vara, vechain, zcash, horizen, zetachain
|
|
369
|
+
},
|
|
370
|
+
},
|
|
299
371
|
'exceptions': {
|
|
300
372
|
'exact': {
|
|
301
373
|
'Insufficient funds': errors.InsufficientFunds,
|
|
@@ -331,30 +403,45 @@ class coinbaseexchange extends coinbaseexchange$1 {
|
|
|
331
403
|
async fetchCurrencies(params = {}) {
|
|
332
404
|
const response = await this.publicGetCurrencies(params);
|
|
333
405
|
//
|
|
334
|
-
//
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
//
|
|
338
|
-
//
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
//
|
|
342
|
-
//
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
//
|
|
347
|
-
//
|
|
348
|
-
//
|
|
349
|
-
//
|
|
350
|
-
//
|
|
351
|
-
//
|
|
352
|
-
//
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
357
|
-
//
|
|
406
|
+
// {
|
|
407
|
+
// "id": "USDT",
|
|
408
|
+
// "name": "Tether",
|
|
409
|
+
// "min_size": "0.000001",
|
|
410
|
+
// "status": "online",
|
|
411
|
+
// "message": "",
|
|
412
|
+
// "max_precision": "0.000001",
|
|
413
|
+
// "convertible_to": [],
|
|
414
|
+
// "details": {
|
|
415
|
+
// "type": "crypto",
|
|
416
|
+
// "symbol": null,
|
|
417
|
+
// "network_confirmations": 14,
|
|
418
|
+
// "sort_order": 0,
|
|
419
|
+
// "crypto_address_link": "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7?a={{address}}",
|
|
420
|
+
// "crypto_transaction_link": "https://etherscan.io/tx/0x{{txId}}",
|
|
421
|
+
// "push_payment_methods": [],
|
|
422
|
+
// "group_types": [],
|
|
423
|
+
// "display_name": null,
|
|
424
|
+
// "processing_time_seconds": null,
|
|
425
|
+
// "min_withdrawal_amount": 0.000001,
|
|
426
|
+
// "max_withdrawal_amount": 20000000
|
|
427
|
+
// },
|
|
428
|
+
// "default_network": "ethereum",
|
|
429
|
+
// "supported_networks": [
|
|
430
|
+
// {
|
|
431
|
+
// "id": "ethereum",
|
|
432
|
+
// "name": "Ethereum",
|
|
433
|
+
// "status": "online",
|
|
434
|
+
// "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
435
|
+
// "crypto_address_link": "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7?a={{address}}",
|
|
436
|
+
// "crypto_transaction_link": "https://etherscan.io/tx/0x{{txId}}",
|
|
437
|
+
// "min_withdrawal_amount": 0.000001,
|
|
438
|
+
// "max_withdrawal_amount": 20000000,
|
|
439
|
+
// "network_confirmations": 14,
|
|
440
|
+
// "processing_time_seconds": null
|
|
441
|
+
// }
|
|
442
|
+
// ],
|
|
443
|
+
// "display_name": "USDT"
|
|
444
|
+
// }
|
|
358
445
|
//
|
|
359
446
|
const result = {};
|
|
360
447
|
for (let i = 0; i < response.length; i++) {
|
|
@@ -362,16 +449,39 @@ class coinbaseexchange extends coinbaseexchange$1 {
|
|
|
362
449
|
const id = this.safeString(currency, 'id');
|
|
363
450
|
const name = this.safeString(currency, 'name');
|
|
364
451
|
const code = this.safeCurrencyCode(id);
|
|
365
|
-
const details = this.
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
|
|
452
|
+
const details = this.safeDict(currency, 'details', {});
|
|
453
|
+
const networks = {};
|
|
454
|
+
const supportedNetworks = this.safeList(currency, 'supported_networks', []);
|
|
455
|
+
for (let j = 0; j < supportedNetworks.length; j++) {
|
|
456
|
+
const network = supportedNetworks[j];
|
|
457
|
+
const networkId = this.safeString(network, 'id');
|
|
458
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
459
|
+
networks[networkCode] = {
|
|
460
|
+
'id': networkId,
|
|
461
|
+
'name': this.safeString(network, 'name'),
|
|
462
|
+
'network': networkCode,
|
|
463
|
+
'active': this.safeString(network, 'status') === 'online',
|
|
464
|
+
'withdraw': undefined,
|
|
465
|
+
'deposit': undefined,
|
|
466
|
+
'fee': undefined,
|
|
467
|
+
'precision': undefined,
|
|
468
|
+
'limits': {
|
|
469
|
+
'withdraw': {
|
|
470
|
+
'min': this.safeNumber(network, 'min_withdrawal_amount'),
|
|
471
|
+
'max': this.safeNumber(network, 'max_withdrawal_amount'),
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
'contract': this.safeString(network, 'contract_address'),
|
|
475
|
+
'info': network,
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
result[code] = this.safeCurrencyStructure({
|
|
369
479
|
'id': id,
|
|
370
480
|
'code': code,
|
|
371
481
|
'info': currency,
|
|
372
482
|
'type': this.safeString(details, 'type'),
|
|
373
483
|
'name': name,
|
|
374
|
-
'active':
|
|
484
|
+
'active': this.safeString(currency, 'status') === 'online',
|
|
375
485
|
'deposit': undefined,
|
|
376
486
|
'withdraw': undefined,
|
|
377
487
|
'fee': undefined,
|
|
@@ -383,11 +493,11 @@ class coinbaseexchange extends coinbaseexchange$1 {
|
|
|
383
493
|
},
|
|
384
494
|
'withdraw': {
|
|
385
495
|
'min': this.safeNumber(details, 'min_withdrawal_amount'),
|
|
386
|
-
'max':
|
|
496
|
+
'max': this.safeNumber(details, 'max_withdrawal_amount'),
|
|
387
497
|
},
|
|
388
498
|
},
|
|
389
|
-
'networks':
|
|
390
|
-
};
|
|
499
|
+
'networks': networks,
|
|
500
|
+
});
|
|
391
501
|
}
|
|
392
502
|
return result;
|
|
393
503
|
}
|
|
@@ -358,56 +358,18 @@ class coincatch extends coincatch$1 {
|
|
|
358
358
|
'CRO': 'CronosChain',
|
|
359
359
|
},
|
|
360
360
|
'networksById': {
|
|
361
|
-
'BITCOIN': 'BTC',
|
|
362
|
-
'ERC20': 'ERC20',
|
|
363
361
|
'TRC20': 'TRC20',
|
|
364
362
|
'TRX(TRC20)': 'TRC20',
|
|
365
|
-
'BEP20': 'BEP20',
|
|
366
363
|
'ArbitrumOne': 'ARB',
|
|
367
|
-
'Optimism': 'OPTIMISM',
|
|
368
|
-
'LTC': 'LTC',
|
|
369
|
-
'BCH': 'BCH',
|
|
370
|
-
'ETC': 'ETC',
|
|
371
|
-
'SOL': 'SOL',
|
|
372
|
-
'NEO3': 'NEO3',
|
|
373
|
-
'stacks': 'STX',
|
|
374
|
-
'Elrond': 'EGLD',
|
|
375
|
-
'NEARProtocol': 'NEAR',
|
|
376
|
-
'AcalaToken': 'ACA',
|
|
377
|
-
'Klaytn': 'KLAY',
|
|
378
|
-
'Fantom': 'FTM',
|
|
379
|
-
'Terra': 'TERRA',
|
|
380
|
-
'WAVES': 'WAVES',
|
|
381
|
-
'TAO': 'TAO',
|
|
382
|
-
'SUI': 'SUI',
|
|
383
|
-
'SEI': 'SEI',
|
|
384
364
|
'THORChain': 'RUNE',
|
|
385
|
-
'ZIL': 'ZIL',
|
|
386
365
|
'Solar': 'SXP',
|
|
387
|
-
'FET': 'FET',
|
|
388
366
|
'C-Chain': 'AVAX',
|
|
389
|
-
'XRP': 'XRP',
|
|
390
|
-
'EOS': 'EOS',
|
|
391
|
-
'DOGECOIN': 'DOGE',
|
|
392
367
|
'CAP20': 'CAP20',
|
|
393
|
-
'Polygon': 'MATIC',
|
|
394
|
-
'CSPR': 'CSPR',
|
|
395
|
-
'Moonbeam': 'GLMR',
|
|
396
|
-
'MINA': 'MINA',
|
|
397
368
|
'CFXeSpace': 'CFX',
|
|
398
369
|
'CFX': 'CFX',
|
|
399
370
|
'StratisEVM': 'STRAT',
|
|
400
|
-
'Celestia': 'TIA',
|
|
401
371
|
'ChilizChain': 'ChilizChain',
|
|
402
|
-
'Aptos': 'APT',
|
|
403
|
-
'Ontology': 'ONT',
|
|
404
|
-
'ICP': 'ICP',
|
|
405
|
-
'Cardano': 'ADA',
|
|
406
|
-
'FIL': 'FIL',
|
|
407
|
-
'CELO': 'CELO',
|
|
408
|
-
'DOT': 'DOT',
|
|
409
372
|
'StellarLumens': 'XLM',
|
|
410
|
-
'ATOM': 'ATOM',
|
|
411
373
|
'CronosChain': 'CRO', // todo check
|
|
412
374
|
},
|
|
413
375
|
},
|
|
@@ -641,72 +603,57 @@ class coincatch extends coincatch$1 {
|
|
|
641
603
|
const currencyId = this.safeString(currecy, 'coinName');
|
|
642
604
|
currenciesIds.push(currencyId);
|
|
643
605
|
const code = this.safeCurrencyCode(currencyId);
|
|
644
|
-
let allowDeposit = false;
|
|
645
|
-
let allowWithdraw = false;
|
|
646
|
-
let minDeposit = undefined;
|
|
647
|
-
let minWithdraw = undefined;
|
|
648
606
|
const networks = this.safeList(currecy, 'chains');
|
|
649
|
-
const networksById = this.safeDict(this.options, 'networksById');
|
|
650
607
|
const parsedNetworks = {};
|
|
651
608
|
for (let j = 0; j < networks.length; j++) {
|
|
652
609
|
const network = networks[j];
|
|
653
610
|
const networkId = this.safeString(network, 'chain');
|
|
654
|
-
const
|
|
655
|
-
const networkDepositString = this.safeString(network, 'rechargeable');
|
|
656
|
-
const networkDeposit = networkDepositString === 'true';
|
|
657
|
-
const networkWithdrawString = this.safeString(network, 'withdrawable');
|
|
658
|
-
const networkWithdraw = networkWithdrawString === 'true';
|
|
659
|
-
const networkMinDeposit = this.safeString(network, 'minDepositAmount');
|
|
660
|
-
const networkMinWithdraw = this.safeString(network, 'minWithdrawAmount');
|
|
611
|
+
const networkCode = this.networkCodeToId(networkId);
|
|
661
612
|
parsedNetworks[networkId] = {
|
|
662
613
|
'id': networkId,
|
|
663
|
-
'network':
|
|
614
|
+
'network': networkCode,
|
|
664
615
|
'limits': {
|
|
665
616
|
'deposit': {
|
|
666
|
-
'min': this.
|
|
617
|
+
'min': this.safeNumber(network, 'minDepositAmount'),
|
|
667
618
|
'max': undefined,
|
|
668
619
|
},
|
|
669
620
|
'withdraw': {
|
|
670
|
-
'min': this.
|
|
621
|
+
'min': this.safeNumber(network, 'minWithdrawAmount'),
|
|
671
622
|
'max': undefined,
|
|
672
623
|
},
|
|
673
624
|
},
|
|
674
|
-
'active':
|
|
675
|
-
'deposit':
|
|
676
|
-
'withdraw':
|
|
625
|
+
'active': undefined,
|
|
626
|
+
'deposit': this.safeString(network, 'rechargeable') === 'true',
|
|
627
|
+
'withdraw': this.safeString(network, 'withdrawable') === 'true',
|
|
677
628
|
'fee': this.safeNumber(network, 'withdrawFee'),
|
|
678
629
|
'precision': undefined,
|
|
679
630
|
'info': network,
|
|
680
631
|
};
|
|
681
|
-
allowDeposit = allowDeposit ? allowDeposit : networkDeposit;
|
|
682
|
-
allowWithdraw = allowWithdraw ? allowWithdraw : networkWithdraw;
|
|
683
|
-
minDeposit = minDeposit ? Precise["default"].stringMin(networkMinDeposit, minDeposit) : networkMinDeposit;
|
|
684
|
-
minWithdraw = minWithdraw ? Precise["default"].stringMin(networkMinWithdraw, minWithdraw) : networkMinWithdraw;
|
|
685
632
|
}
|
|
686
|
-
result[code] = {
|
|
633
|
+
result[code] = this.safeCurrencyStructure({
|
|
687
634
|
'id': currencyId,
|
|
688
635
|
'numericId': this.safeInteger(currecy, 'coinId'),
|
|
689
636
|
'code': code,
|
|
690
637
|
'precision': undefined,
|
|
691
638
|
'type': undefined,
|
|
692
639
|
'name': undefined,
|
|
693
|
-
'active':
|
|
694
|
-
'deposit':
|
|
695
|
-
'withdraw':
|
|
640
|
+
'active': undefined,
|
|
641
|
+
'deposit': undefined,
|
|
642
|
+
'withdraw': undefined,
|
|
696
643
|
'fee': undefined,
|
|
697
644
|
'limits': {
|
|
698
645
|
'deposit': {
|
|
699
|
-
'min':
|
|
646
|
+
'min': undefined,
|
|
700
647
|
'max': undefined,
|
|
701
648
|
},
|
|
702
649
|
'withdraw': {
|
|
703
|
-
'min':
|
|
650
|
+
'min': undefined,
|
|
704
651
|
'max': undefined,
|
|
705
652
|
},
|
|
706
653
|
},
|
|
707
654
|
'networks': parsedNetworks,
|
|
708
655
|
'info': currecy,
|
|
709
|
-
};
|
|
656
|
+
});
|
|
710
657
|
}
|
|
711
658
|
if (this.safeList(this.options, 'currencyIdsListForParseMarket') === undefined) {
|
|
712
659
|
this.options['currencyIdsListForParseMarket'] = currenciesIds;
|
package/dist/cjs/src/coinex.js
CHANGED
|
@@ -721,33 +721,6 @@ class coinex extends coinex$1 {
|
|
|
721
721
|
const canWithdraw = this.safeBool(asset, 'withdraw_enabled');
|
|
722
722
|
const firstChain = this.safeDict(chains, 0, {});
|
|
723
723
|
const firstPrecisionString = this.parsePrecision(this.safeString(firstChain, 'withdrawal_precision'));
|
|
724
|
-
result[code] = {
|
|
725
|
-
'id': currencyId,
|
|
726
|
-
'code': code,
|
|
727
|
-
'name': undefined,
|
|
728
|
-
'active': canDeposit && canWithdraw,
|
|
729
|
-
'deposit': canDeposit,
|
|
730
|
-
'withdraw': canWithdraw,
|
|
731
|
-
'fee': undefined,
|
|
732
|
-
'precision': this.parseNumber(firstPrecisionString),
|
|
733
|
-
'limits': {
|
|
734
|
-
'amount': {
|
|
735
|
-
'min': undefined,
|
|
736
|
-
'max': undefined,
|
|
737
|
-
},
|
|
738
|
-
'deposit': {
|
|
739
|
-
'min': undefined,
|
|
740
|
-
'max': undefined,
|
|
741
|
-
},
|
|
742
|
-
'withdraw': {
|
|
743
|
-
'min': undefined,
|
|
744
|
-
'max': undefined,
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
'networks': {},
|
|
748
|
-
'type': 'crypto',
|
|
749
|
-
'info': coin,
|
|
750
|
-
};
|
|
751
724
|
for (let j = 0; j < chains.length; j++) {
|
|
752
725
|
const chain = chains[j];
|
|
753
726
|
const networkId = this.safeString(chain, 'chain');
|
|
@@ -760,7 +733,7 @@ class coinex extends coinex$1 {
|
|
|
760
733
|
const minNetworkWithdrawString = this.safeString(chain, 'min_withdraw_amount');
|
|
761
734
|
const canDepositChain = this.safeBool(chain, 'deposit_enabled');
|
|
762
735
|
const canWithdrawChain = this.safeBool(chain, 'withdraw_enabled');
|
|
763
|
-
|
|
736
|
+
({
|
|
764
737
|
'id': networkId,
|
|
765
738
|
'network': networkId,
|
|
766
739
|
'name': undefined,
|
|
@@ -784,11 +757,35 @@ class coinex extends coinex$1 {
|
|
|
784
757
|
},
|
|
785
758
|
},
|
|
786
759
|
'info': chain,
|
|
787
|
-
};
|
|
788
|
-
const networks = this.safeDict(result[code], 'networks', {});
|
|
789
|
-
networks[networkId] = network;
|
|
790
|
-
result[code]['networks'] = networks;
|
|
760
|
+
});
|
|
791
761
|
}
|
|
762
|
+
result[code] = this.safeCurrencyStructure({
|
|
763
|
+
'id': currencyId,
|
|
764
|
+
'code': code,
|
|
765
|
+
'name': undefined,
|
|
766
|
+
'active': canDeposit && canWithdraw,
|
|
767
|
+
'deposit': canDeposit,
|
|
768
|
+
'withdraw': canWithdraw,
|
|
769
|
+
'fee': undefined,
|
|
770
|
+
'precision': this.parseNumber(firstPrecisionString),
|
|
771
|
+
'limits': {
|
|
772
|
+
'amount': {
|
|
773
|
+
'min': undefined,
|
|
774
|
+
'max': undefined,
|
|
775
|
+
},
|
|
776
|
+
'deposit': {
|
|
777
|
+
'min': undefined,
|
|
778
|
+
'max': undefined,
|
|
779
|
+
},
|
|
780
|
+
'withdraw': {
|
|
781
|
+
'min': undefined,
|
|
782
|
+
'max': undefined,
|
|
783
|
+
},
|
|
784
|
+
},
|
|
785
|
+
'networks': {},
|
|
786
|
+
'type': 'crypto',
|
|
787
|
+
'info': coin,
|
|
788
|
+
});
|
|
792
789
|
}
|
|
793
790
|
return result;
|
|
794
791
|
}
|
package/dist/cjs/src/coinlist.js
CHANGED
|
@@ -453,30 +453,31 @@ class coinlist extends coinlist$1 {
|
|
|
453
453
|
const currency = currencies[i];
|
|
454
454
|
const id = this.safeString(currency, 'asset');
|
|
455
455
|
const code = this.safeCurrencyCode(id);
|
|
456
|
+
const isFiat = code === 'USD';
|
|
456
457
|
const isTransferable = this.safeBool(currency, 'is_transferable', false);
|
|
457
|
-
|
|
458
|
-
const depositEnabled = isTransferable;
|
|
459
|
-
const active = isTransferable;
|
|
460
|
-
const decimalPlaces = this.safeString(currency, 'decimal_places');
|
|
461
|
-
const precision = this.parseNumber(this.parsePrecision(decimalPlaces));
|
|
462
|
-
const minWithdrawal = this.safeString(currency, 'min_withdrawal');
|
|
463
|
-
result[code] = {
|
|
458
|
+
result[code] = this.safeCurrencyStructure({
|
|
464
459
|
'id': id,
|
|
465
460
|
'code': code,
|
|
466
461
|
'name': code,
|
|
467
462
|
'info': currency,
|
|
468
|
-
'active':
|
|
469
|
-
'deposit':
|
|
470
|
-
'withdraw':
|
|
463
|
+
'active': undefined,
|
|
464
|
+
'deposit': isTransferable,
|
|
465
|
+
'withdraw': isTransferable,
|
|
471
466
|
'fee': undefined,
|
|
472
|
-
'precision':
|
|
467
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'decimal_places'))),
|
|
473
468
|
'limits': {
|
|
474
|
-
'amount': {
|
|
475
|
-
|
|
469
|
+
'amount': {
|
|
470
|
+
'min': undefined,
|
|
471
|
+
'max': undefined,
|
|
472
|
+
},
|
|
473
|
+
'withdraw': {
|
|
474
|
+
'min': this.safeNumber(currency, 'min_withdrawal'),
|
|
475
|
+
'max': undefined,
|
|
476
|
+
},
|
|
476
477
|
},
|
|
477
478
|
'networks': {},
|
|
478
|
-
'type': 'crypto',
|
|
479
|
-
};
|
|
479
|
+
'type': isFiat ? 'fiat' : 'crypto',
|
|
480
|
+
});
|
|
480
481
|
}
|
|
481
482
|
return result;
|
|
482
483
|
}
|
|
@@ -377,24 +377,35 @@ class coinmetro extends coinmetro$1 {
|
|
|
377
377
|
const currency = response[i];
|
|
378
378
|
const id = this.safeString(currency, 'symbol');
|
|
379
379
|
const code = this.safeCurrencyCode(id);
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
380
|
+
const typeRaw = this.safeString(currency, 'type');
|
|
381
|
+
let type = undefined;
|
|
382
|
+
if (typeRaw === 'coin' || typeRaw === 'token' || typeRaw === 'erc20') {
|
|
383
|
+
type = 'crypto';
|
|
384
|
+
}
|
|
385
|
+
else if (typeRaw === 'fiat') {
|
|
386
|
+
type = 'fiat';
|
|
387
|
+
}
|
|
388
|
+
const precisionDigits = this.safeString2(currency, 'digits', 'notabeneDecimals');
|
|
385
389
|
result[code] = this.safeCurrencyStructure({
|
|
386
390
|
'id': id,
|
|
387
391
|
'code': code,
|
|
388
392
|
'name': code,
|
|
393
|
+
'type': type,
|
|
389
394
|
'info': currency,
|
|
390
|
-
'active':
|
|
391
|
-
'deposit':
|
|
392
|
-
'withdraw':
|
|
395
|
+
'active': this.safeBool(currency, 'canTrade'),
|
|
396
|
+
'deposit': this.safeBool(currency, 'canDeposit'),
|
|
397
|
+
'withdraw': this.safeBool(currency, 'canWithdraw'),
|
|
393
398
|
'fee': undefined,
|
|
394
|
-
'precision': this.parseNumber(this.parsePrecision(
|
|
399
|
+
'precision': this.parseNumber(this.parsePrecision(precisionDigits)),
|
|
395
400
|
'limits': {
|
|
396
|
-
'amount': {
|
|
397
|
-
|
|
401
|
+
'amount': {
|
|
402
|
+
'min': this.safeNumber(currency, 'minQty'),
|
|
403
|
+
'max': undefined,
|
|
404
|
+
},
|
|
405
|
+
'withdraw': {
|
|
406
|
+
'min': undefined,
|
|
407
|
+
'max': undefined,
|
|
408
|
+
},
|
|
398
409
|
},
|
|
399
410
|
'networks': {},
|
|
400
411
|
});
|
package/dist/cjs/src/coinone.js
CHANGED
|
@@ -296,18 +296,16 @@ class coinone extends coinone$1 {
|
|
|
296
296
|
for (let i = 0; i < currencies.length; i++) {
|
|
297
297
|
const entry = currencies[i];
|
|
298
298
|
const id = this.safeString(entry, 'symbol');
|
|
299
|
-
const name = this.safeString(entry, 'name');
|
|
300
299
|
const code = this.safeCurrencyCode(id);
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
result[code] = {
|
|
300
|
+
const isWithdrawEnabled = this.safeString(entry, 'withdraw_status', '') === 'normal';
|
|
301
|
+
const isDepositEnabled = this.safeString(entry, 'deposit_status', '') === 'normal';
|
|
302
|
+
const type = (code !== 'KRW') ? 'crypto' : 'fiat';
|
|
303
|
+
result[code] = this.safeCurrencyStructure({
|
|
306
304
|
'id': id,
|
|
307
305
|
'code': code,
|
|
308
306
|
'info': entry,
|
|
309
|
-
'name': name,
|
|
310
|
-
'active':
|
|
307
|
+
'name': this.safeString(entry, 'name'),
|
|
308
|
+
'active': undefined,
|
|
311
309
|
'deposit': isDepositEnabled,
|
|
312
310
|
'withdraw': isWithdrawEnabled,
|
|
313
311
|
'fee': this.safeNumber(entry, 'withdrawal_fee'),
|
|
@@ -323,8 +321,8 @@ class coinone extends coinone$1 {
|
|
|
323
321
|
},
|
|
324
322
|
},
|
|
325
323
|
'networks': {},
|
|
326
|
-
'type':
|
|
327
|
-
};
|
|
324
|
+
'type': type,
|
|
325
|
+
});
|
|
328
326
|
}
|
|
329
327
|
return result;
|
|
330
328
|
}
|