ccxt 4.1.52 → 4.1.53

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 (198) hide show
  1. package/README.md +6 -8
  2. package/dist/ccxt.browser.js +1311 -2712
  3. package/dist/ccxt.browser.min.js +7 -7
  4. package/dist/cjs/ccxt.js +1 -7
  5. package/dist/cjs/src/ace.js +56 -59
  6. package/dist/cjs/src/ascendex.js +1 -2
  7. package/dist/cjs/src/base/Exchange.js +1 -11
  8. package/dist/cjs/src/bingx.js +48 -8
  9. package/dist/cjs/src/bybit.js +2 -11
  10. package/dist/cjs/src/cryptocom.js +1 -0
  11. package/dist/cjs/src/digifinex.js +9 -6
  12. package/dist/cjs/src/lbank.js +2333 -443
  13. package/dist/cjs/src/ndax.js +59 -61
  14. package/dist/cjs/src/novadax.js +57 -59
  15. package/dist/cjs/src/oceanex.js +58 -60
  16. package/dist/cjs/src/okcoin.js +1 -9
  17. package/dist/cjs/src/okx.js +0 -7
  18. package/dist/cjs/src/poloniex.js +55 -57
  19. package/dist/cjs/src/poloniexfutures.js +67 -70
  20. package/dist/cjs/src/pro/bingx.js +18 -11
  21. package/dist/cjs/src/pro/poloniexfutures.js +9 -0
  22. package/dist/cjs/src/probit.js +62 -65
  23. package/dist/cjs/src/timex.js +1 -5
  24. package/dist/cjs/src/upbit.js +56 -58
  25. package/dist/cjs/src/wazirx.js +72 -74
  26. package/dist/cjs/src/whitebit.js +88 -91
  27. package/dist/cjs/src/woo.js +75 -77
  28. package/dist/cjs/src/zaif.js +57 -71
  29. package/dist/cjs/src/zonda.js +67 -70
  30. package/js/ccxt.d.ts +2 -8
  31. package/js/ccxt.js +2 -6
  32. package/js/src/abstract/bybit.d.ts +1 -0
  33. package/js/src/abstract/lbank.d.ts +57 -15
  34. package/js/src/ace.d.ts +8 -7
  35. package/js/src/ace.js +56 -59
  36. package/js/src/alpaca.d.ts +4 -4
  37. package/js/src/ascendex.d.ts +12 -12
  38. package/js/src/ascendex.js +1 -2
  39. package/js/src/base/Exchange.js +1 -11
  40. package/js/src/base/types.d.ts +73 -71
  41. package/js/src/bigone.d.ts +10 -10
  42. package/js/src/binance.d.ts +27 -27
  43. package/js/src/bingx.d.ts +15 -15
  44. package/js/src/bingx.js +48 -8
  45. package/js/src/bit2c.d.ts +5 -5
  46. package/js/src/bitbank.d.ts +5 -5
  47. package/js/src/bitbns.d.ts +7 -7
  48. package/js/src/bitfinex.d.ts +8 -8
  49. package/js/src/bitfinex2.d.ts +12 -12
  50. package/js/src/bitflyer.d.ts +9 -9
  51. package/js/src/bitforex.d.ts +6 -6
  52. package/js/src/bitget.d.ts +24 -24
  53. package/js/src/bithumb.d.ts +4 -4
  54. package/js/src/bitmart.d.ts +21 -21
  55. package/js/src/bitmex.d.ts +14 -14
  56. package/js/src/bitopro.d.ts +12 -12
  57. package/js/src/bitpanda.d.ts +11 -11
  58. package/js/src/bitrue.d.ts +8 -8
  59. package/js/src/bitso.d.ts +11 -11
  60. package/js/src/bitstamp.d.ts +10 -10
  61. package/js/src/bitstamp1.d.ts +4 -4
  62. package/js/src/bittrex.d.ts +14 -14
  63. package/js/src/bitvavo.d.ts +9 -9
  64. package/js/src/bl3p.d.ts +2 -2
  65. package/js/src/blockchaincom.d.ts +13 -13
  66. package/js/src/btcalpha.d.ts +9 -9
  67. package/js/src/btcbox.d.ts +6 -6
  68. package/js/src/btcmarkets.d.ts +12 -12
  69. package/js/src/btcturk.d.ts +5 -5
  70. package/js/src/bybit.d.ts +28 -28
  71. package/js/src/bybit.js +2 -11
  72. package/js/src/cex.d.ts +6 -6
  73. package/js/src/coinbase.d.ts +17 -17
  74. package/js/src/coinbasepro.d.ts +13 -13
  75. package/js/src/coincheck.d.ts +6 -6
  76. package/js/src/coinex.d.ts +18 -18
  77. package/js/src/coinlist.d.ts +14 -14
  78. package/js/src/coinmate.d.ts +7 -7
  79. package/js/src/coinone.d.ts +5 -5
  80. package/js/src/coinsph.d.ts +10 -10
  81. package/js/src/coinspot.d.ts +3 -3
  82. package/js/src/cryptocom.d.ts +16 -16
  83. package/js/src/cryptocom.js +1 -0
  84. package/js/src/currencycom.d.ts +10 -10
  85. package/js/src/delta.d.ts +10 -10
  86. package/js/src/deribit.d.ts +13 -13
  87. package/js/src/digifinex.d.ts +17 -17
  88. package/js/src/digifinex.js +9 -6
  89. package/js/src/exmo.d.ts +12 -12
  90. package/js/src/gate.d.ts +20 -20
  91. package/js/src/gemini.d.ts +6 -6
  92. package/js/src/hitbtc.d.ts +15 -15
  93. package/js/src/hollaex.d.ts +12 -12
  94. package/js/src/htx.d.ts +27 -27
  95. package/js/src/huobijp.d.ts +16 -16
  96. package/js/src/idex.d.ts +13 -13
  97. package/js/src/independentreserve.d.ts +6 -6
  98. package/js/src/indodax.d.ts +6 -6
  99. package/js/src/kraken.d.ts +16 -16
  100. package/js/src/krakenfutures.d.ts +9 -9
  101. package/js/src/kucoin.d.ts +15 -15
  102. package/js/src/kucoinfutures.d.ts +11 -11
  103. package/js/src/kuna.d.ts +12 -12
  104. package/js/src/latoken.d.ts +9 -9
  105. package/js/src/lbank.d.ts +65 -12
  106. package/js/src/lbank.js +2334 -444
  107. package/js/src/lbank2.d.ts +11 -11
  108. package/js/src/luno.d.ts +10 -10
  109. package/js/src/lykke.d.ts +8 -8
  110. package/js/src/mercado.d.ts +6 -6
  111. package/js/src/mexc.d.ts +23 -23
  112. package/js/src/ndax.d.ts +13 -12
  113. package/js/src/ndax.js +59 -61
  114. package/js/src/novadax.d.ts +13 -12
  115. package/js/src/novadax.js +57 -59
  116. package/js/src/oceanex.d.ts +10 -9
  117. package/js/src/oceanex.js +58 -60
  118. package/js/src/okcoin.d.ts +12 -13
  119. package/js/src/okcoin.js +1 -9
  120. package/js/src/okx.d.ts +26 -27
  121. package/js/src/okx.js +0 -7
  122. package/js/src/paymium.d.ts +2 -2
  123. package/js/src/phemex.d.ts +16 -16
  124. package/js/src/poloniex.d.ts +15 -14
  125. package/js/src/poloniex.js +55 -57
  126. package/js/src/poloniexfutures.d.ts +11 -10
  127. package/js/src/poloniexfutures.js +67 -70
  128. package/js/src/pro/alpaca.d.ts +3 -3
  129. package/js/src/pro/ascendex.d.ts +2 -2
  130. package/js/src/pro/binance.d.ts +9 -9
  131. package/js/src/pro/bingx.d.ts +3 -3
  132. package/js/src/pro/bingx.js +19 -12
  133. package/js/src/pro/bitfinex.d.ts +3 -3
  134. package/js/src/pro/bitfinex2.d.ts +3 -3
  135. package/js/src/pro/bitget.d.ts +3 -3
  136. package/js/src/pro/bitmart.d.ts +2 -2
  137. package/js/src/pro/bitmex.d.ts +3 -3
  138. package/js/src/pro/bitpanda.d.ts +3 -3
  139. package/js/src/pro/bitrue.d.ts +2 -2
  140. package/js/src/pro/bitstamp.d.ts +2 -2
  141. package/js/src/pro/bittrex.d.ts +3 -3
  142. package/js/src/pro/bitvavo.d.ts +3 -3
  143. package/js/src/pro/blockchaincom.d.ts +2 -2
  144. package/js/src/pro/bybit.d.ts +4 -4
  145. package/js/src/pro/cex.d.ts +3 -3
  146. package/js/src/pro/coinbasepro.d.ts +3 -3
  147. package/js/src/pro/coinex.d.ts +2 -2
  148. package/js/src/pro/cryptocom.d.ts +5 -5
  149. package/js/src/pro/deribit.d.ts +3 -3
  150. package/js/src/pro/exmo.d.ts +2 -2
  151. package/js/src/pro/gate.d.ts +3 -3
  152. package/js/src/pro/gemini.d.ts +2 -2
  153. package/js/src/pro/hitbtc.d.ts +3 -3
  154. package/js/src/pro/hollaex.d.ts +3 -3
  155. package/js/src/pro/htx.d.ts +3 -3
  156. package/js/src/pro/idex.d.ts +3 -3
  157. package/js/src/pro/kraken.d.ts +7 -7
  158. package/js/src/pro/krakenfutures.d.ts +4 -4
  159. package/js/src/pro/kucoin.d.ts +3 -3
  160. package/js/src/pro/kucoinfutures.d.ts +3 -3
  161. package/js/src/pro/mexc.d.ts +3 -3
  162. package/js/src/pro/okcoin.d.ts +2 -2
  163. package/js/src/pro/okx.d.ts +6 -6
  164. package/js/src/pro/phemex.d.ts +3 -3
  165. package/js/src/pro/poloniex.d.ts +3 -3
  166. package/js/src/pro/poloniexfutures.d.ts +3 -3
  167. package/js/src/pro/poloniexfutures.js +9 -0
  168. package/js/src/pro/probit.d.ts +3 -3
  169. package/js/src/pro/wazirx.d.ts +3 -3
  170. package/js/src/pro/whitebit.d.ts +3 -3
  171. package/js/src/pro/woo.d.ts +2 -2
  172. package/js/src/probit.d.ts +11 -10
  173. package/js/src/probit.js +62 -65
  174. package/js/src/tidex.d.ts +5 -5
  175. package/js/src/timex.d.ts +10 -10
  176. package/js/src/timex.js +1 -5
  177. package/js/src/tokocrypto.d.ts +9 -9
  178. package/js/src/upbit.d.ts +11 -10
  179. package/js/src/upbit.js +56 -58
  180. package/js/src/wavesexchange.d.ts +7 -7
  181. package/js/src/wazirx.d.ts +7 -6
  182. package/js/src/wazirx.js +72 -74
  183. package/js/src/whitebit.d.ts +12 -11
  184. package/js/src/whitebit.js +88 -91
  185. package/js/src/woo.d.ts +20 -19
  186. package/js/src/woo.js +75 -77
  187. package/js/src/yobit.d.ts +5 -5
  188. package/js/src/zaif.d.ts +6 -5
  189. package/js/src/zaif.js +57 -71
  190. package/js/src/zonda.d.ts +7 -6
  191. package/js/src/zonda.js +67 -70
  192. package/package.json +1 -1
  193. package/skip-tests.json +0 -15
  194. package/test.ts +0 -0
  195. package/js/src/abstract/bitstamp1.d.ts +0 -26
  196. package/js/src/abstract/bitstamp1.js +0 -11
  197. package/js/src/abstract/lbank2.d.ts +0 -64
  198. package/js/src/abstract/lbank2.js +0 -11
@@ -271,79 +271,76 @@ class poloniexfutures extends poloniexfutures$1 {
271
271
  // ]
272
272
  // }
273
273
  //
274
- const result = [];
275
274
  const data = this.safeValue(response, 'data', []);
276
- const dataLength = data.length;
277
- for (let i = 0; i < dataLength; i++) {
278
- const market = data[i];
279
- const id = this.safeString(market, 'symbol');
280
- const baseId = this.safeString(market, 'baseCurrency');
281
- const quoteId = this.safeString(market, 'quoteCurrency');
282
- const settleId = this.safeString(market, 'rootSymbol');
283
- const base = this.safeCurrencyCode(baseId);
284
- const quote = this.safeCurrencyCode(quoteId);
285
- const settle = this.safeCurrencyCode(settleId);
286
- const symbol = base + '/' + quote + ':' + settle;
287
- const inverse = this.safeValue(market, 'isInverse');
288
- const status = this.safeString(market, 'status');
289
- const multiplier = this.safeString(market, 'multiplier');
290
- const tickSize = this.safeNumber(market, 'indexPriceTickSize');
291
- const lotSize = this.safeNumber(market, 'lotSize');
292
- const limitAmountMax = this.safeNumber(market, 'maxOrderQty');
293
- const limitPriceMax = this.safeNumber(market, 'maxPrice');
294
- result.push({
295
- 'id': id,
296
- 'symbol': symbol,
297
- 'base': base,
298
- 'quote': quote,
299
- 'settle': settle,
300
- 'baseId': baseId,
301
- 'quoteId': quoteId,
302
- 'settleId': settleId,
303
- 'type': 'swap',
304
- 'spot': false,
305
- 'margin': false,
306
- 'swap': true,
307
- 'future': false,
308
- 'option': false,
309
- 'active': (status === 'Open'),
310
- 'contract': true,
311
- 'linear': !inverse,
312
- 'inverse': inverse,
313
- 'taker': this.safeNumber(market, 'takerFeeRate'),
314
- 'maker': this.safeNumber(market, 'makerFeeRate'),
315
- 'contractSize': this.parseNumber(Precise["default"].stringAbs(multiplier)),
316
- 'expiry': undefined,
317
- 'expiryDatetime': undefined,
318
- 'strike': undefined,
319
- 'optionType': undefined,
320
- 'precision': {
321
- 'amount': lotSize,
322
- 'price': tickSize,
275
+ return this.parseMarkets(data);
276
+ }
277
+ parseMarket(market) {
278
+ const id = this.safeString(market, 'symbol');
279
+ const baseId = this.safeString(market, 'baseCurrency');
280
+ const quoteId = this.safeString(market, 'quoteCurrency');
281
+ const settleId = this.safeString(market, 'rootSymbol');
282
+ const base = this.safeCurrencyCode(baseId);
283
+ const quote = this.safeCurrencyCode(quoteId);
284
+ const settle = this.safeCurrencyCode(settleId);
285
+ const symbol = base + '/' + quote + ':' + settle;
286
+ const inverse = this.safeValue(market, 'isInverse');
287
+ const status = this.safeString(market, 'status');
288
+ const multiplier = this.safeString(market, 'multiplier');
289
+ const tickSize = this.safeNumber(market, 'indexPriceTickSize');
290
+ const lotSize = this.safeNumber(market, 'lotSize');
291
+ const limitAmountMax = this.safeNumber(market, 'maxOrderQty');
292
+ const limitPriceMax = this.safeNumber(market, 'maxPrice');
293
+ return {
294
+ 'id': id,
295
+ 'symbol': symbol,
296
+ 'base': base,
297
+ 'quote': quote,
298
+ 'settle': settle,
299
+ 'baseId': baseId,
300
+ 'quoteId': quoteId,
301
+ 'settleId': settleId,
302
+ 'type': 'swap',
303
+ 'spot': false,
304
+ 'margin': false,
305
+ 'swap': true,
306
+ 'future': false,
307
+ 'option': false,
308
+ 'active': (status === 'Open'),
309
+ 'contract': true,
310
+ 'linear': !inverse,
311
+ 'inverse': inverse,
312
+ 'taker': this.safeNumber(market, 'takerFeeRate'),
313
+ 'maker': this.safeNumber(market, 'makerFeeRate'),
314
+ 'contractSize': this.parseNumber(Precise["default"].stringAbs(multiplier)),
315
+ 'expiry': undefined,
316
+ 'expiryDatetime': undefined,
317
+ 'strike': undefined,
318
+ 'optionType': undefined,
319
+ 'precision': {
320
+ 'amount': lotSize,
321
+ 'price': tickSize,
322
+ },
323
+ 'limits': {
324
+ 'leverage': {
325
+ 'min': this.parseNumber('1'),
326
+ 'max': this.safeNumber(market, 'maxLeverage'),
323
327
  },
324
- 'limits': {
325
- 'leverage': {
326
- 'min': this.parseNumber('1'),
327
- 'max': this.safeNumber(market, 'maxLeverage'),
328
- },
329
- 'amount': {
330
- 'min': lotSize,
331
- 'max': limitAmountMax,
332
- },
333
- 'price': {
334
- 'min': tickSize,
335
- 'max': limitPriceMax,
336
- },
337
- 'cost': {
338
- 'min': undefined,
339
- 'max': undefined,
340
- },
328
+ 'amount': {
329
+ 'min': lotSize,
330
+ 'max': limitAmountMax,
341
331
  },
342
- 'created': this.safeInteger(market, 'firstOpenDate'),
343
- 'info': market,
344
- });
345
- }
346
- return result;
332
+ 'price': {
333
+ 'min': tickSize,
334
+ 'max': limitPriceMax,
335
+ },
336
+ 'cost': {
337
+ 'min': undefined,
338
+ 'max': undefined,
339
+ },
340
+ },
341
+ 'created': this.safeInteger(market, 'firstOpenDate'),
342
+ 'info': market,
343
+ };
347
344
  }
348
345
  parseTicker(ticker, market = undefined) {
349
346
  //
@@ -299,11 +299,12 @@ class bingx extends bingx$1 {
299
299
  // "h": "28915.4",
300
300
  // "l": "28896.1",
301
301
  // "v": "27.6919",
302
- // "T": 1690907580000
302
+ // "T": 1696687499999,
303
+ // "t": 1696687440000
303
304
  // }
304
305
  //
305
306
  return [
306
- this.safeInteger(ohlcv, 'T'),
307
+ this.safeInteger(ohlcv, 't'),
307
308
  this.safeNumber(ohlcv, 'o'),
308
309
  this.safeNumber(ohlcv, 'h'),
309
310
  this.safeNumber(ohlcv, 'l'),
@@ -597,16 +598,22 @@ class bingx extends bingx$1 {
597
598
  // swap
598
599
  // Ping
599
600
  //
600
- if (message === 'Ping') {
601
- await client.send('Pong');
601
+ try {
602
+ if (message === 'Ping') {
603
+ await client.send('Pong');
604
+ }
605
+ else {
606
+ const ping = this.safeString(message, 'ping');
607
+ const time = this.safeString(message, 'time');
608
+ await client.send({
609
+ 'pong': ping,
610
+ 'time': time,
611
+ });
612
+ }
602
613
  }
603
- else {
604
- const ping = this.safeString(message, 'ping');
605
- const time = this.safeString(message, 'time');
606
- await client.send({
607
- 'pong': ping,
608
- 'time': time,
609
- });
614
+ catch (e) {
615
+ const error = new errors.NetworkError(this.id + ' pong failed with error ' + this.json(e));
616
+ client.reset(error);
610
617
  }
611
618
  }
612
619
  handleOrder(client, message) {
@@ -10,6 +10,15 @@ class poloniexfutures extends poloniexfutures$1 {
10
10
  return this.deepExtend(super.describe(), {
11
11
  'has': {
12
12
  'ws': true,
13
+ 'cancelAllOrdersWs': false,
14
+ 'cancelOrdersWs': false,
15
+ 'cancelOrderWs': false,
16
+ 'createOrderWs': false,
17
+ 'editOrderWs': false,
18
+ 'fetchBalanceWs': false,
19
+ 'fetchOpenOrdersWs': false,
20
+ 'fetchOrderWs': false,
21
+ 'fetchTradesWs': false,
13
22
  'watchOHLCV': false,
14
23
  'watchOrderBook': true,
15
24
  'watchTicker': true,
@@ -272,73 +272,70 @@ class probit extends probit$1 {
272
272
  // }
273
273
  //
274
274
  const markets = this.safeValue(response, 'data', []);
275
- const result = [];
276
- for (let i = 0; i < markets.length; i++) {
277
- const market = markets[i];
278
- const id = this.safeString(market, 'id');
279
- const baseId = this.safeString(market, 'base_currency_id');
280
- const quoteId = this.safeString(market, 'quote_currency_id');
281
- const base = this.safeCurrencyCode(baseId);
282
- const quote = this.safeCurrencyCode(quoteId);
283
- const closed = this.safeValue(market, 'closed', false);
284
- const takerFeeRate = this.safeString(market, 'taker_fee_rate');
285
- const taker = Precise["default"].stringDiv(takerFeeRate, '100');
286
- const makerFeeRate = this.safeString(market, 'maker_fee_rate');
287
- const maker = Precise["default"].stringDiv(makerFeeRate, '100');
288
- result.push({
289
- 'id': id,
290
- 'symbol': base + '/' + quote,
291
- 'base': base,
292
- 'quote': quote,
293
- 'settle': undefined,
294
- 'baseId': baseId,
295
- 'quoteId': quoteId,
296
- 'settleId': undefined,
297
- 'type': 'spot',
298
- 'spot': true,
299
- 'margin': false,
300
- 'swap': false,
301
- 'future': false,
302
- 'option': false,
303
- 'active': !closed,
304
- 'contract': false,
305
- 'linear': 'rfwf',
306
- 'inverse': 3,
307
- 'taker': this.parseNumber(taker),
308
- 'maker': this.parseNumber(maker),
309
- 'contractSize': undefined,
310
- 'expiry': undefined,
311
- 'expiryDatetime': undefined,
312
- 'strike': undefined,
313
- 'optionType': undefined,
314
- 'precision': {
315
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantity_precision'))),
316
- 'price': this.safeNumber(market, 'price_increment'),
317
- 'cost': this.parseNumber(this.parsePrecision(this.safeString(market, 'cost_precision'))),
275
+ return this.parseMarkets(markets);
276
+ }
277
+ parseMarket(market) {
278
+ const id = this.safeString(market, 'id');
279
+ const baseId = this.safeString(market, 'base_currency_id');
280
+ const quoteId = this.safeString(market, 'quote_currency_id');
281
+ const base = this.safeCurrencyCode(baseId);
282
+ const quote = this.safeCurrencyCode(quoteId);
283
+ const closed = this.safeValue(market, 'closed', false);
284
+ const takerFeeRate = this.safeString(market, 'taker_fee_rate');
285
+ const taker = Precise["default"].stringDiv(takerFeeRate, '100');
286
+ const makerFeeRate = this.safeString(market, 'maker_fee_rate');
287
+ const maker = Precise["default"].stringDiv(makerFeeRate, '100');
288
+ return {
289
+ 'id': id,
290
+ 'symbol': base + '/' + quote,
291
+ 'base': base,
292
+ 'quote': quote,
293
+ 'settle': undefined,
294
+ 'baseId': baseId,
295
+ 'quoteId': quoteId,
296
+ 'settleId': undefined,
297
+ 'type': 'spot',
298
+ 'spot': true,
299
+ 'margin': false,
300
+ 'swap': false,
301
+ 'future': false,
302
+ 'option': false,
303
+ 'active': !closed,
304
+ 'contract': false,
305
+ 'linear': undefined,
306
+ 'inverse': undefined,
307
+ 'taker': this.parseNumber(taker),
308
+ 'maker': this.parseNumber(maker),
309
+ 'contractSize': undefined,
310
+ 'expiry': undefined,
311
+ 'expiryDatetime': undefined,
312
+ 'strike': undefined,
313
+ 'optionType': undefined,
314
+ 'precision': {
315
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantity_precision'))),
316
+ 'price': this.safeNumber(market, 'price_increment'),
317
+ },
318
+ 'limits': {
319
+ 'leverage': {
320
+ 'min': undefined,
321
+ 'max': undefined,
318
322
  },
319
- 'limits': {
320
- 'leverage': {
321
- 'min': undefined,
322
- 'max': undefined,
323
- },
324
- 'amount': {
325
- 'min': this.safeNumber(market, 'min_quantity'),
326
- 'max': this.safeNumber(market, 'max_quantity'),
327
- },
328
- 'price': {
329
- 'min': this.safeNumber(market, 'min_price'),
330
- 'max': this.safeNumber(market, 'max_price'),
331
- },
332
- 'cost': {
333
- 'min': this.safeNumber(market, 'min_cost'),
334
- 'max': this.safeNumber(market, 'max_cost'),
335
- },
323
+ 'amount': {
324
+ 'min': this.safeNumber(market, 'min_quantity'),
325
+ 'max': this.safeNumber(market, 'max_quantity'),
336
326
  },
337
- 'created': undefined,
338
- 'info': market,
339
- });
340
- }
341
- return result;
327
+ 'price': {
328
+ 'min': this.safeNumber(market, 'min_price'),
329
+ 'max': this.safeNumber(market, 'max_price'),
330
+ },
331
+ 'cost': {
332
+ 'min': this.safeNumber(market, 'min_cost'),
333
+ 'max': this.safeNumber(market, 'max_cost'),
334
+ },
335
+ },
336
+ 'created': undefined,
337
+ 'info': market,
338
+ };
342
339
  }
343
340
  async fetchCurrencies(params = {}) {
344
341
  /**
@@ -291,11 +291,7 @@ class timex extends timex$1 {
291
291
  // }
292
292
  // ]
293
293
  //
294
- const result = [];
295
- for (let i = 0; i < response.length; i++) {
296
- result.push(this.parseMarket(response[i]));
297
- }
298
- return result;
294
+ return this.parseMarkets(response);
299
295
  }
300
296
  async fetchCurrencies(params = {}) {
301
297
  /**
@@ -415,66 +415,64 @@ class upbit extends upbit$1 {
415
415
  // ...,
416
416
  // ]
417
417
  //
418
- const result = [];
419
- for (let i = 0; i < response.length; i++) {
420
- const market = response[i];
421
- const id = this.safeString(market, 'market');
422
- const [quoteId, baseId] = id.split('-');
423
- const base = this.safeCurrencyCode(baseId);
424
- const quote = this.safeCurrencyCode(quoteId);
425
- result.push({
426
- 'id': id,
427
- 'symbol': base + '/' + quote,
428
- 'base': base,
429
- 'quote': quote,
430
- 'settle': undefined,
431
- 'baseId': baseId,
432
- 'quoteId': quoteId,
433
- 'settleId': undefined,
434
- 'type': 'spot',
435
- 'spot': true,
436
- 'margin': false,
437
- 'swap': false,
438
- 'future': false,
439
- 'option': false,
440
- 'active': true,
441
- 'contract': false,
442
- 'linear': undefined,
443
- 'inverse': undefined,
444
- 'taker': this.safeNumber(this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']),
445
- 'maker': this.safeNumber(this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']),
446
- 'contractSize': undefined,
447
- 'expiry': undefined,
448
- 'expiryDatetime': undefined,
449
- 'strike': undefined,
450
- 'optionType': undefined,
451
- 'precision': {
452
- 'price': this.parseNumber('1e-8'),
453
- 'amount': this.parseNumber('1e-8'),
418
+ return this.parseMarkets(response);
419
+ }
420
+ parseMarket(market) {
421
+ const id = this.safeString(market, 'market');
422
+ const [quoteId, baseId] = id.split('-');
423
+ const base = this.safeCurrencyCode(baseId);
424
+ const quote = this.safeCurrencyCode(quoteId);
425
+ return {
426
+ 'id': id,
427
+ 'symbol': base + '/' + quote,
428
+ 'base': base,
429
+ 'quote': quote,
430
+ 'settle': undefined,
431
+ 'baseId': baseId,
432
+ 'quoteId': quoteId,
433
+ 'settleId': undefined,
434
+ 'type': 'spot',
435
+ 'spot': true,
436
+ 'margin': false,
437
+ 'swap': false,
438
+ 'future': false,
439
+ 'option': false,
440
+ 'active': true,
441
+ 'contract': false,
442
+ 'linear': undefined,
443
+ 'inverse': undefined,
444
+ 'taker': this.safeNumber(this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']),
445
+ 'maker': this.safeNumber(this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']),
446
+ 'contractSize': undefined,
447
+ 'expiry': undefined,
448
+ 'expiryDatetime': undefined,
449
+ 'strike': undefined,
450
+ 'optionType': undefined,
451
+ 'precision': {
452
+ 'price': this.parseNumber('1e-8'),
453
+ 'amount': this.parseNumber('1e-8'),
454
+ },
455
+ 'limits': {
456
+ 'leverage': {
457
+ 'min': undefined,
458
+ 'max': undefined,
454
459
  },
455
- 'limits': {
456
- 'leverage': {
457
- 'min': undefined,
458
- 'max': undefined,
459
- },
460
- 'amount': {
461
- 'min': undefined,
462
- 'max': undefined,
463
- },
464
- 'price': {
465
- 'min': undefined,
466
- 'max': undefined,
467
- },
468
- 'cost': {
469
- 'min': undefined,
470
- 'max': undefined,
471
- },
460
+ 'amount': {
461
+ 'min': undefined,
462
+ 'max': undefined,
472
463
  },
473
- 'created': undefined,
474
- 'info': market,
475
- });
476
- }
477
- return result;
464
+ 'price': {
465
+ 'min': undefined,
466
+ 'max': undefined,
467
+ },
468
+ 'cost': {
469
+ 'min': undefined,
470
+ 'max': undefined,
471
+ },
472
+ },
473
+ 'created': undefined,
474
+ 'info': market,
475
+ };
478
476
  }
479
477
  parseBalance(response) {
480
478
  const result = {