ccxt 4.1.52 → 4.1.54

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 (207) hide show
  1. package/README.md +9 -10
  2. package/dist/ccxt.browser.js +3517 -3374
  3. package/dist/ccxt.browser.min.js +10 -10
  4. package/dist/cjs/ccxt.js +4 -7
  5. package/dist/cjs/src/abstract/p2b.js +9 -0
  6. package/dist/cjs/src/ace.js +56 -59
  7. package/dist/cjs/src/ascendex.js +1 -2
  8. package/dist/cjs/src/base/Exchange.js +11 -17
  9. package/dist/cjs/src/bingx.js +48 -8
  10. package/dist/cjs/src/bitget.js +670 -405
  11. package/dist/cjs/src/bybit.js +2 -11
  12. package/dist/cjs/src/cryptocom.js +1 -0
  13. package/dist/cjs/src/digifinex.js +9 -6
  14. package/dist/cjs/src/lbank.js +2333 -443
  15. package/dist/cjs/src/ndax.js +59 -61
  16. package/dist/cjs/src/novadax.js +57 -59
  17. package/dist/cjs/src/oceanex.js +58 -60
  18. package/dist/cjs/src/okcoin.js +1 -9
  19. package/dist/cjs/src/okx.js +0 -7
  20. package/dist/cjs/src/p2b.js +1246 -0
  21. package/dist/cjs/src/poloniex.js +55 -57
  22. package/dist/cjs/src/poloniexfutures.js +67 -70
  23. package/dist/cjs/src/pro/bingx.js +18 -11
  24. package/dist/cjs/src/pro/poloniexfutures.js +9 -0
  25. package/dist/cjs/src/probit.js +62 -65
  26. package/dist/cjs/src/timex.js +1 -5
  27. package/dist/cjs/src/upbit.js +56 -58
  28. package/dist/cjs/src/wazirx.js +72 -74
  29. package/dist/cjs/src/whitebit.js +88 -91
  30. package/dist/cjs/src/woo.js +75 -77
  31. package/dist/cjs/src/zaif.js +57 -71
  32. package/dist/cjs/src/zonda.js +67 -70
  33. package/js/ccxt.d.ts +5 -8
  34. package/js/ccxt.js +4 -6
  35. package/js/src/abstract/bitget.d.ts +495 -254
  36. package/js/src/abstract/bybit.d.ts +1 -0
  37. package/js/src/abstract/lbank.d.ts +57 -15
  38. package/js/src/abstract/p2b.d.ts +25 -0
  39. package/js/src/ace.d.ts +9 -8
  40. package/js/src/ace.js +56 -59
  41. package/js/src/alpaca.d.ts +5 -5
  42. package/js/src/ascendex.d.ts +17 -17
  43. package/js/src/ascendex.js +1 -2
  44. package/js/src/base/Exchange.d.ts +5 -5
  45. package/js/src/base/Exchange.js +11 -17
  46. package/js/src/base/types.d.ts +73 -68
  47. package/js/src/bigone.d.ts +12 -12
  48. package/js/src/binance.d.ts +37 -37
  49. package/js/src/bingx.d.ts +20 -20
  50. package/js/src/bingx.js +48 -8
  51. package/js/src/bit2c.d.ts +5 -5
  52. package/js/src/bitbank.d.ts +6 -6
  53. package/js/src/bitbns.d.ts +8 -8
  54. package/js/src/bitfinex.d.ts +11 -11
  55. package/js/src/bitfinex2.d.ts +15 -15
  56. package/js/src/bitflyer.d.ts +10 -10
  57. package/js/src/bitforex.d.ts +6 -6
  58. package/js/src/bitget.d.ts +28 -28
  59. package/js/src/bitget.js +670 -405
  60. package/js/src/bithumb.d.ts +5 -5
  61. package/js/src/bitmart.d.ts +23 -23
  62. package/js/src/bitmex.d.ts +19 -19
  63. package/js/src/bitopro.d.ts +15 -15
  64. package/js/src/bitpanda.d.ts +13 -13
  65. package/js/src/bitrue.d.ts +12 -12
  66. package/js/src/bitso.d.ts +13 -13
  67. package/js/src/bitstamp.d.ts +12 -12
  68. package/js/src/bitstamp1.d.ts +4 -4
  69. package/js/src/bittrex.d.ts +18 -18
  70. package/js/src/bitvavo.d.ts +11 -11
  71. package/js/src/bl3p.d.ts +2 -2
  72. package/js/src/blockchaincom.d.ts +14 -14
  73. package/js/src/btcalpha.d.ts +11 -11
  74. package/js/src/btcbox.d.ts +6 -6
  75. package/js/src/btcmarkets.d.ts +13 -13
  76. package/js/src/btcturk.d.ts +7 -7
  77. package/js/src/bybit.d.ts +33 -33
  78. package/js/src/bybit.js +2 -11
  79. package/js/src/cex.d.ts +7 -7
  80. package/js/src/coinbase.d.ts +21 -21
  81. package/js/src/coinbasepro.d.ts +14 -14
  82. package/js/src/coincheck.d.ts +6 -6
  83. package/js/src/coinex.d.ts +24 -24
  84. package/js/src/coinlist.d.ts +16 -16
  85. package/js/src/coinmate.d.ts +7 -7
  86. package/js/src/coinone.d.ts +6 -6
  87. package/js/src/coinsph.d.ts +11 -11
  88. package/js/src/coinspot.d.ts +4 -4
  89. package/js/src/cryptocom.d.ts +19 -19
  90. package/js/src/cryptocom.js +1 -0
  91. package/js/src/currencycom.d.ts +12 -12
  92. package/js/src/delta.d.ts +14 -14
  93. package/js/src/deribit.d.ts +16 -16
  94. package/js/src/digifinex.d.ts +22 -22
  95. package/js/src/digifinex.js +9 -6
  96. package/js/src/exmo.d.ts +15 -15
  97. package/js/src/gate.d.ts +25 -25
  98. package/js/src/gemini.d.ts +7 -7
  99. package/js/src/hitbtc.d.ts +20 -20
  100. package/js/src/hollaex.d.ts +16 -16
  101. package/js/src/htx.d.ts +34 -34
  102. package/js/src/huobijp.d.ts +18 -18
  103. package/js/src/idex.d.ts +14 -14
  104. package/js/src/independentreserve.d.ts +6 -6
  105. package/js/src/indodax.d.ts +7 -7
  106. package/js/src/kraken.d.ts +18 -18
  107. package/js/src/krakenfutures.d.ts +14 -14
  108. package/js/src/kucoin.d.ts +17 -17
  109. package/js/src/kucoinfutures.d.ts +12 -12
  110. package/js/src/kuna.d.ts +13 -13
  111. package/js/src/latoken.d.ts +10 -10
  112. package/js/src/lbank.d.ts +66 -13
  113. package/js/src/lbank.js +2334 -444
  114. package/js/src/lbank2.d.ts +11 -11
  115. package/js/src/luno.d.ts +11 -11
  116. package/js/src/lykke.d.ts +9 -9
  117. package/js/src/mercado.d.ts +6 -6
  118. package/js/src/mexc.d.ts +28 -28
  119. package/js/src/ndax.d.ts +13 -12
  120. package/js/src/ndax.js +59 -61
  121. package/js/src/novadax.d.ts +14 -13
  122. package/js/src/novadax.js +57 -59
  123. package/js/src/oceanex.d.ts +12 -11
  124. package/js/src/oceanex.js +58 -60
  125. package/js/src/okcoin.d.ts +13 -14
  126. package/js/src/okcoin.js +1 -9
  127. package/js/src/okx.d.ts +30 -31
  128. package/js/src/okx.js +0 -7
  129. package/js/src/p2b.d.ts +34 -0
  130. package/js/src/p2b.js +1246 -0
  131. package/js/src/paymium.d.ts +2 -2
  132. package/js/src/phemex.d.ts +19 -19
  133. package/js/src/poloniex.d.ts +17 -16
  134. package/js/src/poloniex.js +55 -57
  135. package/js/src/poloniexfutures.d.ts +13 -12
  136. package/js/src/poloniexfutures.js +67 -70
  137. package/js/src/pro/alpaca.d.ts +3 -3
  138. package/js/src/pro/ascendex.d.ts +2 -2
  139. package/js/src/pro/binance.d.ts +12 -12
  140. package/js/src/pro/bingx.d.ts +3 -3
  141. package/js/src/pro/bingx.js +19 -12
  142. package/js/src/pro/bitfinex.d.ts +3 -3
  143. package/js/src/pro/bitfinex2.d.ts +3 -3
  144. package/js/src/pro/bitget.d.ts +5 -5
  145. package/js/src/pro/bitmart.d.ts +2 -2
  146. package/js/src/pro/bitmex.d.ts +3 -3
  147. package/js/src/pro/bitpanda.d.ts +5 -5
  148. package/js/src/pro/bitrue.d.ts +2 -2
  149. package/js/src/pro/bitstamp.d.ts +2 -2
  150. package/js/src/pro/bittrex.d.ts +3 -3
  151. package/js/src/pro/bitvavo.d.ts +3 -3
  152. package/js/src/pro/blockchaincom.d.ts +2 -2
  153. package/js/src/pro/bybit.d.ts +7 -7
  154. package/js/src/pro/cex.d.ts +4 -4
  155. package/js/src/pro/coinbasepro.d.ts +6 -6
  156. package/js/src/pro/coinex.d.ts +3 -3
  157. package/js/src/pro/cryptocom.d.ts +7 -7
  158. package/js/src/pro/deribit.d.ts +3 -3
  159. package/js/src/pro/exmo.d.ts +2 -2
  160. package/js/src/pro/gate.d.ts +6 -6
  161. package/js/src/pro/gemini.d.ts +2 -2
  162. package/js/src/pro/hitbtc.d.ts +5 -5
  163. package/js/src/pro/hollaex.d.ts +3 -3
  164. package/js/src/pro/htx.d.ts +4 -4
  165. package/js/src/pro/idex.d.ts +3 -3
  166. package/js/src/pro/kraken.d.ts +8 -8
  167. package/js/src/pro/krakenfutures.d.ts +6 -6
  168. package/js/src/pro/kucoin.d.ts +4 -4
  169. package/js/src/pro/kucoinfutures.d.ts +3 -3
  170. package/js/src/pro/mexc.d.ts +3 -3
  171. package/js/src/pro/okcoin.d.ts +2 -2
  172. package/js/src/pro/okx.d.ts +9 -9
  173. package/js/src/pro/phemex.d.ts +3 -3
  174. package/js/src/pro/poloniex.d.ts +4 -4
  175. package/js/src/pro/poloniexfutures.d.ts +3 -3
  176. package/js/src/pro/poloniexfutures.js +9 -0
  177. package/js/src/pro/probit.d.ts +3 -3
  178. package/js/src/pro/wazirx.d.ts +4 -4
  179. package/js/src/pro/whitebit.d.ts +3 -3
  180. package/js/src/pro/woo.d.ts +3 -3
  181. package/js/src/probit.d.ts +13 -12
  182. package/js/src/probit.js +62 -65
  183. package/js/src/tidex.d.ts +7 -7
  184. package/js/src/timex.d.ts +11 -11
  185. package/js/src/timex.js +1 -5
  186. package/js/src/tokocrypto.d.ts +11 -11
  187. package/js/src/upbit.d.ts +13 -12
  188. package/js/src/upbit.js +56 -58
  189. package/js/src/wavesexchange.d.ts +10 -10
  190. package/js/src/wazirx.d.ts +8 -7
  191. package/js/src/wazirx.js +72 -74
  192. package/js/src/whitebit.d.ts +15 -14
  193. package/js/src/whitebit.js +88 -91
  194. package/js/src/woo.d.ts +22 -21
  195. package/js/src/woo.js +75 -77
  196. package/js/src/yobit.d.ts +7 -7
  197. package/js/src/zaif.d.ts +6 -5
  198. package/js/src/zaif.js +57 -71
  199. package/js/src/zonda.d.ts +8 -7
  200. package/js/src/zonda.js +67 -70
  201. package/package.json +1 -1
  202. package/skip-tests.json +7 -15
  203. package/test.ts +0 -0
  204. package/js/src/abstract/bitstamp1.d.ts +0 -26
  205. package/js/src/abstract/lbank2.d.ts +0 -64
  206. package/js/src/abstract/lbank2.js +0 -11
  207. /package/js/src/abstract/{bitstamp1.js → p2b.js} +0 -0
@@ -453,69 +453,67 @@ class ndax extends ndax$1 {
453
453
  // },
454
454
  // ]
455
455
  //
456
- const result = [];
457
- for (let i = 0; i < response.length; i++) {
458
- const market = response[i];
459
- const id = this.safeString(market, 'InstrumentId');
460
- // const lowercaseId = this.safeStringLower (market, 'symbol');
461
- const baseId = this.safeString(market, 'Product1');
462
- const quoteId = this.safeString(market, 'Product2');
463
- const base = this.safeCurrencyCode(this.safeString(market, 'Product1Symbol'));
464
- const quote = this.safeCurrencyCode(this.safeString(market, 'Product2Symbol'));
465
- const sessionStatus = this.safeString(market, 'SessionStatus');
466
- const isDisable = this.safeValue(market, 'IsDisable');
467
- const sessionRunning = (sessionStatus === 'Running');
468
- result.push({
469
- 'id': id,
470
- 'symbol': base + '/' + quote,
471
- 'base': base,
472
- 'quote': quote,
473
- 'settle': undefined,
474
- 'baseId': baseId,
475
- 'quoteId': quoteId,
476
- 'settleId': undefined,
477
- 'type': 'spot',
478
- 'spot': true,
479
- 'margin': false,
480
- 'swap': false,
481
- 'future': false,
482
- 'option': false,
483
- 'active': (sessionRunning && !isDisable),
484
- 'contract': false,
485
- 'linear': undefined,
486
- 'inverse': undefined,
487
- 'contractSize': undefined,
488
- 'expiry': undefined,
489
- 'expiryDatetime': undefined,
490
- 'strike': undefined,
491
- 'optionType': undefined,
492
- 'precision': {
493
- 'amount': this.safeNumber(market, 'QuantityIncrement'),
494
- 'price': this.safeNumber(market, 'PriceIncrement'),
456
+ return this.parseMarkets(response);
457
+ }
458
+ parseMarket(market) {
459
+ const id = this.safeString(market, 'InstrumentId');
460
+ // const lowercaseId = this.safeStringLower (market, 'symbol');
461
+ const baseId = this.safeString(market, 'Product1');
462
+ const quoteId = this.safeString(market, 'Product2');
463
+ const base = this.safeCurrencyCode(this.safeString(market, 'Product1Symbol'));
464
+ const quote = this.safeCurrencyCode(this.safeString(market, 'Product2Symbol'));
465
+ const sessionStatus = this.safeString(market, 'SessionStatus');
466
+ const isDisable = this.safeValue(market, 'IsDisable');
467
+ const sessionRunning = (sessionStatus === 'Running');
468
+ return {
469
+ 'id': id,
470
+ 'symbol': base + '/' + quote,
471
+ 'base': base,
472
+ 'quote': quote,
473
+ 'settle': undefined,
474
+ 'baseId': baseId,
475
+ 'quoteId': quoteId,
476
+ 'settleId': undefined,
477
+ 'type': 'spot',
478
+ 'spot': true,
479
+ 'margin': false,
480
+ 'swap': false,
481
+ 'future': false,
482
+ 'option': false,
483
+ 'active': (sessionRunning && !isDisable),
484
+ 'contract': false,
485
+ 'linear': undefined,
486
+ 'inverse': undefined,
487
+ 'contractSize': undefined,
488
+ 'expiry': undefined,
489
+ 'expiryDatetime': undefined,
490
+ 'strike': undefined,
491
+ 'optionType': undefined,
492
+ 'precision': {
493
+ 'amount': this.safeNumber(market, 'QuantityIncrement'),
494
+ 'price': this.safeNumber(market, 'PriceIncrement'),
495
+ },
496
+ 'limits': {
497
+ 'leverage': {
498
+ 'min': undefined,
499
+ 'max': undefined,
495
500
  },
496
- 'limits': {
497
- 'leverage': {
498
- 'min': undefined,
499
- 'max': undefined,
500
- },
501
- 'amount': {
502
- 'min': this.safeNumber(market, 'MinimumQuantity'),
503
- 'max': undefined,
504
- },
505
- 'price': {
506
- 'min': this.safeNumber(market, 'MinimumPrice'),
507
- 'max': undefined,
508
- },
509
- 'cost': {
510
- 'min': undefined,
511
- 'max': undefined,
512
- },
501
+ 'amount': {
502
+ 'min': this.safeNumber(market, 'MinimumQuantity'),
503
+ 'max': undefined,
513
504
  },
514
- 'created': undefined,
515
- 'info': market,
516
- });
517
- }
518
- return result;
505
+ 'price': {
506
+ 'min': this.safeNumber(market, 'MinimumPrice'),
507
+ 'max': undefined,
508
+ },
509
+ 'cost': {
510
+ 'min': undefined,
511
+ 'max': undefined,
512
+ },
513
+ },
514
+ 'created': undefined,
515
+ 'info': market,
516
+ };
519
517
  }
520
518
  parseOrderBook(orderbook, symbol, timestamp = undefined, bidsKey = 'bids', asksKey = 'asks', priceKey = 6, amountKey = 8) {
521
519
  let nonce = undefined;
@@ -243,68 +243,66 @@ class novadax extends novadax$1 {
243
243
  // "message":"Success"
244
244
  // }
245
245
  //
246
- const result = [];
247
246
  const data = this.safeValue(response, 'data', []);
248
- for (let i = 0; i < data.length; i++) {
249
- const market = data[i];
250
- const baseId = this.safeString(market, 'baseCurrency');
251
- const quoteId = this.safeString(market, 'quoteCurrency');
252
- const id = this.safeString(market, 'symbol');
253
- const base = this.safeCurrencyCode(baseId);
254
- const quote = this.safeCurrencyCode(quoteId);
255
- const status = this.safeString(market, 'status');
256
- result.push({
257
- 'id': id,
258
- 'symbol': base + '/' + quote,
259
- 'base': base,
260
- 'quote': quote,
261
- 'settle': undefined,
262
- 'baseId': baseId,
263
- 'quoteId': quoteId,
264
- 'settleId': undefined,
265
- 'type': 'spot',
266
- 'spot': true,
267
- 'margin': false,
268
- 'swap': false,
269
- 'future': false,
270
- 'option': false,
271
- 'active': (status === 'ONLINE'),
272
- 'contract': false,
273
- 'linear': undefined,
274
- 'inverse': undefined,
275
- 'contractSize': undefined,
276
- 'expiry': undefined,
277
- 'expiryDatetime': undefined,
278
- 'strike': undefined,
279
- 'optionType': undefined,
280
- 'precision': {
281
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amountPrecision'))),
282
- 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'pricePrecision'))),
283
- 'cost': this.parseNumber(this.parsePrecision(this.safeString(market, 'valuePrecision'))),
247
+ return this.parseMarkets(data);
248
+ }
249
+ parseMarket(market) {
250
+ const baseId = this.safeString(market, 'baseCurrency');
251
+ const quoteId = this.safeString(market, 'quoteCurrency');
252
+ const id = this.safeString(market, 'symbol');
253
+ const base = this.safeCurrencyCode(baseId);
254
+ const quote = this.safeCurrencyCode(quoteId);
255
+ const status = this.safeString(market, 'status');
256
+ return {
257
+ 'id': id,
258
+ 'symbol': base + '/' + quote,
259
+ 'base': base,
260
+ 'quote': quote,
261
+ 'settle': undefined,
262
+ 'baseId': baseId,
263
+ 'quoteId': quoteId,
264
+ 'settleId': undefined,
265
+ 'type': 'spot',
266
+ 'spot': true,
267
+ 'margin': false,
268
+ 'swap': false,
269
+ 'future': false,
270
+ 'option': false,
271
+ 'active': (status === 'ONLINE'),
272
+ 'contract': false,
273
+ 'linear': undefined,
274
+ 'inverse': undefined,
275
+ 'contractSize': undefined,
276
+ 'expiry': undefined,
277
+ 'expiryDatetime': undefined,
278
+ 'strike': undefined,
279
+ 'optionType': undefined,
280
+ 'precision': {
281
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amountPrecision'))),
282
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'pricePrecision'))),
283
+ // 'cost': this.parseNumber (this.parsePrecision (this.safeString (market, 'valuePrecision'))),
284
+ },
285
+ 'limits': {
286
+ 'leverage': {
287
+ 'min': undefined,
288
+ 'max': undefined,
284
289
  },
285
- 'limits': {
286
- 'leverage': {
287
- 'min': undefined,
288
- 'max': undefined,
289
- },
290
- 'amount': {
291
- 'min': this.safeNumber(market, 'minOrderAmount'),
292
- 'max': undefined,
293
- },
294
- 'price': {
295
- 'min': undefined,
296
- 'max': undefined,
297
- },
298
- 'cost': {
299
- 'min': this.safeNumber(market, 'minOrderValue'),
300
- 'max': undefined,
301
- },
290
+ 'amount': {
291
+ 'min': this.safeNumber(market, 'minOrderAmount'),
292
+ 'max': undefined,
302
293
  },
303
- 'created': undefined,
304
- 'info': market,
305
- });
306
- }
307
- return result;
294
+ 'price': {
295
+ 'min': undefined,
296
+ 'max': undefined,
297
+ },
298
+ 'cost': {
299
+ 'min': this.safeNumber(market, 'minOrderValue'),
300
+ 'max': undefined,
301
+ },
302
+ },
303
+ 'created': undefined,
304
+ 'info': market,
305
+ };
308
306
  }
309
307
  parseTicker(ticker, market = undefined) {
310
308
  //
@@ -169,69 +169,67 @@ class oceanex extends oceanex$1 {
169
169
  // "minimum_trading_amount": "1.0"
170
170
  // },
171
171
  //
172
- const result = [];
173
172
  const markets = this.safeValue(response, 'data', []);
174
- for (let i = 0; i < markets.length; i++) {
175
- const market = markets[i];
176
- const id = this.safeValue(market, 'id');
177
- const name = this.safeValue(market, 'name');
178
- let [baseId, quoteId] = name.split('/');
179
- const base = this.safeCurrencyCode(baseId);
180
- const quote = this.safeCurrencyCode(quoteId);
181
- baseId = baseId.toLowerCase();
182
- quoteId = quoteId.toLowerCase();
183
- const symbol = base + '/' + quote;
184
- result.push({
185
- 'id': id,
186
- 'symbol': symbol,
187
- 'base': base,
188
- 'quote': quote,
189
- 'settle': undefined,
190
- 'baseId': baseId,
191
- 'quoteId': quoteId,
192
- 'settleId': undefined,
193
- 'type': 'spot',
194
- 'spot': true,
195
- 'margin': false,
196
- 'swap': false,
197
- 'future': false,
198
- 'option': false,
199
- 'active': undefined,
200
- 'contract': false,
201
- 'linear': undefined,
202
- 'inverse': undefined,
203
- 'contractSize': undefined,
204
- 'expiry': undefined,
205
- 'expiryDatetime': undefined,
206
- 'strike': undefined,
207
- 'optionType': undefined,
208
- 'precision': {
209
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
210
- 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'price_precision'))),
173
+ return this.parseMarkets(markets);
174
+ }
175
+ parseMarket(market) {
176
+ const id = this.safeValue(market, 'id');
177
+ const name = this.safeValue(market, 'name');
178
+ let [baseId, quoteId] = name.split('/');
179
+ const base = this.safeCurrencyCode(baseId);
180
+ const quote = this.safeCurrencyCode(quoteId);
181
+ baseId = baseId.toLowerCase();
182
+ quoteId = quoteId.toLowerCase();
183
+ const symbol = base + '/' + quote;
184
+ return {
185
+ 'id': id,
186
+ 'symbol': symbol,
187
+ 'base': base,
188
+ 'quote': quote,
189
+ 'settle': undefined,
190
+ 'baseId': baseId,
191
+ 'quoteId': quoteId,
192
+ 'settleId': undefined,
193
+ 'type': 'spot',
194
+ 'spot': true,
195
+ 'margin': false,
196
+ 'swap': false,
197
+ 'future': false,
198
+ 'option': false,
199
+ 'active': undefined,
200
+ 'contract': false,
201
+ 'linear': undefined,
202
+ 'inverse': undefined,
203
+ 'contractSize': undefined,
204
+ 'expiry': undefined,
205
+ 'expiryDatetime': undefined,
206
+ 'strike': undefined,
207
+ 'optionType': undefined,
208
+ 'precision': {
209
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
210
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'price_precision'))),
211
+ },
212
+ 'limits': {
213
+ 'leverage': {
214
+ 'min': undefined,
215
+ 'max': undefined,
211
216
  },
212
- 'limits': {
213
- 'leverage': {
214
- 'min': undefined,
215
- 'max': undefined,
216
- },
217
- 'amount': {
218
- 'min': undefined,
219
- 'max': undefined,
220
- },
221
- 'price': {
222
- 'min': undefined,
223
- 'max': undefined,
224
- },
225
- 'cost': {
226
- 'min': this.safeNumber(market, 'minimum_trading_amount'),
227
- 'max': undefined,
228
- },
217
+ 'amount': {
218
+ 'min': undefined,
219
+ 'max': undefined,
229
220
  },
230
- 'created': undefined,
231
- 'info': market,
232
- });
233
- }
234
- return result;
221
+ 'price': {
222
+ 'min': undefined,
223
+ 'max': undefined,
224
+ },
225
+ 'cost': {
226
+ 'min': this.safeNumber(market, 'minimum_trading_amount'),
227
+ 'max': undefined,
228
+ },
229
+ },
230
+ 'created': undefined,
231
+ 'info': market,
232
+ };
235
233
  }
236
234
  async fetchTicker(symbol, params = {}) {
237
235
  /**
@@ -582,15 +582,7 @@ class okcoin extends okcoin$1 {
582
582
  };
583
583
  const response = await this.publicGetPublicInstruments(this.extend(request, params));
584
584
  const markets = this.safeValue(response, 'data', []);
585
- const result = this.parseMarkets(markets);
586
- return result;
587
- }
588
- parseMarkets(markets) {
589
- const result = [];
590
- for (let i = 0; i < markets.length; i++) {
591
- result.push(this.parseMarket(markets[i]));
592
- }
593
- return result;
585
+ return this.parseMarkets(markets);
594
586
  }
595
587
  parseMarket(market) {
596
588
  //
@@ -1291,13 +1291,6 @@ class okx extends okx$1 {
1291
1291
  }
1292
1292
  return result;
1293
1293
  }
1294
- parseMarkets(markets) {
1295
- const result = [];
1296
- for (let i = 0; i < markets.length; i++) {
1297
- result.push(this.parseMarket(markets[i]));
1298
- }
1299
- return result;
1300
- }
1301
1294
  parseMarket(market) {
1302
1295
  //
1303
1296
  // {