ccxt 4.3.94 → 4.3.95

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/js/src/mexc.js CHANGED
@@ -451,164 +451,82 @@ export default class mexc extends Exchange {
451
451
  'LTC': 'LTC',
452
452
  },
453
453
  'networks': {
454
- 'ABBC': 'ABBC',
454
+ 'TRC20': 'TRX',
455
+ 'TON': 'TONCOIN',
456
+ 'AVAXC': 'AVAX_CCHAIN',
457
+ 'ERC20': 'ETH',
455
458
  'ACA': 'ACALA',
456
- 'ADA': 'Cardano(ADA)',
457
- 'AE': 'AE',
458
- 'ALGO': 'Algorand(ALGO)',
459
- 'ALPH': 'Alephium(ALPH)',
460
- 'AME': 'AME',
461
- 'AOK': 'AOK',
462
- 'APT': 'APTOS(APT)',
463
- 'AR': 'AR',
464
- 'ARB': 'Arbitrum One(ARB)',
465
- 'ARBNOVA': 'ARBNOVA',
466
- 'ARBONE': 'ArbitrumOne(ARB)',
467
- 'ARK': 'ARK',
459
+ // 'ADA': 'Cardano(ADA)',
460
+ // 'AE': 'AE',
461
+ // 'ALGO': 'Algorand(ALGO)',
462
+ // 'ALPH': 'Alephium(ALPH)',
463
+ // 'ARB': 'Arbitrum One(ARB)',
464
+ // 'ARBONE': 'ArbitrumOne(ARB)',
468
465
  'ASTR': 'ASTAR',
469
- 'ATOM': 'Cosmos(ATOM)',
470
- 'AVAXC': 'Avalanche C Chain(AVAX CCHAIN)',
471
- 'AVAXX': 'Avalanche X Chain(AVAX XCHAIN)',
472
- 'AZERO': 'Aleph Zero(AZERO)',
473
- 'BCH': 'Bitcoin Cash(BCH)',
474
- 'BDX': 'BDX',
475
- 'BEAM': 'BEAM',
476
- 'BEP2': 'BNB Beacon Chain(BEP2)',
477
- 'BEP20': 'BNB Smart Chain(BEP20)',
478
- 'BITCI': 'BITCI',
479
- 'BNC': 'BNC',
480
- 'BNCDOT': 'BNCPOLKA',
481
- 'BOBA': 'BOBA',
482
- 'BSC': 'BEP20(BSC)',
483
- 'BSV': 'Bitcoin SV(BSV)',
484
- 'BTC': 'Bitcoin(BTC)',
466
+ // 'ATOM': 'Cosmos(ATOM)',
467
+ // 'AVAXC': 'Avalanche C Chain(AVAX CCHAIN)',
468
+ // 'AVAXX': 'Avalanche X Chain(AVAX XCHAIN)',
469
+ // 'AZERO': 'Aleph Zero(AZERO)',
470
+ // 'BCH': 'Bitcoin Cash(BCH)',
471
+ // 'BNCDOT': 'BNCPOLKA',
472
+ // 'BSV': 'Bitcoin SV(BSV)',
473
+ // 'BTC': 'Bitcoin(BTC)',
485
474
  'BTM': 'BTM2',
486
- 'CELO': 'CELO',
487
- 'CFX': 'CFX',
488
- 'CHZ': 'Chiliz Legacy Chain(CHZ)',
489
- 'CHZ2': 'Chiliz Chain(CHZ2)',
490
- 'CKB': 'CKB',
491
- 'CLORE': 'Clore.ai(CLORE)',
475
+ // 'CHZ': 'Chiliz Legacy Chain(CHZ)',
476
+ // 'CHZ2': 'Chiliz Chain(CHZ2)',
477
+ // 'CLORE': 'Clore.ai(CLORE)',
492
478
  'CRC20': 'CRONOS',
493
- 'CSPR': 'CSPR',
494
- 'DASH': 'DASH',
495
- 'DC': 'Dogechain(DC)',
496
- 'DCR': 'DCR',
497
- 'DNX': 'Dynex(DNX)',
498
- 'DOGE': 'Dogecoin(DOGE)',
499
- 'DOT': 'Polkadot(DOT)',
500
- 'DYM': 'Dymension(DYM)',
501
- 'EDG': 'EDG',
502
- 'EGLD': 'EGLD',
503
- 'EOS': 'EOS',
504
- 'ERC20': 'Ethereum(ERC20)',
505
- 'ETC': 'Ethereum Classic(ETC)',
479
+ // 'DC': 'Dogechain(DC)',
480
+ // 'DNX': 'Dynex(DNX)',
481
+ // 'DOGE': 'Dogecoin(DOGE)',
482
+ // 'DOT': 'Polkadot(DOT)',
483
+ // 'DYM': 'Dymension(DYM)',
506
484
  'ETHF': 'ETF',
507
- 'ETHW': 'ETHW',
508
- 'EVER': 'EVER',
509
- 'FET': 'FET',
510
- 'FIL': 'FIL',
511
- 'FIO': 'FIO',
512
- 'FLOW': 'FLOW',
513
- 'FSN': 'FSN',
514
- 'FTM': 'Fantom(FTM)',
515
- 'FUSE': 'FUSE',
516
- 'GLMR': 'GLMR',
517
- 'GRIN': 'GRIN',
518
- 'HBAR': 'Hedera(HBAR)',
519
- 'HIVE': 'HIVE',
520
485
  'HRC20': 'HECO',
521
- 'HYDRA': 'HYDRA',
522
- 'ICP': 'Internet Computer(ICP)',
523
- 'INDEX': 'Index Chain',
524
- 'IOST': 'IOST',
525
- 'IOTA': 'IOTA',
526
- 'IOTX': 'IOTX',
527
- 'IRIS': 'IRIS',
528
- 'KAR': 'KAR',
529
- 'KAS': 'Kaspa(KAS)',
530
- 'KAVA': 'KAVA',
531
- 'KDA': 'KDA',
532
- 'KILT': 'KILT',
533
- 'KLAY': 'Klaytn(KLAY)',
534
- 'KMA': 'KMA',
535
- 'KSM': 'KSM',
536
- 'LAT': 'LAT',
537
- 'LAVA': 'Elysium(LAVA)',
538
- 'LTC': 'Litecoin(LTC)',
539
- 'LUNA': 'Terra(LUNA)',
540
- 'MASS': 'MASS',
541
- 'MATIC': 'Polygon(MATIC)',
542
- 'MCOIN': 'Mcoin Network',
543
- 'METIS': 'METIS',
544
- 'MINA': 'MINA',
545
- 'MNT': 'Mantle(MNT)',
546
- 'MOVR': 'MOVR',
547
- 'MTRG': 'Meter(MTRG)',
548
- 'NAS': 'NAS',
549
- 'NEAR': 'NEAR Protocol(NEAR)',
550
- 'NEBL': 'NEBL',
551
- 'NEM': 'NEM',
552
- 'NEO': 'NEO',
553
- 'NEO3': 'NEO3',
554
- 'NEOXA': 'Neoxa Network',
555
- 'NULS': 'NULS',
486
+ // 'KLAY': 'Klaytn(KLAY)',
556
487
  'OASIS': 'ROSE',
557
- 'OASYS': 'OASYS',
558
488
  'OKC': 'OKT',
559
- 'OMN': 'Omega Network(OMN)',
560
- 'OMNI': 'OMNI',
561
- 'ONE': 'ONE',
562
- 'ONT': 'ONT',
563
- 'OPTIMISM': 'Optimism(OP)',
564
- 'OSMO': 'OSMO',
565
- 'PLCU': 'PLCU',
566
- 'POKT': 'POKT',
567
- 'QKC': 'QKC',
568
- 'QTUM': 'QTUM',
569
- 'RAP20': 'RAP20' + ' ' + '(Rangers Mainnet)',
570
- 'REI': 'REI',
571
489
  'RSK': 'RBTC',
572
- 'RVN': 'Ravencoin(RVN)',
573
- 'SATOX': 'Satoxcoin(SATOX)',
574
- 'SC': 'SC',
575
- 'SCRT': 'SCRT',
576
- 'SDN': 'SDN',
577
- 'SGB': 'SGB',
578
- 'SOL': 'Solana(SOL)',
579
- 'STAR': 'STAR',
580
- 'STARK': 'Starknet(STARK)',
581
- 'STEEM': 'STEEM',
582
- 'SYS': 'SYS',
583
- 'TAO': 'Bittensor(TAO)',
584
- 'TIA': 'Celestia(TIA)',
585
- 'TOMO': 'TOMO',
586
- 'TON': 'Toncoin(TON)',
587
- 'TRC10': 'TRC10',
588
- 'TRC20': 'Tron(TRC20)',
589
- 'UGAS': 'UGAS(Ultrain)',
590
- 'VET': 'VeChain(VET)',
591
- 'VEX': 'Vexanium(VEX)',
592
- 'VSYS': 'VSYS',
593
- 'WAVES': 'WAVES',
594
- 'WAX': 'WAX',
595
- 'WEMIX': 'WEMIX',
596
- 'XCH': 'Chia(XCH)',
597
- 'XDC': 'XDC',
598
- 'XEC': 'XEC',
599
- 'XLM': 'Stellar(XLM)',
600
- 'XMR': 'Monero(XMR)',
601
- 'XNA': 'Neurai(XNA)',
602
- 'XPR': 'XPR Network',
603
- 'XRD': 'XRD',
604
- 'XRP': 'Ripple(XRP)',
605
- 'XTZ': 'XTZ',
606
- 'XVG': 'XVG',
607
- 'XYM': 'XYM',
608
- 'ZEC': 'ZEC',
609
- 'ZEN': 'ZEN',
610
- 'ZIL': 'Zilliqa(ZIL)',
611
- 'ZTG': 'ZTG',
490
+ // 'RVN': 'Ravencoin(RVN)',
491
+ // 'SATOX': 'Satoxcoin(SATOX)',
492
+ // 'SC': 'SC',
493
+ // 'SCRT': 'SCRT',
494
+ // 'SDN': 'SDN',
495
+ // 'SGB': 'SGB',
496
+ // 'SOL': 'Solana(SOL)',
497
+ // 'STAR': 'STAR',
498
+ // 'STARK': 'Starknet(STARK)',
499
+ // 'STEEM': 'STEEM',
500
+ // 'SYS': 'SYS',
501
+ // 'TAO': 'Bittensor(TAO)',
502
+ // 'TIA': 'Celestia(TIA)',
503
+ // 'TOMO': 'TOMO',
504
+ // 'TON': 'Toncoin(TON)',
505
+ // 'TRC10': 'TRC10',
506
+ // 'TRC20': 'Tron(TRC20)',
507
+ // 'UGAS': 'UGAS(Ultrain)',
508
+ // 'VET': 'VeChain(VET)',
509
+ // 'VEX': 'Vexanium(VEX)',
510
+ // 'VSYS': 'VSYS',
511
+ // 'WAVES': 'WAVES',
512
+ // 'WAX': 'WAX',
513
+ // 'WEMIX': 'WEMIX',
514
+ // 'XCH': 'Chia(XCH)',
515
+ // 'XDC': 'XDC',
516
+ // 'XEC': 'XEC',
517
+ // 'XLM': 'Stellar(XLM)',
518
+ // 'XMR': 'Monero(XMR)',
519
+ // 'XNA': 'Neurai(XNA)',
520
+ // 'XPR': 'XPR Network',
521
+ // 'XRD': 'XRD',
522
+ // 'XRP': 'Ripple(XRP)',
523
+ // 'XTZ': 'XTZ',
524
+ // 'XVG': 'XVG',
525
+ // 'XYM': 'XYM',
526
+ // 'ZEC': 'ZEC',
527
+ // 'ZEN': 'ZEN',
528
+ // 'ZIL': 'Zilliqa(ZIL)',
529
+ // 'ZTG': 'ZTG',
612
530
  // todo: uncomment below after concensus
613
531
  // 'ALAYA': 'ATP',
614
532
  // 'ANDUSCHAIN': 'DEB',
@@ -1011,7 +929,7 @@ export default class mexc extends Exchange {
1011
929
  const chains = this.safeValue(currency, 'networkList', []);
1012
930
  for (let j = 0; j < chains.length; j++) {
1013
931
  const chain = chains[j];
1014
- const networkId = this.safeString2(chain, 'network', 'netWork');
932
+ const networkId = this.safeString2(chain, 'netWork', 'network');
1015
933
  const network = this.networkIdToCode(networkId);
1016
934
  const isDepositEnabled = this.safeBool(chain, 'depositEnable', false);
1017
935
  const isWithdrawEnabled = this.safeBool(chain, 'withdrawEnable', false);
@@ -4394,7 +4312,7 @@ export default class mexc extends Exchange {
4394
4312
  //
4395
4313
  const address = this.safeString(depositAddress, 'address');
4396
4314
  const currencyId = this.safeString(depositAddress, 'coin');
4397
- const networkId = this.safeString(depositAddress, 'network');
4315
+ const networkId = this.safeString(depositAddress, 'netWork');
4398
4316
  this.checkAddress(address);
4399
4317
  return {
4400
4318
  'currency': this.safeCurrencyCode(currencyId, currency),
@@ -5175,14 +5093,14 @@ export default class mexc extends Exchange {
5175
5093
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5176
5094
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5177
5095
  */
5096
+ await this.loadMarkets();
5097
+ const currency = this.currency(code);
5178
5098
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
5179
5099
  const networks = this.safeDict(this.options, 'networks', {});
5180
5100
  let network = this.safeString2(params, 'network', 'netWork'); // this line allows the user to specify either ERC20 or ETH
5181
5101
  network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
5182
- network = this.networkIdToCode(network);
5102
+ network = this.networkCodeToId(network, currency['code']);
5183
5103
  this.checkAddress(address);
5184
- await this.loadMarkets();
5185
- const currency = this.currency(code);
5186
5104
  const request = {
5187
5105
  'coin': currency['id'],
5188
5106
  'address': address,
package/js/src/okx.js CHANGED
@@ -327,6 +327,7 @@ export default class okx extends Exchange {
327
327
  'account/account-position-risk': 2,
328
328
  'account/bills': 5 / 3,
329
329
  'account/bills-archive': 5 / 3,
330
+ 'account/bills-history-archive': 2,
330
331
  'account/config': 4,
331
332
  'account/max-size': 1,
332
333
  'account/max-avail-size': 1,
@@ -481,6 +482,7 @@ export default class okx extends Exchange {
481
482
  'account/fixed-loan/amend-borrowing-order': 5,
482
483
  'account/fixed-loan/manual-reborrow': 5,
483
484
  'account/fixed-loan/repay-borrowing-order': 5,
485
+ 'account/bills-history-archive': 72000,
484
486
  // subaccount
485
487
  'users/subaccount/modify-apikey': 10,
486
488
  'asset/subaccount/transfer': 10,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.94",
3
+ "version": "4.3.95",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",