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
package/dist/cjs/ccxt.js CHANGED
@@ -48,7 +48,6 @@ var blockchaincom = require('./src/blockchaincom.js');
48
48
  var btcalpha = require('./src/btcalpha.js');
49
49
  var btcbox = require('./src/btcbox.js');
50
50
  var btcmarkets = require('./src/btcmarkets.js');
51
- var btctradeua = require('./src/btctradeua.js');
52
51
  var btcturk = require('./src/btcturk.js');
53
52
  var bybit = require('./src/bybit.js');
54
53
  var cex = require('./src/cex.js');
@@ -57,7 +56,6 @@ var coinbaseprime = require('./src/coinbaseprime.js');
57
56
  var coinbasepro = require('./src/coinbasepro.js');
58
57
  var coincheck = require('./src/coincheck.js');
59
58
  var coinex = require('./src/coinex.js');
60
- var coinfalcon = require('./src/coinfalcon.js');
61
59
  var coinlist = require('./src/coinlist.js');
62
60
  var coinmate = require('./src/coinmate.js');
63
61
  var coinone = require('./src/coinone.js');
@@ -183,7 +181,7 @@ var woo$1 = require('./src/pro/woo.js');
183
181
 
184
182
  //-----------------------------------------------------------------------------
185
183
  // this is updated by vss.js when building
186
- const version = '4.1.51';
184
+ const version = '4.1.52';
187
185
  Exchange["default"].ccxtVersion = version;
188
186
  const exchanges = {
189
187
  'ace': ace,
@@ -222,7 +220,6 @@ const exchanges = {
222
220
  'btcalpha': btcalpha,
223
221
  'btcbox': btcbox,
224
222
  'btcmarkets': btcmarkets,
225
- 'btctradeua': btctradeua,
226
223
  'btcturk': btcturk,
227
224
  'bybit': bybit,
228
225
  'cex': cex,
@@ -231,7 +228,6 @@ const exchanges = {
231
228
  'coinbasepro': coinbasepro,
232
229
  'coincheck': coincheck,
233
230
  'coinex': coinex,
234
- 'coinfalcon': coinfalcon,
235
231
  'coinlist': coinlist,
236
232
  'coinmate': coinmate,
237
233
  'coinone': coinone,
@@ -434,7 +430,6 @@ exports.blockchaincom = blockchaincom;
434
430
  exports.btcalpha = btcalpha;
435
431
  exports.btcbox = btcbox;
436
432
  exports.btcmarkets = btcmarkets;
437
- exports.btctradeua = btctradeua;
438
433
  exports.btcturk = btcturk;
439
434
  exports.bybit = bybit;
440
435
  exports.cex = cex;
@@ -443,7 +438,6 @@ exports.coinbaseprime = coinbaseprime;
443
438
  exports.coinbasepro = coinbasepro;
444
439
  exports.coincheck = coincheck;
445
440
  exports.coinex = coinex;
446
- exports.coinfalcon = coinfalcon;
447
441
  exports.coinlist = coinlist;
448
442
  exports.coinmate = coinmate;
449
443
  exports.coinone = coinone;
@@ -245,72 +245,70 @@ class alpaca extends alpaca$1 {
245
245
  // }
246
246
  // ]
247
247
  //
248
- const markets = [];
249
- for (let i = 0; i < assets.length; i++) {
250
- const asset = assets[i];
251
- const marketId = this.safeString(asset, 'symbol');
252
- const parts = marketId.split('/');
253
- const baseId = this.safeString(parts, 0);
254
- const quoteId = this.safeString(parts, 1);
255
- const base = this.safeCurrencyCode(baseId);
256
- const quote = this.safeCurrencyCode(quoteId);
257
- const symbol = base + '/' + quote;
258
- const status = this.safeString(asset, 'status');
259
- const active = (status === 'active');
260
- const minAmount = this.safeNumber(asset, 'min_order_size');
261
- const amount = this.safeNumber(asset, 'min_trade_increment');
262
- const price = this.safeNumber(asset, 'price_increment');
263
- markets.push({
264
- 'id': marketId,
265
- 'symbol': symbol,
266
- 'base': base,
267
- 'quote': quote,
268
- 'settle': undefined,
269
- 'baseId': baseId,
270
- 'quoteId': quoteId,
271
- 'settleId': undefined,
272
- 'type': 'spot',
273
- 'spot': true,
274
- 'margin': undefined,
275
- 'swap': false,
276
- 'future': false,
277
- 'option': false,
278
- 'active': active,
279
- 'contract': false,
280
- 'linear': undefined,
281
- 'inverse': undefined,
282
- 'contractSize': undefined,
283
- 'expiry': undefined,
284
- 'expiryDatetime': undefined,
285
- 'strike': undefined,
286
- 'optionType': undefined,
287
- 'precision': {
288
- 'amount': amount,
289
- 'price': price,
248
+ return this.parseMarkets(assets);
249
+ }
250
+ parseMarket(asset) {
251
+ const marketId = this.safeString(asset, 'symbol');
252
+ const parts = marketId.split('/');
253
+ const baseId = this.safeString(parts, 0);
254
+ const quoteId = this.safeString(parts, 1);
255
+ const base = this.safeCurrencyCode(baseId);
256
+ const quote = this.safeCurrencyCode(quoteId);
257
+ const symbol = base + '/' + quote;
258
+ const status = this.safeString(asset, 'status');
259
+ const active = (status === 'active');
260
+ const minAmount = this.safeNumber(asset, 'min_order_size');
261
+ const amount = this.safeNumber(asset, 'min_trade_increment');
262
+ const price = this.safeNumber(asset, 'price_increment');
263
+ return {
264
+ 'id': marketId,
265
+ 'symbol': symbol,
266
+ 'base': base,
267
+ 'quote': quote,
268
+ 'settle': undefined,
269
+ 'baseId': baseId,
270
+ 'quoteId': quoteId,
271
+ 'settleId': undefined,
272
+ 'type': 'spot',
273
+ 'spot': true,
274
+ 'margin': undefined,
275
+ 'swap': false,
276
+ 'future': false,
277
+ 'option': false,
278
+ 'active': active,
279
+ 'contract': false,
280
+ 'linear': undefined,
281
+ 'inverse': undefined,
282
+ 'contractSize': undefined,
283
+ 'expiry': undefined,
284
+ 'expiryDatetime': undefined,
285
+ 'strike': undefined,
286
+ 'optionType': undefined,
287
+ 'precision': {
288
+ 'amount': amount,
289
+ 'price': price,
290
+ },
291
+ 'limits': {
292
+ 'leverage': {
293
+ 'min': undefined,
294
+ 'max': undefined,
290
295
  },
291
- 'limits': {
292
- 'leverage': {
293
- 'min': undefined,
294
- 'max': undefined,
295
- },
296
- 'amount': {
297
- 'min': minAmount,
298
- 'max': undefined,
299
- },
300
- 'price': {
301
- 'min': undefined,
302
- 'max': undefined,
303
- },
304
- 'cost': {
305
- 'min': undefined,
306
- 'max': undefined,
307
- },
296
+ 'amount': {
297
+ 'min': minAmount,
298
+ 'max': undefined,
308
299
  },
309
- 'created': undefined,
310
- 'info': asset,
311
- });
312
- }
313
- return markets;
300
+ 'price': {
301
+ 'min': undefined,
302
+ 'max': undefined,
303
+ },
304
+ 'cost': {
305
+ 'min': undefined,
306
+ 'max': undefined,
307
+ },
308
+ },
309
+ 'created': undefined,
310
+ 'info': asset,
311
+ };
314
312
  }
315
313
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
316
314
  /**
@@ -1696,7 +1696,8 @@ class ascendex extends ascendex$1 {
1696
1696
  }
1697
1697
  }
1698
1698
  }
1699
- const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
1699
+ let orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
1700
+ orderRequest = this.omit(orderRequest, 'marginMode');
1700
1701
  ordersRequests.push(orderRequest);
1701
1702
  }
1702
1703
  const market = this.market(symbol);
@@ -2612,6 +2613,7 @@ class ascendex extends ascendex$1 {
2612
2613
  'cost': this.parseNumber(feeCostString),
2613
2614
  'rate': undefined,
2614
2615
  },
2616
+ 'internal': false,
2615
2617
  };
2616
2618
  }
2617
2619
  async fetchPositions(symbols = undefined, params = {}) {
@@ -1376,6 +1376,16 @@ class Exchange {
1376
1376
  async fetchTradingLimits(symbols = undefined, params = {}) {
1377
1377
  throw new errors.NotSupported(this.id + ' fetchTradingLimits() is not supported yet');
1378
1378
  }
1379
+ parseMarket(market) {
1380
+ throw new errors.NotSupported(this.id + ' parseMarket() is not supported yet');
1381
+ }
1382
+ parseMarkets(markets) {
1383
+ const result = [];
1384
+ for (let i = 0; i < markets.length; i++) {
1385
+ result.push(this.parseMarket(markets[i]));
1386
+ }
1387
+ return result;
1388
+ }
1379
1389
  parseTicker(ticker, market = undefined) {
1380
1390
  throw new errors.NotSupported(this.id + ' parseTicker() is not supported yet');
1381
1391
  }
@@ -509,85 +509,65 @@ class bigone extends bigone$1 {
509
509
  // }
510
510
  //
511
511
  const markets = this.safeValue(response, 'data', []);
512
- const result = [];
513
- for (let i = 0; i < markets.length; i++) {
514
- const market = markets[i];
515
- const id = this.safeString(market, 'name');
516
- const uuid = this.safeString(market, 'id');
517
- const baseAsset = this.safeValue(market, 'base_asset', {});
518
- const quoteAsset = this.safeValue(market, 'quote_asset', {});
519
- const baseId = this.safeString(baseAsset, 'symbol');
520
- const quoteId = this.safeString(quoteAsset, 'symbol');
521
- const base = this.safeCurrencyCode(baseId);
522
- const quote = this.safeCurrencyCode(quoteId);
523
- const entry = {
524
- 'id': id,
525
- 'uuid': uuid,
526
- 'symbol': base + '/' + quote,
527
- 'base': base,
528
- 'quote': quote,
529
- 'settle': undefined,
530
- 'baseId': baseId,
531
- 'quoteId': quoteId,
532
- 'settleId': undefined,
533
- 'type': 'spot',
534
- 'spot': true,
535
- 'margin': false,
536
- 'swap': false,
537
- 'future': false,
538
- 'option': false,
539
- 'active': true,
540
- 'contract': false,
541
- 'linear': undefined,
542
- 'inverse': undefined,
543
- 'contractSize': undefined,
544
- 'expiry': undefined,
545
- 'expiryDatetime': undefined,
546
- 'strike': undefined,
547
- 'optionType': undefined,
548
- 'precision': {
549
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'base_scale'))),
550
- 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'quote_scale'))),
512
+ return this.parseMarkets(markets);
513
+ }
514
+ parseMarket(market) {
515
+ const id = this.safeString(market, 'name');
516
+ const baseAsset = this.safeValue(market, 'base_asset', {});
517
+ const quoteAsset = this.safeValue(market, 'quote_asset', {});
518
+ const baseId = this.safeString(baseAsset, 'symbol');
519
+ const quoteId = this.safeString(quoteAsset, 'symbol');
520
+ const base = this.safeCurrencyCode(baseId);
521
+ const quote = this.safeCurrencyCode(quoteId);
522
+ return {
523
+ 'id': id,
524
+ 'symbol': base + '/' + quote,
525
+ 'base': base,
526
+ 'quote': quote,
527
+ 'settle': undefined,
528
+ 'baseId': baseId,
529
+ 'quoteId': quoteId,
530
+ 'settleId': undefined,
531
+ 'type': 'spot',
532
+ 'spot': true,
533
+ 'margin': false,
534
+ 'swap': false,
535
+ 'future': false,
536
+ 'option': false,
537
+ 'active': true,
538
+ 'contract': false,
539
+ 'linear': undefined,
540
+ 'inverse': undefined,
541
+ 'contractSize': undefined,
542
+ 'expiry': undefined,
543
+ 'expiryDatetime': undefined,
544
+ 'strike': undefined,
545
+ 'optionType': undefined,
546
+ 'precision': {
547
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'base_scale'))),
548
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'quote_scale'))),
549
+ },
550
+ 'limits': {
551
+ 'leverage': {
552
+ 'min': undefined,
553
+ 'max': undefined,
551
554
  },
552
- 'limits': {
553
- 'leverage': {
554
- 'min': undefined,
555
- 'max': undefined,
556
- },
557
- 'amount': {
558
- 'min': undefined,
559
- 'max': undefined,
560
- },
561
- 'price': {
562
- 'min': undefined,
563
- 'max': undefined,
564
- },
565
- 'cost': {
566
- 'min': this.safeNumber(market, 'min_quote_value'),
567
- 'max': this.safeNumber(market, 'max_quote_value'),
568
- },
555
+ 'amount': {
556
+ 'min': undefined,
557
+ 'max': undefined,
569
558
  },
570
- 'created': undefined,
571
- 'info': market,
572
- };
573
- result.push(entry);
574
- }
575
- return result;
576
- }
577
- async loadMarkets(reload = false, params = {}) {
578
- const markets = await super.loadMarkets(reload, params);
579
- let marketsByUuid = this.safeValue(this.options, 'marketsByUuid');
580
- if ((marketsByUuid === undefined) || reload) {
581
- marketsByUuid = {};
582
- for (let i = 0; i < this.symbols.length; i++) {
583
- const symbol = this.symbols[i];
584
- const market = this.markets[symbol];
585
- const uuid = this.safeString(market, 'uuid');
586
- marketsByUuid[uuid] = market;
587
- }
588
- this.options['marketsByUuid'] = marketsByUuid;
589
- }
590
- return markets;
559
+ 'price': {
560
+ 'min': undefined,
561
+ 'max': undefined,
562
+ },
563
+ 'cost': {
564
+ 'min': this.safeNumber(market, 'min_quote_value'),
565
+ 'max': this.safeNumber(market, 'max_quote_value'),
566
+ },
567
+ },
568
+ 'created': undefined,
569
+ 'info': market,
570
+ };
591
571
  }
592
572
  parseTicker(ticker, market = undefined) {
593
573
  //
@@ -1656,6 +1636,7 @@ class bigone extends bigone$1 {
1656
1636
  const address = this.safeString(transaction, 'target_address');
1657
1637
  const tag = this.safeString(transaction, 'memo');
1658
1638
  const type = ('customer_id' in transaction) ? 'withdrawal' : 'deposit';
1639
+ const internal = this.safeValue(transaction, 'is_internal');
1659
1640
  return {
1660
1641
  'info': transaction,
1661
1642
  'id': id,
@@ -1675,6 +1656,8 @@ class bigone extends bigone$1 {
1675
1656
  'status': status,
1676
1657
  'updated': updated,
1677
1658
  'fee': undefined,
1659
+ 'comment': undefined,
1660
+ 'internal': internal,
1678
1661
  };
1679
1662
  }
1680
1663
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -5961,6 +5961,7 @@ class binance extends binance$1 {
5961
5961
  'status': status,
5962
5962
  'updated': updated,
5963
5963
  'internal': internal,
5964
+ 'comment': undefined,
5964
5965
  'fee': fee,
5965
5966
  };
5966
5967
  }
@@ -496,13 +496,9 @@ class bingx extends bingx$1 {
496
496
  // }
497
497
  // }
498
498
  //
499
- const result = [];
500
499
  const data = this.safeValue(response, 'data');
501
500
  const markets = this.safeValue(data, 'symbols', []);
502
- for (let i = 0; i < markets.length; i++) {
503
- result.push(this.parseMarket(markets[i]));
504
- }
505
- return result;
501
+ return this.parseMarkets(markets);
506
502
  }
507
503
  async fetchSwapMarkets(params) {
508
504
  const response = await this.swapV2PublicGetQuoteContracts(params);
@@ -529,12 +525,8 @@ class bingx extends bingx$1 {
529
525
  // ]
530
526
  // }
531
527
  //
532
- const result = [];
533
- const markets = this.safeValue(response, 'data');
534
- for (let i = 0; i < markets.length; i++) {
535
- result.push(this.parseMarket(markets[i]));
536
- }
537
- return result;
528
+ const markets = this.safeValue(response, 'data', []);
529
+ return this.parseMarkets(markets);
538
530
  }
539
531
  parseMarket(market) {
540
532
  const id = this.safeString(market, 'symbol');
@@ -2853,6 +2845,7 @@ class bingx extends bingx$1 {
2853
2845
  'cost': this.safeNumber(transaction, 'transactionFee'),
2854
2846
  'rate': undefined,
2855
2847
  },
2848
+ 'internal': undefined,
2856
2849
  };
2857
2850
  }
2858
2851
  parseTransactionStatus(status) {
@@ -190,67 +190,65 @@ class bitbank extends bitbank$1 {
190
190
  //
191
191
  const data = this.safeValue(response, 'data');
192
192
  const pairs = this.safeValue(data, 'pairs', []);
193
- const result = [];
194
- for (let i = 0; i < pairs.length; i++) {
195
- const entry = pairs[i];
196
- const id = this.safeString(entry, 'name');
197
- const baseId = this.safeString(entry, 'base_asset');
198
- const quoteId = this.safeString(entry, 'quote_asset');
199
- const base = this.safeCurrencyCode(baseId);
200
- const quote = this.safeCurrencyCode(quoteId);
201
- result.push({
202
- 'id': id,
203
- 'symbol': base + '/' + quote,
204
- 'base': base,
205
- 'quote': quote,
206
- 'settle': undefined,
207
- 'baseId': baseId,
208
- 'quoteId': quoteId,
209
- 'settleId': undefined,
210
- 'type': 'spot',
211
- 'spot': true,
212
- 'margin': false,
213
- 'swap': false,
214
- 'future': false,
215
- 'option': false,
216
- 'active': this.safeValue(entry, 'is_enabled'),
217
- 'contract': false,
218
- 'linear': undefined,
219
- 'inverse': undefined,
220
- 'taker': this.safeNumber(entry, 'taker_fee_rate_quote'),
221
- 'maker': this.safeNumber(entry, 'maker_fee_rate_quote'),
222
- 'contractSize': undefined,
223
- 'expiry': undefined,
224
- 'expiryDatetime': undefined,
225
- 'strike': undefined,
226
- 'optionType': undefined,
227
- 'precision': {
228
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'amount_digits'))),
229
- 'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'price_digits'))),
193
+ return this.parseMarkets(pairs);
194
+ }
195
+ parseMarket(entry) {
196
+ const id = this.safeString(entry, 'name');
197
+ const baseId = this.safeString(entry, 'base_asset');
198
+ const quoteId = this.safeString(entry, 'quote_asset');
199
+ const base = this.safeCurrencyCode(baseId);
200
+ const quote = this.safeCurrencyCode(quoteId);
201
+ return {
202
+ 'id': id,
203
+ 'symbol': base + '/' + quote,
204
+ 'base': base,
205
+ 'quote': quote,
206
+ 'settle': undefined,
207
+ 'baseId': baseId,
208
+ 'quoteId': quoteId,
209
+ 'settleId': undefined,
210
+ 'type': 'spot',
211
+ 'spot': true,
212
+ 'margin': false,
213
+ 'swap': false,
214
+ 'future': false,
215
+ 'option': false,
216
+ 'active': this.safeValue(entry, 'is_enabled'),
217
+ 'contract': false,
218
+ 'linear': undefined,
219
+ 'inverse': undefined,
220
+ 'taker': this.safeNumber(entry, 'taker_fee_rate_quote'),
221
+ 'maker': this.safeNumber(entry, 'maker_fee_rate_quote'),
222
+ 'contractSize': undefined,
223
+ 'expiry': undefined,
224
+ 'expiryDatetime': undefined,
225
+ 'strike': undefined,
226
+ 'optionType': undefined,
227
+ 'precision': {
228
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'amount_digits'))),
229
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'price_digits'))),
230
+ },
231
+ 'limits': {
232
+ 'leverage': {
233
+ 'min': undefined,
234
+ 'max': undefined,
230
235
  },
231
- 'limits': {
232
- 'leverage': {
233
- 'min': undefined,
234
- 'max': undefined,
235
- },
236
- 'amount': {
237
- 'min': this.safeNumber(entry, 'unit_amount'),
238
- 'max': this.safeNumber(entry, 'limit_max_amount'),
239
- },
240
- 'price': {
241
- 'min': undefined,
242
- 'max': undefined,
243
- },
244
- 'cost': {
245
- 'min': undefined,
246
- 'max': undefined,
247
- },
236
+ 'amount': {
237
+ 'min': this.safeNumber(entry, 'unit_amount'),
238
+ 'max': this.safeNumber(entry, 'limit_max_amount'),
248
239
  },
249
- 'created': undefined,
250
- 'info': entry,
251
- });
252
- }
253
- return result;
240
+ 'price': {
241
+ 'min': undefined,
242
+ 'max': undefined,
243
+ },
244
+ 'cost': {
245
+ 'min': undefined,
246
+ 'max': undefined,
247
+ },
248
+ },
249
+ 'created': undefined,
250
+ 'info': entry,
251
+ };
254
252
  }
255
253
  parseTicker(ticker, market = undefined) {
256
254
  const symbol = this.safeSymbol(undefined, market);
@@ -868,6 +866,7 @@ class bitbank extends bitbank$1 {
868
866
  'tag': undefined,
869
867
  'tagTo': undefined,
870
868
  'comment': undefined,
869
+ 'internal': undefined,
871
870
  'fee': undefined,
872
871
  'info': transaction,
873
872
  };
@@ -1101,6 +1101,7 @@ class bitbns extends bitbns$1 {
1101
1101
  'currency': code,
1102
1102
  'status': status,
1103
1103
  'updated': undefined,
1104
+ 'comment': undefined,
1104
1105
  'internal': undefined,
1105
1106
  'fee': fee,
1106
1107
  };
@@ -1501,6 +1501,7 @@ class bitfinex extends bitfinex$1 {
1501
1501
  'tagTo': undefined,
1502
1502
  'updated': this.safeTimestamp(transaction, 'timestamp'),
1503
1503
  'comment': undefined,
1504
+ 'internal': undefined,
1504
1505
  'fee': {
1505
1506
  'currency': code,
1506
1507
  'cost': this.parseNumber(feeCost),
@@ -2169,6 +2169,7 @@ class bitfinex2 extends bitfinex2$1 {
2169
2169
  'tagTo': tag,
2170
2170
  'updated': updated,
2171
2171
  'comment': comment,
2172
+ 'internal': undefined,
2172
2173
  'fee': {
2173
2174
  'currency': code,
2174
2175
  'cost': this.parseNumber(feeCost),
@@ -995,6 +995,7 @@ class bitflyer extends bitflyer$1 {
995
995
  'currency': code,
996
996
  'status': status,
997
997
  'updated': undefined,
998
+ 'comment': undefined,
998
999
  'internal': undefined,
999
1000
  'fee': fee,
1000
1001
  };
@@ -822,6 +822,7 @@ class bitget extends bitget$1 {
822
822
  '40017': errors.ExchangeError,
823
823
  '40018': errors.PermissionDenied,
824
824
  '40019': errors.BadRequest,
825
+ '40031': errors.AccountSuspended,
825
826
  '40037': errors.AuthenticationError,
826
827
  '40102': errors.BadRequest,
827
828
  '40103': errors.BadRequest,
@@ -1130,13 +1131,6 @@ class bitget extends bitget$1 {
1130
1131
  }
1131
1132
  return result;
1132
1133
  }
1133
- parseMarkets(markets) {
1134
- const result = [];
1135
- for (let i = 0; i < markets.length; i++) {
1136
- result.push(this.parseMarket(markets[i]));
1137
- }
1138
- return result;
1139
- }
1140
1134
  parseMarket(market) {
1141
1135
  //
1142
1136
  // spot
@@ -1932,6 +1926,7 @@ class bitget extends bitget$1 {
1932
1926
  'tag': tag,
1933
1927
  'tagTo': tag,
1934
1928
  'comment': undefined,
1929
+ 'internal': undefined,
1935
1930
  'fee': fee,
1936
1931
  };
1937
1932
  }
@@ -3466,7 +3461,7 @@ class bitget extends bitget$1 {
3466
3461
  const amount = this.safeValue(rawOrder, 'amount');
3467
3462
  const price = this.safeValue(rawOrder, 'price');
3468
3463
  const orderParams = this.safeValue(rawOrder, 'params', {});
3469
- const marginResult = this.handleMarginModeAndParams('createOrders', params);
3464
+ const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
3470
3465
  const currentMarginMode = marginResult[0];
3471
3466
  if (currentMarginMode !== undefined) {
3472
3467
  if (marginMode === undefined) {