ccxt 4.1.51 → 4.1.52

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 (182) hide show
  1. package/README.md +110 -113
  2. package/dist/ccxt.browser.js +1361 -2933
  3. package/dist/ccxt.browser.min.js +7 -7
  4. package/dist/cjs/ccxt.js +1 -7
  5. package/dist/cjs/src/alpaca.js +62 -64
  6. package/dist/cjs/src/ascendex.js +3 -1
  7. package/dist/cjs/src/base/Exchange.js +10 -0
  8. package/dist/cjs/src/bigone.js +60 -77
  9. package/dist/cjs/src/binance.js +1 -0
  10. package/dist/cjs/src/bingx.js +4 -11
  11. package/dist/cjs/src/bitbank.js +58 -59
  12. package/dist/cjs/src/bitbns.js +1 -0
  13. package/dist/cjs/src/bitfinex.js +1 -0
  14. package/dist/cjs/src/bitfinex2.js +1 -0
  15. package/dist/cjs/src/bitflyer.js +1 -0
  16. package/dist/cjs/src/bitget.js +3 -8
  17. package/dist/cjs/src/bithumb.js +1 -0
  18. package/dist/cjs/src/bitmart.js +10 -1
  19. package/dist/cjs/src/bitmex.js +114 -119
  20. package/dist/cjs/src/bitopro.js +63 -65
  21. package/dist/cjs/src/bitpanda.js +60 -60
  22. package/dist/cjs/src/bitrue.js +67 -71
  23. package/dist/cjs/src/bitso.js +1 -0
  24. package/dist/cjs/src/bitstamp.js +1 -0
  25. package/dist/cjs/src/bittrex.js +57 -57
  26. package/dist/cjs/src/bitvavo.js +10 -2
  27. package/dist/cjs/src/blockchaincom.js +2 -2
  28. package/dist/cjs/src/btcalpha.js +59 -60
  29. package/dist/cjs/src/btcmarkets.js +68 -69
  30. package/dist/cjs/src/btcturk.js +72 -74
  31. package/dist/cjs/src/bybit.js +3 -1
  32. package/dist/cjs/src/coinbase.js +7 -2
  33. package/dist/cjs/src/coinbasepro.js +1 -0
  34. package/dist/cjs/src/coincheck.js +1 -0
  35. package/dist/cjs/src/coinex.js +4 -0
  36. package/dist/cjs/src/coinlist.js +60 -60
  37. package/dist/cjs/src/coinmate.js +1 -0
  38. package/dist/cjs/src/coinsph.js +2 -4
  39. package/dist/cjs/src/cryptocom.js +1 -0
  40. package/dist/cjs/src/currencycom.js +2 -2
  41. package/dist/cjs/src/deribit.js +2 -0
  42. package/dist/cjs/src/digifinex.js +5 -2
  43. package/dist/cjs/src/exmo.js +1 -0
  44. package/dist/cjs/src/gate.js +2 -0
  45. package/dist/cjs/src/gemini.js +2 -0
  46. package/dist/cjs/src/hitbtc.js +4 -0
  47. package/dist/cjs/src/hollaex.js +2 -0
  48. package/dist/cjs/src/htx.js +4 -0
  49. package/dist/cjs/src/huobijp.js +2 -0
  50. package/dist/cjs/src/idex.js +2 -0
  51. package/dist/cjs/src/indodax.js +1 -0
  52. package/dist/cjs/src/kraken.js +3 -3
  53. package/dist/cjs/src/kucoin.js +6 -5
  54. package/dist/cjs/src/kuna.js +3 -1
  55. package/dist/cjs/src/latoken.js +1 -0
  56. package/dist/cjs/src/lbank.js +1 -0
  57. package/dist/cjs/src/lykke.js +2 -0
  58. package/dist/cjs/src/mercado.js +1 -0
  59. package/dist/cjs/src/mexc.js +2 -0
  60. package/dist/cjs/src/ndax.js +2 -0
  61. package/dist/cjs/src/novadax.js +1 -0
  62. package/dist/cjs/src/okcoin.js +2 -0
  63. package/dist/cjs/src/okx.js +2 -0
  64. package/dist/cjs/src/phemex.js +2 -0
  65. package/dist/cjs/src/poloniex.js +1 -0
  66. package/dist/cjs/src/pro/binance.js +5 -3
  67. package/dist/cjs/src/pro/coinbase.js +12 -3
  68. package/dist/cjs/src/pro/cryptocom.js +17 -17
  69. package/dist/cjs/src/pro/krakenfutures.js +15 -15
  70. package/dist/cjs/src/probit.js +4 -2
  71. package/dist/cjs/src/tidex.js +1 -0
  72. package/dist/cjs/src/timex.js +2 -0
  73. package/dist/cjs/src/upbit.js +2 -0
  74. package/dist/cjs/src/wavesexchange.js +2 -1
  75. package/dist/cjs/src/whitebit.js +1 -0
  76. package/dist/cjs/src/woo.js +1 -0
  77. package/dist/cjs/src/zaif.js +1 -0
  78. package/dist/cjs/src/zonda.js +1 -0
  79. package/js/ccxt.d.ts +2 -8
  80. package/js/ccxt.js +2 -6
  81. package/js/src/alpaca.d.ts +3 -2
  82. package/js/src/alpaca.js +62 -64
  83. package/js/src/ascendex.js +3 -1
  84. package/js/src/base/Exchange.d.ts +2 -0
  85. package/js/src/base/Exchange.js +10 -0
  86. package/js/src/base/types.d.ts +6 -3
  87. package/js/src/bigone.d.ts +3 -3
  88. package/js/src/bigone.js +60 -77
  89. package/js/src/binance.js +1 -0
  90. package/js/src/bingx.d.ts +2 -2
  91. package/js/src/bingx.js +4 -11
  92. package/js/src/bitbank.d.ts +3 -2
  93. package/js/src/bitbank.js +58 -59
  94. package/js/src/bitbns.js +1 -0
  95. package/js/src/bitfinex.js +1 -0
  96. package/js/src/bitfinex2.js +1 -0
  97. package/js/src/bitflyer.js +1 -0
  98. package/js/src/bitget.d.ts +1 -2
  99. package/js/src/bitget.js +3 -8
  100. package/js/src/bithumb.js +1 -0
  101. package/js/src/bitmart.js +10 -1
  102. package/js/src/bitmex.d.ts +3 -2
  103. package/js/src/bitmex.js +114 -119
  104. package/js/src/bitopro.d.ts +3 -2
  105. package/js/src/bitopro.js +63 -65
  106. package/js/src/bitpanda.d.ts +3 -2
  107. package/js/src/bitpanda.js +60 -60
  108. package/js/src/bitrue.d.ts +3 -2
  109. package/js/src/bitrue.js +67 -71
  110. package/js/src/bitso.js +1 -0
  111. package/js/src/bitstamp.js +1 -0
  112. package/js/src/bittrex.d.ts +3 -2
  113. package/js/src/bittrex.js +57 -57
  114. package/js/src/bitvavo.js +10 -2
  115. package/js/src/blockchaincom.js +2 -2
  116. package/js/src/btcalpha.d.ts +3 -2
  117. package/js/src/btcalpha.js +59 -60
  118. package/js/src/btcmarkets.d.ts +3 -2
  119. package/js/src/btcmarkets.js +68 -69
  120. package/js/src/btcturk.d.ts +3 -2
  121. package/js/src/btcturk.js +72 -74
  122. package/js/src/bybit.js +3 -1
  123. package/js/src/coinbase.js +7 -2
  124. package/js/src/coinbasepro.js +1 -0
  125. package/js/src/coincheck.js +1 -0
  126. package/js/src/coinex.js +4 -0
  127. package/js/src/coinlist.d.ts +3 -2
  128. package/js/src/coinlist.js +60 -60
  129. package/js/src/coinmate.js +1 -0
  130. package/js/src/coinsph.js +2 -4
  131. package/js/src/cryptocom.js +1 -0
  132. package/js/src/currencycom.js +2 -2
  133. package/js/src/deribit.js +2 -0
  134. package/js/src/digifinex.js +5 -2
  135. package/js/src/exmo.js +1 -0
  136. package/js/src/gate.js +2 -0
  137. package/js/src/gemini.js +2 -0
  138. package/js/src/hitbtc.js +4 -0
  139. package/js/src/hollaex.js +2 -0
  140. package/js/src/htx.js +4 -0
  141. package/js/src/huobijp.js +2 -0
  142. package/js/src/idex.js +2 -0
  143. package/js/src/indodax.js +1 -0
  144. package/js/src/kraken.js +3 -3
  145. package/js/src/kucoin.js +6 -5
  146. package/js/src/kuna.js +3 -1
  147. package/js/src/latoken.js +1 -0
  148. package/js/src/lbank.js +1 -0
  149. package/js/src/lykke.js +2 -0
  150. package/js/src/mercado.js +1 -0
  151. package/js/src/mexc.js +2 -0
  152. package/js/src/ndax.js +2 -0
  153. package/js/src/novadax.js +1 -0
  154. package/js/src/okcoin.js +2 -0
  155. package/js/src/okx.js +2 -0
  156. package/js/src/phemex.js +2 -0
  157. package/js/src/poloniex.js +1 -0
  158. package/js/src/pro/binance.js +5 -3
  159. package/js/src/pro/coinbase.js +12 -3
  160. package/js/src/pro/cryptocom.js +17 -17
  161. package/js/src/pro/krakenfutures.js +15 -15
  162. package/js/src/probit.js +4 -2
  163. package/js/src/tidex.js +1 -0
  164. package/js/src/timex.js +2 -0
  165. package/js/src/upbit.js +2 -0
  166. package/js/src/wavesexchange.js +2 -1
  167. package/js/src/whitebit.js +1 -0
  168. package/js/src/woo.js +1 -0
  169. package/js/src/zaif.js +1 -0
  170. package/js/src/zonda.js +1 -0
  171. package/package.json +1 -1
  172. package/skip-tests.json +2 -3
  173. package/dist/cjs/src/btctradeua.js +0 -571
  174. package/dist/cjs/src/coinfalcon.js +0 -1012
  175. package/js/src/abstract/btctradeua.d.ts +0 -20
  176. package/js/src/abstract/btctradeua.js +0 -11
  177. package/js/src/abstract/coinfalcon.d.ts +0 -26
  178. package/js/src/abstract/coinfalcon.js +0 -11
  179. package/js/src/btctradeua.d.ts +0 -30
  180. package/js/src/btctradeua.js +0 -572
  181. package/js/src/coinfalcon.d.ts +0 -53
  182. package/js/src/coinfalcon.js +0 -1013
@@ -1003,6 +1003,7 @@ class bithumb extends bithumb$1 {
1003
1003
  'tag': undefined,
1004
1004
  'tagTo': undefined,
1005
1005
  'comment': undefined,
1006
+ 'internal': undefined,
1006
1007
  'fee': undefined,
1007
1008
  'info': transaction,
1008
1009
  };
@@ -396,7 +396,14 @@ class bitmart extends bitmart$1 {
396
396
  '40032': errors.InvalidOrder,
397
397
  '40033': errors.InvalidOrder,
398
398
  '40034': errors.BadSymbol,
399
- '53002': errors.PermissionDenied, // 403, Your account has not yet completed the kyc advanced certification, please complete first
399
+ '53002': errors.PermissionDenied,
400
+ '53003': errors.PermissionDenied,
401
+ '53005': errors.PermissionDenied,
402
+ '53006': errors.PermissionDenied,
403
+ '53007': errors.PermissionDenied,
404
+ '53008': errors.PermissionDenied,
405
+ '53009': errors.PermissionDenied,
406
+ '53010': errors.PermissionDenied, // 403 This account is restricted from borrowing
400
407
  },
401
408
  'broad': {},
402
409
  },
@@ -3155,6 +3162,8 @@ class bitmart extends bitmart$1 {
3155
3162
  'type': type,
3156
3163
  'updated': undefined,
3157
3164
  'txid': txid,
3165
+ 'internal': undefined,
3166
+ 'comment': undefined,
3158
3167
  'timestamp': (timestamp !== 0) ? timestamp : undefined,
3159
3168
  'datetime': (timestamp !== 0) ? this.iso8601(timestamp) : undefined,
3160
3169
  'fee': fee,
@@ -541,130 +541,124 @@ class bitmex extends bitmex$1 {
541
541
  // }
542
542
  // ]
543
543
  //
544
- const result = [];
545
- for (let i = 0; i < response.length; i++) {
546
- const market = response[i];
547
- const id = this.safeString(market, 'symbol');
548
- const baseId = this.safeString(market, 'underlying');
549
- const quoteId = this.safeString(market, 'quoteCurrency');
550
- const settleId = this.safeString(market, 'settlCurrency');
551
- const base = this.safeCurrencyCode(baseId);
552
- const quote = this.safeCurrencyCode(quoteId);
553
- const settle = this.safeCurrencyCode(settleId);
554
- // 'positionCurrency' may be empty ("", as Bitmex currently returns for ETHUSD)
555
- // so let's take the settlCurrency first and then adjust if needed
556
- const typ = this.safeString(market, 'typ'); // type definitions at: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_get
557
- const types = {
558
- 'FFWCSX': 'swap',
559
- 'FFWCSF': 'swap',
560
- 'IFXXXP': 'spot',
561
- 'FFCCSX': 'future',
562
- 'MRBXXX': 'index',
563
- 'MRCXXX': 'index',
564
- 'MRFXXX': 'index',
565
- 'MRRXXX': 'index',
566
- 'MRIXXX': 'index',
567
- };
568
- const type = this.safeString(types, typ, typ);
569
- const swap = type === 'swap';
570
- const future = type === 'future';
571
- const spot = type === 'spot';
572
- const contract = swap || future;
573
- let contractSize = undefined;
574
- const index = type === 'index';
575
- const isInverse = this.safeValue(market, 'isInverse'); // this is true when BASE and SETTLE are same, i.e. BTC/XXX:BTC
576
- const isQuanto = this.safeValue(market, 'isQuanto'); // this is true when BASE and SETTLE are different, i.e. AXS/XXX:BTC
577
- const linear = contract ? (!isInverse && !isQuanto) : undefined;
578
- const status = this.safeString(market, 'state');
579
- const active = status !== 'Unlisted';
580
- let expiry = undefined;
581
- let expiryDatetime = undefined;
582
- let symbol = undefined;
583
- if (spot) {
584
- symbol = base + '/' + quote;
585
- }
586
- else if (contract) {
587
- symbol = base + '/' + quote + ':' + settle;
588
- const multiplierString = Precise["default"].stringAbs(this.safeString(market, 'multiplier'));
589
- if (linear) {
590
- contractSize = this.parseNumber(Precise["default"].stringDiv('1', market['underlyingToPositionMultiplier']));
591
- }
592
- else {
593
- contractSize = this.parseNumber(multiplierString);
594
- }
595
- if (future) {
596
- expiryDatetime = this.safeString(market, 'expiry');
597
- expiry = this.parse8601(expiryDatetime);
598
- symbol = symbol + '-' + this.yymmdd(expiry);
599
- }
544
+ return this.parseMarkets(response);
545
+ }
546
+ parseMarket(market) {
547
+ const id = this.safeString(market, 'symbol');
548
+ const baseId = this.safeString(market, 'underlying');
549
+ const quoteId = this.safeString(market, 'quoteCurrency');
550
+ const settleId = this.safeString(market, 'settlCurrency');
551
+ const base = this.safeCurrencyCode(baseId);
552
+ const quote = this.safeCurrencyCode(quoteId);
553
+ const settle = this.safeCurrencyCode(settleId);
554
+ // 'positionCurrency' may be empty ("", as Bitmex currently returns for ETHUSD)
555
+ // so let's take the settlCurrency first and then adjust if needed
556
+ const typ = this.safeString(market, 'typ'); // type definitions at: https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_get
557
+ const types = {
558
+ 'FFWCSX': 'swap',
559
+ 'FFWCSF': 'swap',
560
+ 'IFXXXP': 'spot',
561
+ 'FFCCSX': 'future',
562
+ 'MRBXXX': 'index',
563
+ 'MRCXXX': 'index',
564
+ 'MRFXXX': 'index',
565
+ 'MRRXXX': 'index',
566
+ 'MRIXXX': 'index',
567
+ };
568
+ const type = this.safeString(types, typ, typ);
569
+ const swap = type === 'swap';
570
+ const future = type === 'future';
571
+ const spot = type === 'spot';
572
+ const contract = swap || future;
573
+ let contractSize = undefined;
574
+ const isInverse = this.safeValue(market, 'isInverse'); // this is true when BASE and SETTLE are same, i.e. BTC/XXX:BTC
575
+ const isQuanto = this.safeValue(market, 'isQuanto'); // this is true when BASE and SETTLE are different, i.e. AXS/XXX:BTC
576
+ const linear = contract ? (!isInverse && !isQuanto) : undefined;
577
+ const status = this.safeString(market, 'state');
578
+ const active = status !== 'Unlisted';
579
+ let expiry = undefined;
580
+ let expiryDatetime = undefined;
581
+ let symbol = undefined;
582
+ if (spot) {
583
+ symbol = base + '/' + quote;
584
+ }
585
+ else if (contract) {
586
+ symbol = base + '/' + quote + ':' + settle;
587
+ const multiplierString = Precise["default"].stringAbs(this.safeString(market, 'multiplier'));
588
+ if (linear) {
589
+ contractSize = this.parseNumber(Precise["default"].stringDiv('1', market['underlyingToPositionMultiplier']));
600
590
  }
601
591
  else {
602
- // for index/exotic markets, default to id
603
- symbol = id;
592
+ contractSize = this.parseNumber(multiplierString);
604
593
  }
605
- const positionId = this.safeString2(market, 'positionCurrency', 'underlying');
606
- const position = this.safeCurrencyCode(positionId);
607
- const positionIsQuote = (position === quote);
608
- const maxOrderQty = this.safeNumber(market, 'maxOrderQty');
609
- const initMargin = this.safeString(market, 'initMargin', '1');
610
- const maxLeverage = this.parseNumber(Precise["default"].stringDiv('1', initMargin));
611
- result.push({
612
- 'id': id,
613
- 'symbol': symbol,
614
- 'base': base,
615
- 'quote': quote,
616
- 'settle': settle,
617
- 'baseId': baseId,
618
- 'quoteId': quoteId,
619
- 'settleId': settleId,
620
- 'type': type,
621
- 'spot': spot,
622
- 'margin': false,
623
- 'swap': swap,
624
- 'future': future,
625
- 'option': false,
626
- 'index': index,
627
- 'active': active,
628
- 'contract': contract,
629
- 'linear': linear,
630
- 'inverse': isInverse,
631
- 'quanto': isQuanto,
632
- 'taker': this.safeNumber(market, 'takerFee'),
633
- 'maker': this.safeNumber(market, 'makerFee'),
634
- 'contractSize': contractSize,
635
- 'expiry': expiry,
636
- 'expiryDatetime': expiryDatetime,
637
- 'strike': this.safeNumber(market, 'optionStrikePrice'),
638
- 'optionType': undefined,
639
- 'precision': {
640
- 'amount': this.safeNumber(market, 'lotSize'),
641
- 'price': this.safeNumber(market, 'tickSize'),
642
- 'quote': this.safeNumber(market, 'tickSize'),
643
- 'base': this.safeNumber(market, 'tickSize'),
594
+ if (future) {
595
+ expiryDatetime = this.safeString(market, 'expiry');
596
+ expiry = this.parse8601(expiryDatetime);
597
+ symbol = symbol + '-' + this.yymmdd(expiry);
598
+ }
599
+ }
600
+ else {
601
+ // for index/exotic markets, default to id
602
+ symbol = id;
603
+ }
604
+ const positionId = this.safeString2(market, 'positionCurrency', 'underlying');
605
+ const position = this.safeCurrencyCode(positionId);
606
+ const positionIsQuote = (position === quote);
607
+ const maxOrderQty = this.safeNumber(market, 'maxOrderQty');
608
+ const initMargin = this.safeString(market, 'initMargin', '1');
609
+ const maxLeverage = this.parseNumber(Precise["default"].stringDiv('1', initMargin));
610
+ return {
611
+ 'id': id,
612
+ 'symbol': symbol,
613
+ 'base': base,
614
+ 'quote': quote,
615
+ 'settle': settle,
616
+ 'baseId': baseId,
617
+ 'quoteId': quoteId,
618
+ 'settleId': settleId,
619
+ 'type': type,
620
+ 'spot': spot,
621
+ 'margin': false,
622
+ 'swap': swap,
623
+ 'future': future,
624
+ 'option': false,
625
+ 'active': active,
626
+ 'contract': contract,
627
+ 'linear': linear,
628
+ 'inverse': isInverse,
629
+ 'quanto': isQuanto,
630
+ 'taker': this.safeNumber(market, 'takerFee'),
631
+ 'maker': this.safeNumber(market, 'makerFee'),
632
+ 'contractSize': contractSize,
633
+ 'expiry': expiry,
634
+ 'expiryDatetime': expiryDatetime,
635
+ 'strike': this.safeNumber(market, 'optionStrikePrice'),
636
+ 'optionType': undefined,
637
+ 'precision': {
638
+ 'amount': this.safeNumber(market, 'lotSize'),
639
+ 'price': this.safeNumber(market, 'tickSize'),
640
+ },
641
+ 'limits': {
642
+ 'leverage': {
643
+ 'min': contract ? this.parseNumber('1') : undefined,
644
+ 'max': contract ? maxLeverage : undefined,
644
645
  },
645
- 'limits': {
646
- 'leverage': {
647
- 'min': contract ? this.parseNumber('1') : undefined,
648
- 'max': contract ? maxLeverage : undefined,
649
- },
650
- 'amount': {
651
- 'min': undefined,
652
- 'max': positionIsQuote ? undefined : maxOrderQty,
653
- },
654
- 'price': {
655
- 'min': undefined,
656
- 'max': this.safeNumber(market, 'maxPrice'),
657
- },
658
- 'cost': {
659
- 'min': undefined,
660
- 'max': positionIsQuote ? maxOrderQty : undefined,
661
- },
646
+ 'amount': {
647
+ 'min': undefined,
648
+ 'max': positionIsQuote ? undefined : maxOrderQty,
662
649
  },
663
- 'created': this.parse8601(this.safeString(market, 'listing')),
664
- 'info': market,
665
- });
666
- }
667
- return result;
650
+ 'price': {
651
+ 'min': undefined,
652
+ 'max': this.safeNumber(market, 'maxPrice'),
653
+ },
654
+ 'cost': {
655
+ 'min': undefined,
656
+ 'max': positionIsQuote ? maxOrderQty : undefined,
657
+ },
658
+ },
659
+ 'created': this.parse8601(this.safeString(market, 'listing')),
660
+ 'info': market,
661
+ };
668
662
  }
669
663
  parseBalance(response) {
670
664
  //
@@ -1303,6 +1297,7 @@ class bitmex extends bitmex$1 {
1303
1297
  'tagFrom': undefined,
1304
1298
  'tagTo': undefined,
1305
1299
  'updated': timestamp,
1300
+ 'internal': undefined,
1306
1301
  'comment': undefined,
1307
1302
  'fee': {
1308
1303
  'currency': currency['code'],
@@ -301,71 +301,68 @@ class bitopro extends bitopro$1 {
301
301
  // ]
302
302
  // }
303
303
  //
304
- const result = [];
305
- for (let i = 0; i < markets.length; i++) {
306
- const market = markets[i];
307
- const active = !this.safeValue(market, 'maintain');
308
- const id = this.safeString(market, 'pair');
309
- const uppercaseId = id.toUpperCase();
310
- const baseId = this.safeString(market, 'base');
311
- const quoteId = this.safeString(market, 'quote');
312
- const base = this.safeCurrencyCode(baseId);
313
- const quote = this.safeCurrencyCode(quoteId);
314
- const symbol = base + '/' + quote;
315
- const limits = {
316
- 'amount': {
317
- 'min': this.safeNumber(market, 'minLimitBaseAmount'),
318
- 'max': this.safeNumber(market, 'maxLimitBaseAmount'),
319
- },
320
- 'price': {
321
- 'min': undefined,
322
- 'max': undefined,
323
- },
324
- 'cost': {
325
- 'min': undefined,
326
- 'max': undefined,
327
- },
328
- 'leverage': {
329
- 'min': undefined,
330
- 'max': undefined,
331
- },
332
- };
333
- result.push({
334
- 'id': id,
335
- 'uppercaseId': uppercaseId,
336
- 'symbol': symbol,
337
- 'base': base,
338
- 'quote': quote,
339
- 'baseId': base,
340
- 'quoteId': quote,
341
- 'settle': undefined,
342
- 'settleId': undefined,
343
- 'type': 'spot',
344
- 'spot': true,
345
- 'margin': false,
346
- 'swap': false,
347
- 'future': false,
348
- 'option': false,
349
- 'derivative': false,
350
- 'contract': false,
351
- 'linear': undefined,
352
- 'inverse': undefined,
353
- 'contractSize': undefined,
354
- 'expiry': undefined,
355
- 'expiryDatetime': undefined,
356
- 'strike': undefined,
357
- 'optionType': undefined,
358
- 'limits': limits,
359
- 'precision': {
360
- 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'quotePrecision'))),
361
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'basePrecision'))),
362
- },
363
- 'active': active,
364
- 'created': undefined,
365
- 'info': market,
366
- });
367
- }
368
- return result;
304
+ return this.parseMarkets(markets);
305
+ }
306
+ parseMarket(market) {
307
+ const active = !this.safeValue(market, 'maintain');
308
+ const id = this.safeString(market, 'pair');
309
+ const uppercaseId = id.toUpperCase();
310
+ const baseId = this.safeString(market, 'base');
311
+ const quoteId = this.safeString(market, 'quote');
312
+ const base = this.safeCurrencyCode(baseId);
313
+ const quote = this.safeCurrencyCode(quoteId);
314
+ const symbol = base + '/' + quote;
315
+ const limits = {
316
+ 'amount': {
317
+ 'min': this.safeNumber(market, 'minLimitBaseAmount'),
318
+ 'max': this.safeNumber(market, 'maxLimitBaseAmount'),
319
+ },
320
+ 'price': {
321
+ 'min': undefined,
322
+ 'max': undefined,
323
+ },
324
+ 'cost': {
325
+ 'min': undefined,
326
+ 'max': undefined,
327
+ },
328
+ 'leverage': {
329
+ 'min': undefined,
330
+ 'max': undefined,
331
+ },
332
+ };
333
+ return {
334
+ 'id': id,
335
+ 'uppercaseId': uppercaseId,
336
+ 'symbol': symbol,
337
+ 'base': base,
338
+ 'quote': quote,
339
+ 'baseId': base,
340
+ 'quoteId': quote,
341
+ 'settle': undefined,
342
+ 'settleId': undefined,
343
+ 'type': 'spot',
344
+ 'spot': true,
345
+ 'margin': false,
346
+ 'swap': false,
347
+ 'future': false,
348
+ 'option': false,
349
+ 'contract': false,
350
+ 'linear': undefined,
351
+ 'inverse': undefined,
352
+ 'contractSize': undefined,
353
+ 'expiry': undefined,
354
+ 'expiryDatetime': undefined,
355
+ 'strike': undefined,
356
+ 'optionType': undefined,
357
+ 'limits': limits,
358
+ 'precision': {
359
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'quotePrecision'))),
360
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'basePrecision'))),
361
+ },
362
+ 'active': active,
363
+ 'created': undefined,
364
+ 'info': market,
365
+ };
369
366
  }
370
367
  parseTicker(ticker, market = undefined) {
371
368
  //
@@ -1396,6 +1393,7 @@ class bitopro extends bitopro$1 {
1396
1393
  'tagTo': tag,
1397
1394
  'updated': undefined,
1398
1395
  'comment': undefined,
1396
+ 'internal': undefined,
1399
1397
  'fee': {
1400
1398
  'currency': code,
1401
1399
  'cost': this.safeNumber(transaction, 'fee'),
@@ -373,68 +373,66 @@ class bitpanda extends bitpanda$1 {
373
373
  // }
374
374
  // ]
375
375
  //
376
- const result = [];
377
- for (let i = 0; i < response.length; i++) {
378
- const market = response[i];
379
- const baseAsset = this.safeValue(market, 'base', {});
380
- const quoteAsset = this.safeValue(market, 'quote', {});
381
- const baseId = this.safeString(baseAsset, 'code');
382
- const quoteId = this.safeString(quoteAsset, 'code');
383
- const id = baseId + '_' + quoteId;
384
- const base = this.safeCurrencyCode(baseId);
385
- const quote = this.safeCurrencyCode(quoteId);
386
- const state = this.safeString(market, 'state');
387
- result.push({
388
- 'id': id,
389
- 'symbol': base + '/' + quote,
390
- 'base': base,
391
- 'quote': quote,
392
- 'settle': undefined,
393
- 'baseId': baseId,
394
- 'quoteId': quoteId,
395
- 'settleId': undefined,
396
- 'type': 'spot',
397
- 'spot': true,
398
- 'margin': false,
399
- 'swap': false,
400
- 'future': false,
401
- 'option': false,
402
- 'active': (state === 'ACTIVE'),
403
- 'contract': false,
404
- 'linear': undefined,
405
- 'inverse': undefined,
406
- 'contractSize': undefined,
407
- 'expiry': undefined,
408
- 'expiryDatetime': undefined,
409
- 'strike': undefined,
410
- 'optionType': undefined,
411
- 'precision': {
412
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
413
- 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'market_precision'))),
376
+ return this.parseMarkets(response);
377
+ }
378
+ parseMarket(market) {
379
+ const baseAsset = this.safeValue(market, 'base', {});
380
+ const quoteAsset = this.safeValue(market, 'quote', {});
381
+ const baseId = this.safeString(baseAsset, 'code');
382
+ const quoteId = this.safeString(quoteAsset, 'code');
383
+ const id = baseId + '_' + quoteId;
384
+ const base = this.safeCurrencyCode(baseId);
385
+ const quote = this.safeCurrencyCode(quoteId);
386
+ const state = this.safeString(market, 'state');
387
+ return {
388
+ 'id': id,
389
+ 'symbol': base + '/' + quote,
390
+ 'base': base,
391
+ 'quote': quote,
392
+ 'settle': undefined,
393
+ 'baseId': baseId,
394
+ 'quoteId': quoteId,
395
+ 'settleId': undefined,
396
+ 'type': 'spot',
397
+ 'spot': true,
398
+ 'margin': false,
399
+ 'swap': false,
400
+ 'future': false,
401
+ 'option': false,
402
+ 'active': (state === 'ACTIVE'),
403
+ 'contract': false,
404
+ 'linear': undefined,
405
+ 'inverse': undefined,
406
+ 'contractSize': undefined,
407
+ 'expiry': undefined,
408
+ 'expiryDatetime': undefined,
409
+ 'strike': undefined,
410
+ 'optionType': undefined,
411
+ 'precision': {
412
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
413
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'market_precision'))),
414
+ },
415
+ 'limits': {
416
+ 'leverage': {
417
+ 'min': undefined,
418
+ 'max': undefined,
414
419
  },
415
- 'limits': {
416
- 'leverage': {
417
- 'min': undefined,
418
- 'max': undefined,
419
- },
420
- 'amount': {
421
- 'min': undefined,
422
- 'max': undefined,
423
- },
424
- 'price': {
425
- 'min': undefined,
426
- 'max': undefined,
427
- },
428
- 'cost': {
429
- 'min': this.safeNumber(market, 'min_size'),
430
- 'max': undefined,
431
- },
420
+ 'amount': {
421
+ 'min': undefined,
422
+ 'max': undefined,
432
423
  },
433
- 'created': undefined,
434
- 'info': market,
435
- });
436
- }
437
- return result;
424
+ 'price': {
425
+ 'min': undefined,
426
+ 'max': undefined,
427
+ },
428
+ 'cost': {
429
+ 'min': this.safeNumber(market, 'min_size'),
430
+ 'max': undefined,
431
+ },
432
+ },
433
+ 'created': undefined,
434
+ 'info': market,
435
+ };
438
436
  }
439
437
  async fetchTradingFees(params = {}) {
440
438
  /**
@@ -1348,6 +1346,8 @@ class bitpanda extends bitpanda$1 {
1348
1346
  'type': undefined,
1349
1347
  'updated': undefined,
1350
1348
  'txid': this.safeString(transaction, 'blockchain_transaction_id'),
1349
+ 'comment': undefined,
1350
+ 'internal': undefined,
1351
1351
  'timestamp': timestamp,
1352
1352
  'datetime': this.iso8601(timestamp),
1353
1353
  'fee': fee,