ccxt 4.4.85 → 4.4.86

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 (60) hide show
  1. package/README.md +6 -7
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +6 -9
  4. package/dist/cjs/src/abstract/bittrade.js +9 -0
  5. package/dist/cjs/src/ascendex.js +189 -155
  6. package/dist/cjs/src/bequant.js +1 -1
  7. package/dist/cjs/src/bitget.js +5 -4
  8. package/dist/cjs/src/bitmart.js +1 -1
  9. package/dist/cjs/src/bittrade.js +2049 -0
  10. package/dist/cjs/src/coinbase.js +2 -6
  11. package/dist/cjs/src/deribit.js +4 -5
  12. package/dist/cjs/src/hollaex.js +107 -49
  13. package/dist/cjs/src/htx.js +20 -44
  14. package/dist/cjs/src/hyperliquid.js +4 -4
  15. package/dist/cjs/src/mexc.js +2 -2
  16. package/dist/cjs/src/ndax.js +25 -24
  17. package/dist/cjs/src/okcoin.js +12 -31
  18. package/dist/cjs/src/okx.js +9 -0
  19. package/dist/cjs/src/onetrading.js +9 -6
  20. package/dist/cjs/src/oxfun.js +42 -114
  21. package/dist/cjs/src/paradex.js +5 -1
  22. package/dist/cjs/src/pro/binance.js +1 -0
  23. package/dist/cjs/src/pro/bittrade.js +605 -0
  24. package/dist/cjs/src/pro/luno.js +6 -5
  25. package/dist/cjs/src/pro/mexc.js +3 -0
  26. package/js/ccxt.d.ts +8 -11
  27. package/js/ccxt.js +6 -8
  28. package/js/src/abstract/myokx.d.ts +2 -0
  29. package/js/src/abstract/okx.d.ts +2 -0
  30. package/js/src/ascendex.d.ts +2 -0
  31. package/js/src/ascendex.js +189 -155
  32. package/js/src/bequant.js +1 -1
  33. package/js/src/bitget.js +5 -4
  34. package/js/src/bitmart.js +1 -1
  35. package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
  36. package/js/src/{huobijp.js → bittrade.js} +35 -35
  37. package/js/src/coinbase.js +2 -6
  38. package/js/src/deribit.js +4 -5
  39. package/js/src/hollaex.js +107 -49
  40. package/js/src/htx.js +20 -44
  41. package/js/src/hyperliquid.js +4 -4
  42. package/js/src/mexc.js +2 -2
  43. package/js/src/ndax.js +25 -24
  44. package/js/src/okcoin.js +12 -31
  45. package/js/src/okx.js +9 -0
  46. package/js/src/onetrading.js +9 -6
  47. package/js/src/oxfun.js +42 -114
  48. package/js/src/paradex.js +5 -1
  49. package/js/src/pro/binance.js +1 -0
  50. package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
  51. package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
  52. package/js/src/pro/luno.js +6 -5
  53. package/js/src/pro/mexc.js +3 -0
  54. package/package.json +1 -1
  55. package/js/src/abstract/kuna.d.ts +0 -185
  56. package/js/src/abstract/kuna.js +0 -11
  57. package/js/src/kuna.d.ts +0 -335
  58. package/js/src/kuna.js +0 -2006
  59. /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
  60. /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
package/dist/cjs/ccxt.js CHANGED
@@ -36,6 +36,7 @@ var bitrue = require('./src/bitrue.js');
36
36
  var bitso = require('./src/bitso.js');
37
37
  var bitstamp = require('./src/bitstamp.js');
38
38
  var bitteam = require('./src/bitteam.js');
39
+ var bittrade = require('./src/bittrade.js');
39
40
  var bitvavo = require('./src/bitvavo.js');
40
41
  var blockchaincom = require('./src/blockchaincom.js');
41
42
  var blofin = require('./src/blofin.js');
@@ -76,7 +77,6 @@ var hitbtc = require('./src/hitbtc.js');
76
77
  var hollaex = require('./src/hollaex.js');
77
78
  var htx = require('./src/htx.js');
78
79
  var huobi = require('./src/huobi.js');
79
- var huobijp = require('./src/huobijp.js');
80
80
  var hyperliquid = require('./src/hyperliquid.js');
81
81
  var independentreserve = require('./src/independentreserve.js');
82
82
  var indodax = require('./src/indodax.js');
@@ -84,7 +84,6 @@ var kraken = require('./src/kraken.js');
84
84
  var krakenfutures = require('./src/krakenfutures.js');
85
85
  var kucoin = require('./src/kucoin.js');
86
86
  var kucoinfutures = require('./src/kucoinfutures.js');
87
- var kuna = require('./src/kuna.js');
88
87
  var latoken = require('./src/latoken.js');
89
88
  var lbank = require('./src/lbank.js');
90
89
  var luno = require('./src/luno.js');
@@ -134,6 +133,7 @@ var bitmex$1 = require('./src/pro/bitmex.js');
134
133
  var bitopro$1 = require('./src/pro/bitopro.js');
135
134
  var bitrue$1 = require('./src/pro/bitrue.js');
136
135
  var bitstamp$1 = require('./src/pro/bitstamp.js');
136
+ var bittrade$1 = require('./src/pro/bittrade.js');
137
137
  var bitvavo$1 = require('./src/pro/bitvavo.js');
138
138
  var blockchaincom$1 = require('./src/pro/blockchaincom.js');
139
139
  var blofin$1 = require('./src/pro/blofin.js');
@@ -160,7 +160,6 @@ var hitbtc$1 = require('./src/pro/hitbtc.js');
160
160
  var hollaex$1 = require('./src/pro/hollaex.js');
161
161
  var htx$1 = require('./src/pro/htx.js');
162
162
  var huobi$1 = require('./src/pro/huobi.js');
163
- var huobijp$1 = require('./src/pro/huobijp.js');
164
163
  var hyperliquid$1 = require('./src/pro/hyperliquid.js');
165
164
  var independentreserve$1 = require('./src/pro/independentreserve.js');
166
165
  var kraken$1 = require('./src/pro/kraken.js');
@@ -191,7 +190,7 @@ var xt$1 = require('./src/pro/xt.js');
191
190
 
192
191
  //-----------------------------------------------------------------------------
193
192
  // this is updated by vss.js when building
194
- const version = '4.4.85';
193
+ const version = '4.4.86';
195
194
  Exchange["default"].ccxtVersion = version;
196
195
  const exchanges = {
197
196
  'alpaca': alpaca,
@@ -218,6 +217,7 @@ const exchanges = {
218
217
  'bitso': bitso,
219
218
  'bitstamp': bitstamp,
220
219
  'bitteam': bitteam,
220
+ 'bittrade': bittrade,
221
221
  'bitvavo': bitvavo,
222
222
  'blockchaincom': blockchaincom,
223
223
  'blofin': blofin,
@@ -258,7 +258,6 @@ const exchanges = {
258
258
  'hollaex': hollaex,
259
259
  'htx': htx,
260
260
  'huobi': huobi,
261
- 'huobijp': huobijp,
262
261
  'hyperliquid': hyperliquid,
263
262
  'independentreserve': independentreserve,
264
263
  'indodax': indodax,
@@ -266,7 +265,6 @@ const exchanges = {
266
265
  'krakenfutures': krakenfutures,
267
266
  'kucoin': kucoin,
268
267
  'kucoinfutures': kucoinfutures,
269
- 'kuna': kuna,
270
268
  'latoken': latoken,
271
269
  'lbank': lbank,
272
270
  'luno': luno,
@@ -318,6 +316,7 @@ const pro = {
318
316
  'bitopro': bitopro$1,
319
317
  'bitrue': bitrue$1,
320
318
  'bitstamp': bitstamp$1,
319
+ 'bittrade': bittrade$1,
321
320
  'bitvavo': bitvavo$1,
322
321
  'blockchaincom': blockchaincom$1,
323
322
  'blofin': blofin$1,
@@ -344,7 +343,6 @@ const pro = {
344
343
  'hollaex': hollaex$1,
345
344
  'htx': htx$1,
346
345
  'huobi': huobi$1,
347
- 'huobijp': huobijp$1,
348
346
  'hyperliquid': hyperliquid$1,
349
347
  'independentreserve': independentreserve$1,
350
348
  'kraken': kraken$1,
@@ -447,6 +445,7 @@ exports.bitrue = bitrue;
447
445
  exports.bitso = bitso;
448
446
  exports.bitstamp = bitstamp;
449
447
  exports.bitteam = bitteam;
448
+ exports.bittrade = bittrade;
450
449
  exports.bitvavo = bitvavo;
451
450
  exports.blockchaincom = blockchaincom;
452
451
  exports.blofin = blofin;
@@ -487,7 +486,6 @@ exports.hitbtc = hitbtc;
487
486
  exports.hollaex = hollaex;
488
487
  exports.htx = htx;
489
488
  exports.huobi = huobi;
490
- exports.huobijp = huobijp;
491
489
  exports.hyperliquid = hyperliquid;
492
490
  exports.independentreserve = independentreserve;
493
491
  exports.indodax = indodax;
@@ -495,7 +493,6 @@ exports.kraken = kraken;
495
493
  exports.krakenfutures = krakenfutures;
496
494
  exports.kucoin = kucoin;
497
495
  exports.kucoinfutures = kucoinfutures;
498
- exports.kuna = kuna;
499
496
  exports.latoken = latoken;
500
497
  exports.lbank = lbank;
501
498
  exports.luno = luno;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Exchange$1 = require('../base/Exchange.js');
4
+
5
+ // ----------------------------------------------------------------------------
6
+ class Exchange extends Exchange$1["default"] {
7
+ }
8
+
9
+ module.exports = Exchange;
@@ -466,6 +466,7 @@ class ascendex extends ascendex$1 {
466
466
  'broad': {},
467
467
  },
468
468
  'commonCurrencies': {
469
+ 'XBT': 'XBT',
469
470
  'BOND': 'BONDED',
470
471
  'BTCBEAR': 'BEAR',
471
472
  'BTCBULL': 'BULL',
@@ -488,116 +489,83 @@ class ascendex extends ascendex$1 {
488
489
  * @returns {object} an associative dictionary of currencies
489
490
  */
490
491
  async fetchCurrencies(params = {}) {
491
- const assetsPromise = this.v1PublicGetAssets(params);
492
- //
493
- // {
494
- // "code":0,
495
- // "data":[
496
- // {
497
- // "assetCode" : "LTCBULL",
498
- // "assetName" : "3X Long LTC Token",
499
- // "precisionScale" : 9,
500
- // "nativeScale" : 4,
501
- // "withdrawalFee" : "0.2",
502
- // "minWithdrawalAmt" : "1.0",
503
- // "status" : "Normal"
504
- // },
505
- // ]
506
- // }
507
- //
508
- const marginPromise = this.v1PublicGetMarginAssets(params);
509
- //
510
- // {
511
- // "code":0,
512
- // "data":[
513
- // {
514
- // "assetCode":"BTT",
515
- // "displayName": "BTT",
516
- // "borrowAssetCode":"BTT-B",
517
- // "interestAssetCode":"BTT-I",
518
- // "nativeScale":0,
519
- // "numConfirmations":1,
520
- // "withdrawFee":"100.0",
521
- // "minWithdrawalAmt":"1000.0",
522
- // "statusCode":"Normal",
523
- // "statusMessage":"",
524
- // "interestRate":"0.001"
525
- // }
526
- // ]
527
- // }
528
- //
529
- const cashPromise = this.v1PublicGetCashAssets(params);
492
+ const response = await this.v2PublicGetAssets(params);
530
493
  //
531
- // {
532
- // "code":0,
533
- // "data":[
534
- // {
535
- // "assetCode":"LTCBULL",
536
- // "displayName": "LTCBULL",
537
- // "nativeScale":4,
538
- // "numConfirmations":20,
539
- // "withdrawFee":"0.2",
540
- // "minWithdrawalAmt":"1.0",
541
- // "statusCode":"Normal",
542
- // "statusMessage":"" // hideFromWalletTx
543
- // }
494
+ // {
495
+ // "code": "0",
496
+ // "data": [
497
+ // {
498
+ // "assetCode": "USDT",
499
+ // "assetName": "Tether",
500
+ // "precisionScale": 9,
501
+ // "nativeScale": 4,
502
+ // "blockChain": [
503
+ // {
504
+ // "chainName": "Solana",
505
+ // "withdrawFee": "2.0",
506
+ // "allowDeposit": true,
507
+ // "allowWithdraw": true,
508
+ // "minDepositAmt": "0.01",
509
+ // "minWithdrawal": "4.0",
510
+ // "numConfirmations": 1
511
+ // },
512
+ // ...
513
+ // ]
514
+ // },
544
515
  // ]
545
- // }
516
+ // }
546
517
  //
547
- const [assets, margin, cash] = await Promise.all([assetsPromise, marginPromise, cashPromise]);
548
- const assetsData = this.safeList(assets, 'data', []);
549
- const marginData = this.safeList(margin, 'data', []);
550
- const cashData = this.safeList(cash, 'data', []);
551
- const assetsById = this.indexBy(assetsData, 'assetCode');
552
- const marginById = this.indexBy(marginData, 'assetCode');
553
- const cashById = this.indexBy(cashData, 'assetCode');
554
- const dataById = this.deepExtend(assetsById, marginById, cashById);
555
- const ids = Object.keys(dataById);
518
+ const data = this.safeList(response, 'data', []);
556
519
  const result = {};
557
- for (let i = 0; i < ids.length; i++) {
558
- const id = this.safeString(ids, i);
559
- const currency = dataById[id];
520
+ for (let i = 0; i < data.length; i++) {
521
+ const currency = data[i];
522
+ const id = this.safeString(currency, 'assetCode');
560
523
  const code = this.safeCurrencyCode(id);
561
- const scale = this.safeString2(currency, 'precisionScale', 'nativeScale');
562
- const precision = this.parseNumber(this.parsePrecision(scale));
563
- const fee = this.safeNumber2(currency, 'withdrawFee', 'withdrawalFee');
564
- const status = this.safeString(currency, 'status');
565
- const statusCode = this.safeString(currency, 'statusCode');
566
- const active = (status === 'Normal');
567
- let depositEnabled = undefined;
568
- let withdrawEnabled = undefined;
569
- if (status === 'Delisted' || statusCode === 'hideFromWalletTx') {
570
- depositEnabled = false;
571
- withdrawEnabled = false;
572
- }
573
- else if (status === 'Normal') {
574
- depositEnabled = true;
575
- withdrawEnabled = true;
576
- }
577
- else if (status === 'NoTransaction' || statusCode === 'NoTransaction') {
578
- depositEnabled = true;
579
- withdrawEnabled = false;
580
- }
581
- else if (status === 'NoDeposit') {
582
- depositEnabled = false;
583
- withdrawEnabled = true;
524
+ const chains = this.safeList(currency, 'blockChain', []);
525
+ const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'nativeScale')));
526
+ const networks = {};
527
+ for (let j = 0; j < chains.length; j++) {
528
+ const networkEtnry = chains[j];
529
+ const networkId = this.safeString(networkEtnry, 'chainName');
530
+ const networkCode = this.networkCodeToId(networkId);
531
+ networks[networkCode] = {
532
+ 'fee': this.safeNumber(networkEtnry, 'withdrawFee'),
533
+ 'active': undefined,
534
+ 'withdraw': this.safeBool(networkEtnry, 'allowWithdraw'),
535
+ 'deposit': this.safeBool(networkEtnry, 'allowDeposit'),
536
+ 'precision': precision,
537
+ 'limits': {
538
+ 'amount': {
539
+ 'min': undefined,
540
+ 'max': undefined,
541
+ },
542
+ 'withdraw': {
543
+ 'min': this.safeNumber(networkEtnry, 'minWithdrawal'),
544
+ 'max': undefined,
545
+ },
546
+ 'deposit': {
547
+ 'min': this.safeNumber(networkEtnry, 'minDepositAmt'),
548
+ 'max': undefined,
549
+ },
550
+ },
551
+ };
584
552
  }
585
- const marginInside = ('borrowAssetCode' in currency);
586
- result[code] = {
553
+ // todo type: if (chainsLength === 0 && (assetName.endsWith (' Staking') || assetName.indexOf (' Reward ') >= 0 || assetName.indexOf ('Slot Auction') >= 0 || assetName.indexOf (' Freeze Asset') >= 0))
554
+ result[code] = this.safeCurrencyStructure({
587
555
  'id': id,
588
556
  'code': code,
589
557
  'info': currency,
590
558
  'type': undefined,
591
- 'margin': marginInside,
559
+ 'margin': undefined,
592
560
  'name': this.safeString(currency, 'assetName'),
593
- 'active': active,
594
- 'deposit': depositEnabled,
595
- 'withdraw': withdrawEnabled,
596
- 'fee': fee,
561
+ 'active': undefined,
562
+ 'deposit': undefined,
563
+ 'withdraw': undefined,
564
+ 'fee': undefined,
597
565
  'precision': precision,
598
566
  'limits': {
599
567
  'amount': {
600
- 'min': precision,
568
+ 'min': undefined,
601
569
  'max': undefined,
602
570
  },
603
571
  'withdraw': {
@@ -605,8 +573,8 @@ class ascendex extends ascendex$1 {
605
573
  'max': undefined,
606
574
  },
607
575
  },
608
- 'networks': {}, // todo
609
- };
576
+ 'networks': networks,
577
+ });
610
578
  }
611
579
  return result;
612
580
  }
@@ -618,6 +586,12 @@ class ascendex extends ascendex$1 {
618
586
  * @returns {object[]} an array of objects representing market data
619
587
  */
620
588
  async fetchMarkets(params = {}) {
589
+ const spotPromise = this.fetchSpotMarkets(params);
590
+ const contractPromise = this.fetchContractMarkets(params);
591
+ const [spotMarkets, contractMarkets] = await Promise.all([spotPromise, contractPromise]);
592
+ return this.arrayConcat(spotMarkets, contractMarkets);
593
+ }
594
+ async fetchSpotMarkets(params = {}) {
621
595
  const productsPromise = this.v1PublicGetProducts(params);
622
596
  //
623
597
  // {
@@ -669,7 +643,94 @@ class ascendex extends ascendex$1 {
669
643
  // ]
670
644
  // }
671
645
  //
672
- const perpetualsPromise = this.v2PublicGetFuturesContract(params);
646
+ const [products, cash] = await Promise.all([productsPromise, cashPromise]);
647
+ const productsData = this.safeList(products, 'data', []);
648
+ const productsById = this.indexBy(productsData, 'symbol');
649
+ const cashData = this.safeList(cash, 'data', []);
650
+ const cashAndPerpetualsById = this.indexBy(cashData, 'symbol');
651
+ const dataById = this.deepExtend(productsById, cashAndPerpetualsById);
652
+ const ids = Object.keys(dataById);
653
+ const result = [];
654
+ for (let i = 0; i < ids.length; i++) {
655
+ const id = ids[i];
656
+ if (id.indexOf('-PERP') >= 0) {
657
+ continue; // skip perpetuals, as separate endpoint returns them
658
+ }
659
+ const market = dataById[id];
660
+ const status = this.safeString(market, 'status');
661
+ const domain = this.safeString(market, 'domain');
662
+ let active = false;
663
+ if (((status === 'Normal') || (status === 'InternalTrading')) && (domain !== 'LeveragedETF')) {
664
+ active = true;
665
+ }
666
+ const minQty = this.safeNumber(market, 'minQty');
667
+ const maxQty = this.safeNumber(market, 'maxQty');
668
+ const minPrice = this.safeNumber(market, 'tickSize');
669
+ const maxPrice = undefined;
670
+ const underlying = this.safeString2(market, 'underlying', 'symbol');
671
+ const parts = underlying.split('/');
672
+ const baseId = this.safeString(parts, 0);
673
+ const quoteId = this.safeString(parts, 1);
674
+ const base = this.safeCurrencyCode(baseId);
675
+ const quote = this.safeCurrencyCode(quoteId);
676
+ const fee = this.safeNumber(market, 'commissionReserveRate');
677
+ const marginTradable = this.safeBool(market, 'marginTradable', false);
678
+ result.push({
679
+ 'id': id,
680
+ 'symbol': base + '/' + quote,
681
+ 'base': base,
682
+ 'baseId': baseId,
683
+ 'quote': quote,
684
+ 'quoteId': quoteId,
685
+ 'settle': undefined,
686
+ 'settleId': undefined,
687
+ 'type': 'spot',
688
+ 'spot': true,
689
+ 'margin': marginTradable,
690
+ 'swap': false,
691
+ 'future': false,
692
+ 'option': false,
693
+ 'active': active,
694
+ 'contract': false,
695
+ 'linear': undefined,
696
+ 'inverse': undefined,
697
+ 'taker': fee,
698
+ 'maker': fee,
699
+ 'contractSize': undefined,
700
+ 'expiry': undefined,
701
+ 'expiryDatetime': undefined,
702
+ 'strike': undefined,
703
+ 'optionType': undefined,
704
+ 'precision': {
705
+ 'amount': this.safeNumber(market, 'lotSize'),
706
+ 'price': this.safeNumber(market, 'tickSize'),
707
+ },
708
+ 'limits': {
709
+ 'leverage': {
710
+ 'min': undefined,
711
+ 'max': undefined,
712
+ },
713
+ 'amount': {
714
+ 'min': minQty,
715
+ 'max': maxQty,
716
+ },
717
+ 'price': {
718
+ 'min': minPrice,
719
+ 'max': maxPrice,
720
+ },
721
+ 'cost': {
722
+ 'min': this.safeNumber(market, 'minNotional'),
723
+ 'max': this.safeNumber(market, 'maxNotional'),
724
+ },
725
+ },
726
+ 'created': this.safeInteger(market, 'tradingStartTime'),
727
+ 'info': market,
728
+ });
729
+ }
730
+ return result;
731
+ }
732
+ async fetchContractMarkets(params = {}) {
733
+ const contracts = await this.v2PublicGetFuturesContract(params);
673
734
  //
674
735
  // {
675
736
  // "code": 0,
@@ -682,9 +743,9 @@ class ascendex extends ascendex$1 {
682
743
  // "underlying": "BTC/USDT",
683
744
  // "tradingStartTime": 1579701600000,
684
745
  // "priceFilter": {
685
- // "minPrice": "1",
746
+ // "minPrice": "0.1",
686
747
  // "maxPrice": "1000000",
687
- // "tickSize": "1"
748
+ // "tickSize": "0.1"
688
749
  // },
689
750
  // "lotSizeFilter": {
690
751
  // "minQty": "0.0001",
@@ -707,52 +768,25 @@ class ascendex extends ascendex$1 {
707
768
  // ]
708
769
  // }
709
770
  //
710
- const [products, cash, perpetuals] = await Promise.all([productsPromise, cashPromise, perpetualsPromise]);
711
- const productsData = this.safeList(products, 'data', []);
712
- const productsById = this.indexBy(productsData, 'symbol');
713
- const cashData = this.safeList(cash, 'data', []);
714
- const perpetualsData = this.safeList(perpetuals, 'data', []);
715
- const cashAndPerpetualsData = this.arrayConcat(cashData, perpetualsData);
716
- const cashAndPerpetualsById = this.indexBy(cashAndPerpetualsData, 'symbol');
717
- const dataById = this.deepExtend(productsById, cashAndPerpetualsById);
718
- const ids = Object.keys(dataById);
771
+ const data = this.safeList(contracts, 'data', []);
719
772
  const result = [];
720
- for (let i = 0; i < ids.length; i++) {
721
- const id = ids[i];
722
- const market = dataById[id];
723
- const settleId = this.safeString(market, 'settlementAsset');
724
- const settle = this.safeCurrencyCode(settleId);
725
- const status = this.safeString(market, 'status');
726
- const domain = this.safeString(market, 'domain');
727
- let active = false;
728
- if (((status === 'Normal') || (status === 'InternalTrading')) && (domain !== 'LeveragedETF')) {
729
- active = true;
730
- }
731
- const spot = settle === undefined;
732
- const swap = !spot;
733
- const linear = swap ? true : undefined;
734
- let minQty = this.safeNumber(market, 'minQty');
735
- let maxQty = this.safeNumber(market, 'maxQty');
736
- let minPrice = this.safeNumber(market, 'tickSize');
737
- let maxPrice = undefined;
738
- const underlying = this.safeString2(market, 'underlying', 'symbol');
773
+ for (let i = 0; i < data.length; i++) {
774
+ const market = data[i];
775
+ const id = this.safeString(market, 'symbol');
776
+ const underlying = this.safeString(market, 'underlying');
739
777
  const parts = underlying.split('/');
740
778
  const baseId = this.safeString(parts, 0);
741
- const quoteId = this.safeString(parts, 1);
742
779
  const base = this.safeCurrencyCode(baseId);
780
+ const quoteId = this.safeString(parts, 1);
743
781
  const quote = this.safeCurrencyCode(quoteId);
744
- let symbol = base + '/' + quote;
745
- if (swap) {
746
- const lotSizeFilter = this.safeDict(market, 'lotSizeFilter');
747
- minQty = this.safeNumber(lotSizeFilter, 'minQty');
748
- maxQty = this.safeNumber(lotSizeFilter, 'maxQty');
749
- const priceFilter = this.safeDict(market, 'priceFilter');
750
- minPrice = this.safeNumber(priceFilter, 'minPrice');
751
- maxPrice = this.safeNumber(priceFilter, 'maxPrice');
752
- symbol = base + '/' + quote + ':' + settle;
753
- }
782
+ const settleId = this.safeString(market, 'settlementAsset');
783
+ const settle = this.safeCurrencyCode(settleId);
784
+ const linear = settle === quote;
785
+ const inverse = settle === base;
786
+ const symbol = base + '/' + quote + ':' + settle;
787
+ const priceFilter = this.safeDict(market, 'priceFilter');
788
+ const lotSizeFilter = this.safeDict(market, 'lotSizeFilter');
754
789
  const fee = this.safeNumber(market, 'commissionReserveRate');
755
- const marginTradable = this.safeBool(market, 'marginTradable', false);
756
790
  result.push({
757
791
  'id': id,
758
792
  'symbol': symbol,
@@ -762,26 +796,26 @@ class ascendex extends ascendex$1 {
762
796
  'baseId': baseId,
763
797
  'quoteId': quoteId,
764
798
  'settleId': settleId,
765
- 'type': swap ? 'swap' : 'spot',
766
- 'spot': spot,
767
- 'margin': spot ? marginTradable : undefined,
768
- 'swap': swap,
799
+ 'type': 'swap',
800
+ 'spot': false,
801
+ 'margin': undefined,
802
+ 'swap': true,
769
803
  'future': false,
770
804
  'option': false,
771
- 'active': active,
772
- 'contract': swap,
805
+ 'active': this.safeString(market, 'status') === 'Normal',
806
+ 'contract': true,
773
807
  'linear': linear,
774
- 'inverse': swap ? !linear : undefined,
808
+ 'inverse': inverse,
775
809
  'taker': fee,
776
810
  'maker': fee,
777
- 'contractSize': swap ? this.parseNumber('1') : undefined,
811
+ 'contractSize': this.parseNumber('1'),
778
812
  'expiry': undefined,
779
813
  'expiryDatetime': undefined,
780
814
  'strike': undefined,
781
815
  'optionType': undefined,
782
816
  'precision': {
783
- 'amount': this.safeNumber(market, 'lotSize'),
784
- 'price': this.safeNumber(market, 'tickSize'),
817
+ 'amount': this.safeNumber(lotSizeFilter, 'lotSize'),
818
+ 'price': this.safeNumber(priceFilter, 'tickSize'),
785
819
  },
786
820
  'limits': {
787
821
  'leverage': {
@@ -789,12 +823,12 @@ class ascendex extends ascendex$1 {
789
823
  'max': undefined,
790
824
  },
791
825
  'amount': {
792
- 'min': minQty,
793
- 'max': maxQty,
826
+ 'min': this.safeNumber(lotSizeFilter, 'minQty'),
827
+ 'max': this.safeNumber(lotSizeFilter, 'maxQty'),
794
828
  },
795
829
  'price': {
796
- 'min': minPrice,
797
- 'max': maxPrice,
830
+ 'min': this.safeNumber(priceFilter, 'minPrice'),
831
+ 'max': this.safeNumber(priceFilter, 'maxPrice'),
798
832
  },
799
833
  'cost': {
800
834
  'min': this.safeNumber(market, 'minNotional'),
@@ -9,8 +9,8 @@ class bequant extends hitbtc {
9
9
  return this.deepExtend(super.describe(), {
10
10
  'id': 'bequant',
11
11
  'name': 'Bequant',
12
- 'countries': ['MT'],
13
12
  'pro': true,
13
+ 'countries': ['MT'],
14
14
  'urls': {
15
15
  'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
16
16
  'api': {
@@ -2390,7 +2390,7 @@ class bitget extends bitget$1 {
2390
2390
  'coin': currency['id'],
2391
2391
  'address': address,
2392
2392
  'chain': networkId,
2393
- 'size': amount,
2393
+ 'size': this.currencyToPrecision(code, amount, networkCode),
2394
2394
  'transferType': 'on_chain',
2395
2395
  };
2396
2396
  if (tag !== undefined) {
@@ -2415,8 +2415,6 @@ class bitget extends bitget$1 {
2415
2415
  const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
2416
2416
  if (fillResponseFromRequest) {
2417
2417
  result['currency'] = code;
2418
- result['timestamp'] = this.milliseconds();
2419
- result['datetime'] = this.iso8601(this.milliseconds());
2420
2418
  result['amount'] = amount;
2421
2419
  result['tag'] = tag;
2422
2420
  result['address'] = address;
@@ -2540,7 +2538,10 @@ class bitget extends bitget$1 {
2540
2538
  const status = this.safeString(transaction, 'status');
2541
2539
  const tag = this.safeString(transaction, 'tag');
2542
2540
  const feeCostString = this.safeString(transaction, 'fee');
2543
- const feeCostAbsString = Precise["default"].stringAbs(feeCostString);
2541
+ let feeCostAbsString = undefined;
2542
+ if (feeCostString !== undefined) {
2543
+ feeCostAbsString = Precise["default"].stringAbs(feeCostString);
2544
+ }
2544
2545
  let fee = undefined;
2545
2546
  let amountString = this.safeString(transaction, 'size');
2546
2547
  if (feeCostAbsString !== undefined) {
@@ -2371,7 +2371,7 @@ class bitmart extends bitmart$1 {
2371
2371
  const code = this.safeCurrencyCode(currencyId);
2372
2372
  const account = this.account();
2373
2373
  account['free'] = this.safeString2(balance, 'available', 'available_balance');
2374
- account['used'] = this.safeString2(balance, 'frozen', 'frozen_balance');
2374
+ account['used'] = this.safeStringN(balance, ['unAvailable', 'frozen', 'frozen_balance']);
2375
2375
  result[code] = account;
2376
2376
  }
2377
2377
  return this.safeBalance(result);