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.
Files changed (103) hide show
  1. package/README.md +5 -7
  2. package/dist/ccxt.browser.min.js +7 -7
  3. package/dist/cjs/ccxt.js +1 -9
  4. package/dist/cjs/src/apex.js +2 -1
  5. package/dist/cjs/src/base/Exchange.js +15 -2
  6. package/dist/cjs/src/bitget.js +1 -3
  7. package/dist/cjs/src/bitrue.js +14 -35
  8. package/dist/cjs/src/bitso.js +33 -0
  9. package/dist/cjs/src/bitstamp.js +33 -0
  10. package/dist/cjs/src/blofin.js +154 -13
  11. package/dist/cjs/src/btcbox.js +25 -5
  12. package/dist/cjs/src/bybit.js +16 -40
  13. package/dist/cjs/src/cex.js +2 -4
  14. package/dist/cjs/src/coinbase.js +56 -40
  15. package/dist/cjs/src/coinbaseexchange.js +142 -32
  16. package/dist/cjs/src/coincatch.js +14 -67
  17. package/dist/cjs/src/coinex.js +29 -32
  18. package/dist/cjs/src/coinlist.js +16 -15
  19. package/dist/cjs/src/coinmetro.js +22 -11
  20. package/dist/cjs/src/coinone.js +8 -10
  21. package/dist/cjs/src/coinsph.js +126 -1
  22. package/dist/cjs/src/cryptocom.js +111 -1
  23. package/dist/cjs/src/cryptomus.js +43 -89
  24. package/dist/cjs/src/delta.js +76 -36
  25. package/dist/cjs/src/derive.js +46 -10
  26. package/dist/cjs/src/ellipx.js +175 -79
  27. package/dist/cjs/src/gate.js +1 -1
  28. package/dist/cjs/src/gemini.js +3 -5
  29. package/dist/cjs/src/hitbtc.js +56 -69
  30. package/dist/cjs/src/hyperliquid.js +2 -2
  31. package/dist/cjs/src/kraken.js +29 -24
  32. package/dist/cjs/src/kucoinfutures.js +6 -0
  33. package/dist/cjs/src/lbank.js +1 -1
  34. package/dist/cjs/src/paradex.js +119 -3
  35. package/dist/cjs/src/pro/binance.js +31 -33
  36. package/dist/cjs/src/pro/bithumb.js +5 -3
  37. package/dist/cjs/src/pro/kraken.js +289 -79
  38. package/dist/cjs/src/pro/mexc.js +302 -8
  39. package/dist/cjs/src/pro/poloniex.js +6 -2
  40. package/examples/js/cli.js +127 -13
  41. package/js/ccxt.d.ts +2 -11
  42. package/js/ccxt.js +2 -8
  43. package/js/src/abstract/blofin.d.ts +8 -0
  44. package/js/src/abstract/btcbox.d.ts +1 -0
  45. package/js/src/apex.js +2 -1
  46. package/js/src/base/Exchange.d.ts +15 -1
  47. package/js/src/base/Exchange.js +15 -2
  48. package/js/src/base/types.d.ts +3 -0
  49. package/js/src/bitget.js +1 -3
  50. package/js/src/bitrue.js +14 -35
  51. package/js/src/bitso.js +33 -0
  52. package/js/src/bitstamp.js +33 -0
  53. package/js/src/blofin.d.ts +42 -2
  54. package/js/src/blofin.js +154 -13
  55. package/js/src/btcbox.js +25 -5
  56. package/js/src/bybit.js +16 -40
  57. package/js/src/cex.js +2 -4
  58. package/js/src/coinbase.js +56 -40
  59. package/js/src/coinbaseexchange.js +142 -32
  60. package/js/src/coincatch.js +14 -67
  61. package/js/src/coinex.js +28 -29
  62. package/js/src/coinlist.js +16 -15
  63. package/js/src/coinmetro.js +22 -11
  64. package/js/src/coinone.js +8 -10
  65. package/js/src/coinsph.d.ts +10 -1
  66. package/js/src/coinsph.js +126 -1
  67. package/js/src/cryptocom.d.ts +10 -1
  68. package/js/src/cryptocom.js +111 -1
  69. package/js/src/cryptomus.js +43 -89
  70. package/js/src/delta.js +76 -36
  71. package/js/src/derive.js +46 -10
  72. package/js/src/ellipx.d.ts +2 -3
  73. package/js/src/ellipx.js +175 -80
  74. package/js/src/gate.js +1 -1
  75. package/js/src/gemini.js +3 -5
  76. package/js/src/hitbtc.js +56 -69
  77. package/js/src/hyperliquid.js +2 -2
  78. package/js/src/kraken.js +29 -24
  79. package/js/src/kucoinfutures.d.ts +1 -0
  80. package/js/src/kucoinfutures.js +6 -0
  81. package/js/src/lbank.js +1 -1
  82. package/js/src/paradex.d.ts +12 -1
  83. package/js/src/paradex.js +119 -3
  84. package/js/src/pro/binance.d.ts +26 -26
  85. package/js/src/pro/binance.js +31 -33
  86. package/js/src/pro/bithumb.js +5 -3
  87. package/js/src/pro/kraken.d.ts +7 -6
  88. package/js/src/pro/kraken.js +290 -80
  89. package/js/src/pro/mexc.d.ts +58 -0
  90. package/js/src/pro/mexc.js +302 -8
  91. package/js/src/pro/poloniex.d.ts +1 -1
  92. package/js/src/pro/poloniex.js +6 -2
  93. package/package.json +1 -1
  94. package/js/src/abstract/bl3p.d.ts +0 -22
  95. package/js/src/abstract/bl3p.js +0 -11
  96. package/js/src/abstract/idex.d.ts +0 -29
  97. package/js/src/abstract/idex.js +0 -11
  98. package/js/src/bl3p.d.ts +0 -116
  99. package/js/src/bl3p.js +0 -552
  100. package/js/src/idex.d.ts +0 -312
  101. package/js/src/idex.js +0 -1961
  102. package/js/src/pro/idex.d.ts +0 -81
  103. package/js/src/pro/idex.js +0 -720
@@ -57,7 +57,7 @@ class coinsph extends coinsph$1 {
57
57
  'fetchClosedOrders': true,
58
58
  'fetchCrossBorrowRate': false,
59
59
  'fetchCrossBorrowRates': false,
60
- 'fetchCurrencies': false,
60
+ 'fetchCurrencies': true,
61
61
  'fetchDeposit': undefined,
62
62
  'fetchDepositAddress': true,
63
63
  'fetchDepositAddresses': false,
@@ -483,6 +483,131 @@ class coinsph extends coinsph$1 {
483
483
  },
484
484
  });
485
485
  }
486
+ /**
487
+ * @method
488
+ * @name coinsph#fetchCurrencies
489
+ * @description fetches all available currencies on an exchange
490
+ * @see https://docs.coins.ph/rest-api/#all-coins-information-user_data
491
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
492
+ * @returns {object} an associative dictionary of currencies
493
+ */
494
+ async fetchCurrencies(params = {}) {
495
+ if (!this.checkRequiredCredentials(false)) {
496
+ return undefined;
497
+ }
498
+ const response = await this.privateGetOpenapiWalletV1ConfigGetall(params);
499
+ //
500
+ // [
501
+ // {
502
+ // "coin": "PHP",
503
+ // "name": "PHP",
504
+ // "depositAllEnable": false,
505
+ // "withdrawAllEnable": false,
506
+ // "free": "0",
507
+ // "locked": "0",
508
+ // "transferPrecision": "2",
509
+ // "transferMinQuantity": "0",
510
+ // "networkList": [],
511
+ // "legalMoney": true
512
+ // },
513
+ // {
514
+ // "coin": "USDT",
515
+ // "name": "USDT",
516
+ // "depositAllEnable": true,
517
+ // "withdrawAllEnable": true,
518
+ // "free": "0",
519
+ // "locked": "0",
520
+ // "transferPrecision": "8",
521
+ // "transferMinQuantity": "0",
522
+ // "networkList": [
523
+ // {
524
+ // "addressRegex": "^0x[0-9a-fA-F]{40}$",
525
+ // "memoRegex": " ",
526
+ // "network": "ETH",
527
+ // "name": "Ethereum (ERC20)",
528
+ // "depositEnable": true,
529
+ // "minConfirm": "12",
530
+ // "unLockConfirm": "-1",
531
+ // "withdrawDesc": "",
532
+ // "withdrawEnable": true,
533
+ // "withdrawFee": "6",
534
+ // "withdrawIntegerMultiple": "0.000001",
535
+ // "withdrawMax": "500000",
536
+ // "withdrawMin": "10",
537
+ // "sameAddress": false
538
+ // },
539
+ // {
540
+ // "addressRegex": "^T[0-9a-zA-Z]{33}$",
541
+ // "memoRegex": "",
542
+ // "network": "TRX",
543
+ // "name": "TRON",
544
+ // "depositEnable": true,
545
+ // "minConfirm": "19",
546
+ // "unLockConfirm": "-1",
547
+ // "withdrawDesc": "",
548
+ // "withdrawEnable": true,
549
+ // "withdrawFee": "3",
550
+ // "withdrawIntegerMultiple": "0.000001",
551
+ // "withdrawMax": "1000000",
552
+ // "withdrawMin": "20",
553
+ // "sameAddress": false
554
+ // }
555
+ // ],
556
+ // "legalMoney": false
557
+ // }
558
+ // ]
559
+ //
560
+ const result = {};
561
+ for (let i = 0; i < response.length; i++) {
562
+ const entry = response[i];
563
+ const id = this.safeString(entry, 'coin');
564
+ const code = this.safeCurrencyCode(id);
565
+ const isFiat = this.safeBool(entry, 'isLegalMoney');
566
+ const networkList = this.safeList(entry, 'networkList', []);
567
+ const networks = {};
568
+ for (let j = 0; j < networkList.length; j++) {
569
+ const networkItem = networkList[j];
570
+ const network = this.safeString(networkItem, 'network');
571
+ const networkCode = this.networkIdToCode(network);
572
+ networks[networkCode] = {
573
+ 'info': networkItem,
574
+ 'id': network,
575
+ 'network': networkCode,
576
+ 'active': undefined,
577
+ 'deposit': this.safeBool(networkItem, 'depositEnable'),
578
+ 'withdraw': this.safeBool(networkItem, 'withdrawEnable'),
579
+ 'fee': this.safeNumber(networkItem, 'withdrawFee'),
580
+ 'precision': this.safeNumber(networkItem, 'withdrawIntegerMultiple'),
581
+ 'limits': {
582
+ 'withdraw': {
583
+ 'min': this.safeNumber(networkItem, 'withdrawMin'),
584
+ 'max': this.safeNumber(networkItem, 'withdrawMax'),
585
+ },
586
+ 'deposit': {
587
+ 'min': undefined,
588
+ 'max': undefined,
589
+ },
590
+ },
591
+ };
592
+ }
593
+ result[code] = this.safeCurrencyStructure({
594
+ 'id': id,
595
+ 'name': this.safeString(entry, 'name'),
596
+ 'code': code,
597
+ 'type': isFiat ? 'fiat' : 'crypto',
598
+ 'precision': this.parseNumber(this.parsePrecision(this.safeString(entry, 'transferPrecision'))),
599
+ 'info': entry,
600
+ 'active': undefined,
601
+ 'deposit': this.safeBool(entry, 'depositAllEnable'),
602
+ 'withdraw': this.safeBool(entry, 'withdrawAllEnable'),
603
+ 'networks': networks,
604
+ 'fee': undefined,
605
+ 'fees': undefined,
606
+ 'limits': {},
607
+ });
608
+ }
609
+ return result;
610
+ }
486
611
  calculateRateLimiterCost(api, method, path, params, config = {}) {
487
612
  if (('noSymbol' in config) && !('symbol' in params)) {
488
613
  return config['noSymbol'];
@@ -51,7 +51,7 @@ class cryptocom extends cryptocom$1 {
51
51
  'fetchClosedOrders': 'emulated',
52
52
  'fetchCrossBorrowRate': false,
53
53
  'fetchCrossBorrowRates': false,
54
- 'fetchCurrencies': false,
54
+ 'fetchCurrencies': true,
55
55
  'fetchDepositAddress': true,
56
56
  'fetchDepositAddresses': false,
57
57
  'fetchDepositAddressesByNetwork': true,
@@ -508,6 +508,116 @@ class cryptocom extends cryptocom$1 {
508
508
  },
509
509
  });
510
510
  }
511
+ /**
512
+ * @method
513
+ * @name cryptocom#fetchCurrencies
514
+ * @description fetches all available currencies on an exchange
515
+ * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
516
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
517
+ * @returns {object} an associative dictionary of currencies
518
+ */
519
+ async fetchCurrencies(params = {}) {
520
+ // this endpoint requires authentication
521
+ if (!this.checkRequiredCredentials(false)) {
522
+ return undefined;
523
+ }
524
+ const response = await this.v1PrivatePostPrivateGetCurrencyNetworks(params);
525
+ //
526
+ // {
527
+ // "id": "1747502328559",
528
+ // "method": "private/get-currency-networks",
529
+ // "code": "0",
530
+ // "result": {
531
+ // "update_time": "1747502281000",
532
+ // "currency_map": {
533
+ // "USDT": {
534
+ // "full_name": "Tether USD",
535
+ // "default_network": "ETH",
536
+ // "network_list": [
537
+ // {
538
+ // "network_id": "ETH",
539
+ // "withdrawal_fee": "10.00000000",
540
+ // "withdraw_enabled": true,
541
+ // "min_withdrawal_amount": "20.0",
542
+ // "deposit_enabled": true,
543
+ // "confirmation_required": "32"
544
+ // },
545
+ // {
546
+ // "network_id": "CRONOS",
547
+ // "withdrawal_fee": "0.18000000",
548
+ // "withdraw_enabled": true,
549
+ // "min_withdrawal_amount": "0.36",
550
+ // "deposit_enabled": true,
551
+ // "confirmation_required": "15"
552
+ // },
553
+ // {
554
+ // "network_id": "SOL",
555
+ // "withdrawal_fee": "5.31000000",
556
+ // "withdraw_enabled": true,
557
+ // "min_withdrawal_amount": "10.62",
558
+ // "deposit_enabled": true,
559
+ // "confirmation_required": "1"
560
+ // }
561
+ // ]
562
+ // }
563
+ // }
564
+ // }
565
+ // }
566
+ //
567
+ const resultData = this.safeDict(response, 'result', {});
568
+ const currencyMap = this.safeDict(resultData, 'currency_map', {});
569
+ const keys = Object.keys(currencyMap);
570
+ const result = {};
571
+ for (let i = 0; i < keys.length; i++) {
572
+ const key = keys[i];
573
+ const currency = currencyMap[key];
574
+ const id = key;
575
+ const code = this.safeCurrencyCode(id);
576
+ const networks = {};
577
+ const chains = this.safeList(currency, 'network_list', []);
578
+ for (let j = 0; j < chains.length; j++) {
579
+ const chain = chains[j];
580
+ const networkId = this.safeString(chain, 'network_id');
581
+ const network = this.networkIdToCode(networkId);
582
+ networks[network] = {
583
+ 'info': chain,
584
+ 'id': networkId,
585
+ 'network': network,
586
+ 'active': undefined,
587
+ 'deposit': this.safeBool(chain, 'deposit_enabled', false),
588
+ 'withdraw': this.safeBool(chain, 'withdraw_enabled', false),
589
+ 'fee': this.safeNumber(chain, 'withdrawal_fee'),
590
+ 'precision': undefined,
591
+ 'limits': {
592
+ 'withdraw': {
593
+ 'min': this.safeNumber(chain, 'min_withdrawal_amount'),
594
+ 'max': undefined,
595
+ },
596
+ },
597
+ };
598
+ }
599
+ result[code] = this.safeCurrencyStructure({
600
+ 'info': currency,
601
+ 'id': id,
602
+ 'code': code,
603
+ 'name': this.safeString(currency, 'full_name'),
604
+ 'active': undefined,
605
+ 'deposit': undefined,
606
+ 'withdraw': undefined,
607
+ 'fee': undefined,
608
+ 'precision': undefined,
609
+ 'limits': {
610
+ 'amount': {
611
+ 'min': undefined,
612
+ 'max': undefined,
613
+ },
614
+ },
615
+ 'type': 'crypto',
616
+ 'networks': networks,
617
+ });
618
+ }
619
+ return result;
620
+ }
511
621
  /**
512
622
  * @method
513
623
  * @name cryptocom#fetchMarkets
@@ -365,41 +365,9 @@ class cryptomus extends cryptomus$1 {
365
365
  const coins = this.safeList(response, 'result');
366
366
  const result = {};
367
367
  for (let i = 0; i < coins.length; i++) {
368
- const currency = coins[i];
369
- const currencyId = this.safeString(currency, 'currency_code');
368
+ const networkEntry = coins[i];
369
+ const currencyId = this.safeString(networkEntry, 'currency_code');
370
370
  const code = this.safeCurrencyCode(currencyId);
371
- const allowWithdraw = this.safeBool(currency, 'can_withdraw');
372
- const allowDeposit = this.safeBool(currency, 'can_deposit');
373
- const isActive = allowWithdraw && allowDeposit;
374
- const networkId = this.safeString(currency, 'network_code');
375
- const networksById = this.safeDict(this.options, 'networksById');
376
- const networkName = this.safeString(networksById, networkId, networkId);
377
- const minWithdraw = this.safeNumber(currency, 'min_withdraw');
378
- const maxWithdraw = this.safeNumber(currency, 'max_withdraw');
379
- const minDeposit = this.safeNumber(currency, 'min_deposit');
380
- const maxDeposit = this.safeNumber(currency, 'max_deposit');
381
- const network = {
382
- 'id': networkId,
383
- 'network': networkName,
384
- 'limits': {
385
- 'withdraw': {
386
- 'min': minWithdraw,
387
- 'max': maxWithdraw,
388
- },
389
- 'deposit': {
390
- 'min': minDeposit,
391
- 'max': maxDeposit,
392
- },
393
- },
394
- 'active': isActive,
395
- 'deposit': allowDeposit,
396
- 'withdraw': allowWithdraw,
397
- 'fee': undefined,
398
- 'precision': undefined,
399
- 'info': currency,
400
- };
401
- const networks = {};
402
- networks[networkName] = network;
403
371
  if (!(code in result)) {
404
372
  result[code] = {
405
373
  'id': currencyId,
@@ -407,70 +375,56 @@ class cryptomus extends cryptomus$1 {
407
375
  'precision': undefined,
408
376
  'type': undefined,
409
377
  'name': undefined,
410
- 'active': isActive,
411
- 'deposit': allowDeposit,
412
- 'withdraw': allowWithdraw,
378
+ 'active': undefined,
379
+ 'deposit': undefined,
380
+ 'withdraw': undefined,
413
381
  'fee': undefined,
414
382
  'limits': {
415
383
  'withdraw': {
416
- 'min': minWithdraw,
417
- 'max': maxWithdraw,
384
+ 'min': undefined,
385
+ 'max': undefined,
418
386
  },
419
387
  'deposit': {
420
- 'min': minDeposit,
421
- 'max': maxDeposit,
388
+ 'min': undefined,
389
+ 'max': undefined,
422
390
  },
423
391
  },
424
- 'networks': networks,
425
- 'info': currency,
392
+ 'networks': {},
393
+ 'info': {},
426
394
  };
427
395
  }
428
- else {
429
- const parsed = result[code];
430
- const parsedNetworks = this.safeDict(parsed, 'networks');
431
- parsed['networks'] = this.extend(parsedNetworks, networks);
432
- if (isActive) {
433
- parsed['active'] = true;
434
- parsed['deposit'] = true;
435
- parsed['withdraw'] = true;
436
- }
437
- else {
438
- if (allowWithdraw) {
439
- parsed['withdraw'] = true;
440
- }
441
- if (allowDeposit) {
442
- parsed['deposit'] = true;
443
- }
444
- }
445
- const parsedLimits = this.safeDict(parsed, 'limits');
446
- const withdrawLimits = {
447
- 'min': undefined,
448
- 'max': undefined,
449
- };
450
- const parsedWithdrawLimits = this.safeDict(parsedLimits, 'withdraw', withdrawLimits);
451
- const depositLimits = {
452
- 'min': undefined,
453
- 'max': undefined,
454
- };
455
- const parsedDepositLimits = this.safeDict(parsedLimits, 'deposit', depositLimits);
456
- if (minWithdraw) {
457
- withdrawLimits['min'] = parsedWithdrawLimits['min'] ? Math.min(parsedWithdrawLimits['min'], minWithdraw) : minWithdraw;
458
- }
459
- if (maxWithdraw) {
460
- withdrawLimits['max'] = parsedWithdrawLimits['max'] ? Math.max(parsedWithdrawLimits['max'], maxWithdraw) : maxWithdraw;
461
- }
462
- if (minDeposit) {
463
- depositLimits['min'] = parsedDepositLimits['min'] ? Math.min(parsedDepositLimits['min'], minDeposit) : minDeposit;
464
- }
465
- if (maxDeposit) {
466
- depositLimits['max'] = parsedDepositLimits['max'] ? Math.max(parsedDepositLimits['max'], maxDeposit) : maxDeposit;
467
- }
468
- const limits = {
469
- 'withdraw': withdrawLimits,
470
- 'deposit': depositLimits,
471
- };
472
- parsed['limits'] = limits;
473
- }
396
+ const networkId = this.safeString(networkEntry, 'network_code');
397
+ const networkCode = this.networkIdToCode(networkId);
398
+ result[code]['networks'][networkCode] = {
399
+ 'id': networkId,
400
+ 'network': networkCode,
401
+ 'limits': {
402
+ 'withdraw': {
403
+ 'min': this.safeNumber(networkEntry, 'min_withdraw'),
404
+ 'max': this.safeNumber(networkEntry, 'max_withdraw'),
405
+ },
406
+ 'deposit': {
407
+ 'min': this.safeNumber(networkEntry, 'min_deposit'),
408
+ 'max': this.safeNumber(networkEntry, 'max_deposit'),
409
+ },
410
+ },
411
+ 'active': undefined,
412
+ 'deposit': this.safeBool(networkEntry, 'can_withdraw'),
413
+ 'withdraw': this.safeBool(networkEntry, 'can_deposit'),
414
+ 'fee': undefined,
415
+ 'precision': undefined,
416
+ 'info': networkEntry,
417
+ };
418
+ // add entry in info
419
+ const info = this.safeList(result[code], 'info', []);
420
+ info.push(networkEntry);
421
+ result[code]['info'] = info;
422
+ }
423
+ // only after all entries are formed in currencies, restructure each entry
424
+ const allKeys = Object.keys(result);
425
+ for (let i = 0; i < allKeys.length; i++) {
426
+ const code = allKeys[i];
427
+ result[code] = this.safeCurrencyStructure(result[code]); // this is needed after adding network entry
474
428
  }
475
429
  return result;
476
430
  }
@@ -506,31 +506,49 @@ class delta extends delta$1 {
506
506
  async fetchCurrencies(params = {}) {
507
507
  const response = await this.publicGetAssets(params);
508
508
  //
509
- // {
510
- // "result":[
511
- // {
512
- // "base_withdrawal_fee":"0.0005",
513
- // "deposit_status":"enabled",
514
- // "id":2,
515
- // "interest_credit":true,
516
- // "interest_slabs":[
517
- // {"limit":"0.1","rate":"0"},
518
- // {"limit":"1","rate":"0.05"},
519
- // {"limit":"5","rate":"0.075"},
520
- // {"limit":"10","rate":"0.1"},
521
- // {"limit":"9999999999999999","rate":"0"}
522
- // ],
523
- // "kyc_deposit_limit":"10",
524
- // "kyc_withdrawal_limit":"2",
525
- // "min_withdrawal_amount":"0.001",
526
- // "minimum_precision":4,
527
- // "name":"Bitcoin",
528
- // "precision":8,
529
- // "sort_priority":1,
530
- // "symbol":"BTC",
531
- // "variable_withdrawal_fee":"0",
532
- // "withdrawal_status":"enabled"
533
- // },
509
+ // {
510
+ // "result": [
511
+ // {
512
+ // "base_withdrawal_fee": "0.005000000000000000",
513
+ // "id": "1",
514
+ // "interest_credit": false,
515
+ // "interest_slabs": null,
516
+ // "kyc_deposit_limit": "0.000000000000000000",
517
+ // "kyc_withdrawal_limit": "0.000000000000000000",
518
+ // "min_withdrawal_amount": "0.010000000000000000",
519
+ // "minimum_precision": "4",
520
+ // "name": "Ethereum",
521
+ // "networks": [
522
+ // {
523
+ // "allowed_deposit_groups": null,
524
+ // "base_withdrawal_fee": "0.0025",
525
+ // "deposit_status": "enabled",
526
+ // "memo_required": false,
527
+ // "min_deposit_amount": "0.000050000000000000",
528
+ // "min_withdrawal_amount": "0.010000000000000000",
529
+ // "minimum_deposit_confirmations": "12",
530
+ // "network": "ERC20",
531
+ // "variable_withdrawal_fee": "0",
532
+ // "withdrawal_status": "enabled"
533
+ // },
534
+ // {
535
+ // "allowed_deposit_groups": null,
536
+ // "base_withdrawal_fee": "0.0001",
537
+ // "deposit_status": "enabled",
538
+ // "memo_required": false,
539
+ // "min_deposit_amount": "0.000050000000000000",
540
+ // "min_withdrawal_amount": "0.000300000000000000",
541
+ // "minimum_deposit_confirmations": "15",
542
+ // "network": "BEP20(BSC)",
543
+ // "variable_withdrawal_fee": "0",
544
+ // "withdrawal_status": "enabled"
545
+ // }
546
+ // ],
547
+ // "precision": "18",
548
+ // "sort_priority": "3",
549
+ // "symbol": "ETH",
550
+ // "variable_withdrawal_fee": "0.000000000000000000"
551
+ // },
534
552
  // ],
535
553
  // "success":true
536
554
  // }
@@ -542,20 +560,42 @@ class delta extends delta$1 {
542
560
  const id = this.safeString(currency, 'symbol');
543
561
  const numericId = this.safeInteger(currency, 'id');
544
562
  const code = this.safeCurrencyCode(id);
545
- const depositStatus = this.safeString(currency, 'deposit_status');
546
- const withdrawalStatus = this.safeString(currency, 'withdrawal_status');
547
- const depositsEnabled = (depositStatus === 'enabled');
548
- const withdrawalsEnabled = (withdrawalStatus === 'enabled');
549
- const active = depositsEnabled && withdrawalsEnabled;
550
- result[code] = {
563
+ const chains = this.safeList(currency, 'networks', []);
564
+ const networks = {};
565
+ for (let j = 0; j < chains.length; j++) {
566
+ const chain = chains[j];
567
+ const networkId = this.safeString(chain, 'network');
568
+ const networkCode = this.networkIdToCode(networkId);
569
+ networks[networkCode] = {
570
+ 'id': networkId,
571
+ 'network': networkCode,
572
+ 'name': this.safeString(chain, 'name'),
573
+ 'info': chain,
574
+ 'active': this.safeString(chain, 'status') === 'enabled',
575
+ 'deposit': this.safeString(chain, 'deposit_status') === 'enabled',
576
+ 'withdraw': this.safeString(chain, 'withdrawal_status') === 'enabled',
577
+ 'fee': this.safeNumber(chain, 'base_withdrawal_fee'),
578
+ 'limits': {
579
+ 'deposit': {
580
+ 'min': this.safeNumber(chain, 'min_deposit_amount'),
581
+ 'max': undefined,
582
+ },
583
+ 'withdraw': {
584
+ 'min': this.safeNumber(chain, 'min_withdrawal_amount'),
585
+ 'max': undefined,
586
+ },
587
+ },
588
+ };
589
+ }
590
+ result[code] = this.safeCurrencyStructure({
551
591
  'id': id,
552
592
  'numericId': numericId,
553
593
  'code': code,
554
594
  'name': this.safeString(currency, 'name'),
555
595
  'info': currency,
556
- 'active': active,
557
- 'deposit': depositsEnabled,
558
- 'withdraw': withdrawalsEnabled,
596
+ 'active': undefined,
597
+ 'deposit': this.safeString(currency, 'deposit_status') === 'enabled',
598
+ 'withdraw': this.safeString(currency, 'withdrawal_status') === 'enabled',
559
599
  'fee': this.safeNumber(currency, 'base_withdrawal_fee'),
560
600
  'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision'))),
561
601
  'limits': {
@@ -565,9 +605,9 @@ class delta extends delta$1 {
565
605
  'max': undefined,
566
606
  },
567
607
  },
568
- 'networks': {},
608
+ 'networks': networks,
569
609
  'type': 'crypto',
570
- };
610
+ });
571
611
  }
572
612
  return result;
573
613
  }
@@ -452,14 +452,50 @@ class derive extends derive$1 {
452
452
  const result = {};
453
453
  const tokenResponse = await this.publicGetGetAllCurrencies(params);
454
454
  //
455
- // {
456
- // "result": [
457
- // {
458
- // "currency": "USDC",
459
- // "spot_price": "1.000066413299999872",
460
- // "spot_price_24h": "1.000327785299999872"
461
- // }
462
- // ],
455
+ // {
456
+ // "result": [
457
+ // {
458
+ // "currency": "SEI",
459
+ // "instrument_types": [
460
+ // "perp"
461
+ // ],
462
+ // "protocol_asset_addresses": {
463
+ // "perp": "0x7225889B75fd34C68eA3098dAE04D50553C09840",
464
+ // "option": null,
465
+ // "spot": null,
466
+ // "underlying_erc20": null
467
+ // },
468
+ // "managers": [
469
+ // {
470
+ // "address": "0x28c9ddF9A3B29c2E6a561c1BC520954e5A33de5D",
471
+ // "margin_type": "SM",
472
+ // "currency": null
473
+ // }
474
+ // ],
475
+ // "srm_im_discount": "0",
476
+ // "srm_mm_discount": "0",
477
+ // "pm2_collateral_discounts": [],
478
+ // "borrow_apy": "0",
479
+ // "supply_apy": "0",
480
+ // "total_borrow": "0",
481
+ // "total_supply": "0",
482
+ // "asset_cap_and_supply_per_manager": {
483
+ // "perp": {
484
+ // "SM": [
485
+ // {
486
+ // "current_open_interest": "0",
487
+ // "interest_cap": "2000000",
488
+ // "manager_currency": null
489
+ // }
490
+ // ]
491
+ // },
492
+ // "option": {},
493
+ // "erc20": {}
494
+ // },
495
+ // "market_type": "SRM_PERP_ONLY",
496
+ // "spot_price": "0.2193542905042081",
497
+ // "spot_price_24h": "0.238381655533635830"
498
+ // },
463
499
  // "id": "7e07fe1d-0ab4-4d2b-9e22-b65ce9e232dc"
464
500
  // }
465
501
  //
@@ -468,7 +504,7 @@ class derive extends derive$1 {
468
504
  const currency = currencies[i];
469
505
  const currencyId = this.safeString(currency, 'currency');
470
506
  const code = this.safeCurrencyCode(currencyId);
471
- result[code] = {
507
+ result[code] = this.safeCurrencyStructure({
472
508
  'id': currencyId,
473
509
  'name': undefined,
474
510
  'code': code,
@@ -489,7 +525,7 @@ class derive extends derive$1 {
489
525
  },
490
526
  },
491
527
  'info': currency,
492
- };
528
+ });
493
529
  }
494
530
  return result;
495
531
  }