ccxt 4.1.74 → 4.1.76

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 (140) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +620 -342
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/ace.js +2 -0
  6. package/dist/cjs/src/alpaca.js +2 -0
  7. package/dist/cjs/src/base/Exchange.js +14 -2
  8. package/dist/cjs/src/base/errors.js +7 -7
  9. package/dist/cjs/src/base/ws/Client.js +13 -14
  10. package/dist/cjs/src/bigone.js +38 -9
  11. package/dist/cjs/src/binance.js +4 -0
  12. package/dist/cjs/src/binanceus.js +2 -0
  13. package/dist/cjs/src/bingx.js +134 -40
  14. package/dist/cjs/src/bit2c.js +2 -0
  15. package/dist/cjs/src/bitbank.js +2 -0
  16. package/dist/cjs/src/bithumb.js +2 -0
  17. package/dist/cjs/src/bitmart.js +33 -11
  18. package/dist/cjs/src/bitopro.js +2 -0
  19. package/dist/cjs/src/bitpanda.js +2 -0
  20. package/dist/cjs/src/bitso.js +2 -0
  21. package/dist/cjs/src/bitstamp.js +2 -0
  22. package/dist/cjs/src/bittrex.js +2 -0
  23. package/dist/cjs/src/bitvavo.js +2 -0
  24. package/dist/cjs/src/bl3p.js +2 -0
  25. package/dist/cjs/src/btcalpha.js +2 -0
  26. package/dist/cjs/src/btcbox.js +2 -0
  27. package/dist/cjs/src/btcmarkets.js +2 -0
  28. package/dist/cjs/src/btcturk.js +2 -0
  29. package/dist/cjs/src/bybit.js +2 -0
  30. package/dist/cjs/src/coinbase.js +2 -0
  31. package/dist/cjs/src/coincheck.js +2 -0
  32. package/dist/cjs/src/coinlist.js +2 -0
  33. package/dist/cjs/src/coinmate.js +2 -0
  34. package/dist/cjs/src/coinone.js +2 -0
  35. package/dist/cjs/src/coinsph.js +2 -0
  36. package/dist/cjs/src/coinspot.js +2 -0
  37. package/dist/cjs/src/cryptocom.js +2 -185
  38. package/dist/cjs/src/gate.js +1 -0
  39. package/dist/cjs/src/gemini.js +23 -19
  40. package/dist/cjs/src/idex.js +2 -0
  41. package/dist/cjs/src/independentreserve.js +2 -0
  42. package/dist/cjs/src/indodax.js +2 -0
  43. package/dist/cjs/src/kraken.js +154 -11
  44. package/dist/cjs/src/kucoin.js +2 -0
  45. package/dist/cjs/src/kuna.js +2 -0
  46. package/dist/cjs/src/latoken.js +2 -0
  47. package/dist/cjs/src/luno.js +2 -0
  48. package/dist/cjs/src/mercado.js +2 -0
  49. package/dist/cjs/src/mexc.js +2 -0
  50. package/dist/cjs/src/ndax.js +2 -0
  51. package/dist/cjs/src/novadax.js +2 -0
  52. package/dist/cjs/src/okx.js +24 -9
  53. package/dist/cjs/src/p2b.js +2 -0
  54. package/dist/cjs/src/poloniex.js +27 -25
  55. package/dist/cjs/src/pro/binance.js +60 -8
  56. package/dist/cjs/src/pro/coinbasepro.js +1 -1
  57. package/dist/cjs/src/static_dependencies/proxies/http-proxy-agent/index.js +8 -11
  58. package/dist/cjs/src/static_dependencies/proxies/https-proxy-agent/index.js +5 -8
  59. package/dist/cjs/src/static_dependencies/proxies/https-proxy-agent/parse-proxy-response.js +5 -12
  60. package/dist/cjs/src/wavesexchange.js +2 -0
  61. package/dist/cjs/src/wazirx.js +2 -0
  62. package/dist/cjs/src/woo.js +2 -0
  63. package/dist/cjs/src/yobit.js +2 -0
  64. package/dist/cjs/src/zonda.js +2 -0
  65. package/js/ccxt.d.ts +1 -1
  66. package/js/ccxt.js +1 -1
  67. package/js/src/abstract/binance.d.ts +2 -0
  68. package/js/src/abstract/binancecoinm.d.ts +2 -0
  69. package/js/src/abstract/binanceus.d.ts +2 -0
  70. package/js/src/abstract/binanceusdm.d.ts +2 -0
  71. package/js/src/abstract/okx.d.ts +14 -0
  72. package/js/src/ace.js +2 -0
  73. package/js/src/alpaca.js +2 -0
  74. package/js/src/base/Exchange.d.ts +4 -0
  75. package/js/src/base/Exchange.js +14 -2
  76. package/js/src/base/errors.d.ts +4 -4
  77. package/js/src/base/errors.js +7 -7
  78. package/js/src/base/ws/Client.js +13 -14
  79. package/js/src/bigone.d.ts +1 -0
  80. package/js/src/bigone.js +38 -9
  81. package/js/src/binance.js +4 -0
  82. package/js/src/binanceus.js +2 -0
  83. package/js/src/bingx.d.ts +7 -3
  84. package/js/src/bingx.js +135 -41
  85. package/js/src/bit2c.js +2 -0
  86. package/js/src/bitbank.js +2 -0
  87. package/js/src/bithumb.js +2 -0
  88. package/js/src/bitmart.d.ts +1 -0
  89. package/js/src/bitmart.js +33 -11
  90. package/js/src/bitopro.js +2 -0
  91. package/js/src/bitpanda.js +2 -0
  92. package/js/src/bitso.js +2 -0
  93. package/js/src/bitstamp.js +2 -0
  94. package/js/src/bittrex.js +2 -0
  95. package/js/src/bitvavo.js +2 -0
  96. package/js/src/bl3p.js +2 -0
  97. package/js/src/btcalpha.js +2 -0
  98. package/js/src/btcbox.js +2 -0
  99. package/js/src/btcmarkets.js +2 -0
  100. package/js/src/btcturk.js +2 -0
  101. package/js/src/bybit.js +2 -0
  102. package/js/src/coinbase.js +2 -0
  103. package/js/src/coincheck.js +2 -0
  104. package/js/src/coinlist.js +2 -0
  105. package/js/src/coinmate.js +2 -0
  106. package/js/src/coinone.js +2 -0
  107. package/js/src/coinsph.js +2 -0
  108. package/js/src/coinspot.js +2 -0
  109. package/js/src/cryptocom.d.ts +0 -24
  110. package/js/src/cryptocom.js +2 -185
  111. package/js/src/gate.js +1 -0
  112. package/js/src/gemini.js +23 -19
  113. package/js/src/idex.js +2 -0
  114. package/js/src/independentreserve.js +2 -0
  115. package/js/src/indodax.js +2 -0
  116. package/js/src/kraken.d.ts +2 -0
  117. package/js/src/kraken.js +154 -11
  118. package/js/src/kucoin.js +2 -0
  119. package/js/src/kuna.js +2 -0
  120. package/js/src/latoken.js +2 -0
  121. package/js/src/luno.js +2 -0
  122. package/js/src/mercado.js +2 -0
  123. package/js/src/mexc.js +2 -0
  124. package/js/src/ndax.js +2 -0
  125. package/js/src/novadax.js +2 -0
  126. package/js/src/okx.js +24 -9
  127. package/js/src/p2b.js +2 -0
  128. package/js/src/poloniex.js +27 -25
  129. package/js/src/pro/binance.d.ts +1 -0
  130. package/js/src/pro/binance.js +61 -9
  131. package/js/src/pro/coinbasepro.js +1 -1
  132. package/js/src/static_dependencies/proxies/http-proxy-agent/index.js +9 -8
  133. package/js/src/static_dependencies/proxies/https-proxy-agent/index.js +5 -7
  134. package/js/src/static_dependencies/proxies/https-proxy-agent/parse-proxy-response.js +5 -7
  135. package/js/src/wavesexchange.js +2 -0
  136. package/js/src/wazirx.js +2 -0
  137. package/js/src/woo.js +2 -0
  138. package/js/src/yobit.js +2 -0
  139. package/js/src/zonda.js +2 -0
  140. package/package.json +1 -1
@@ -1451,6 +1451,8 @@ class ace extends _abstract_ace_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
1451
1451
  'cancelAllOrders': false,
1452
1452
  'cancelOrder': true,
1453
1453
  'cancelOrders': false,
1454
+ 'closeAllPositions': false,
1455
+ 'closePosition': false,
1454
1456
  'createOrder': true,
1455
1457
  'editOrder': false,
1456
1458
  'fetchBalance': true,
@@ -2531,6 +2533,8 @@ class alpaca extends _abstract_alpaca_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
2531
2533
  'option': false,
2532
2534
  'cancelAllOrders': true,
2533
2535
  'cancelOrder': true,
2536
+ 'closeAllPositions': false,
2537
+ 'closePosition': false,
2534
2538
  'createOrder': true,
2535
2539
  'fetchBalance': true,
2536
2540
  'fetchBidsAsks': false,
@@ -7332,6 +7336,8 @@ class Exchange {
7332
7336
  'cancelAllOrders': undefined,
7333
7337
  'cancelOrder': true,
7334
7338
  'cancelOrders': undefined,
7339
+ 'closeAllPositions': undefined,
7340
+ 'closePosition': undefined,
7335
7341
  'createDepositAddress': undefined,
7336
7342
  'createLimitOrder': true,
7337
7343
  'createMarketOrder': true,
@@ -10677,6 +10683,12 @@ class Exchange {
10677
10683
  async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
10678
10684
  throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchFundingHistory() is not supported yet');
10679
10685
  }
10686
+ async closePosition(symbol, side = undefined, marginMode = undefined, params = {}) {
10687
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' closePositions() is not supported yet');
10688
+ }
10689
+ async closeAllPositions(params = {}) {
10690
+ throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' closeAllPositions() is not supported yet');
10691
+ }
10680
10692
  parseLastPrice(price, market = undefined) {
10681
10693
  throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' parseLastPrice() is not supported yet');
10682
10694
  }
@@ -11668,6 +11680,10 @@ class Exchange {
11668
11680
  if (cursorValue === undefined) {
11669
11681
  break;
11670
11682
  }
11683
+ const lastTimestamp = this.safeInteger(last, 'timestamp');
11684
+ if (lastTimestamp !== undefined && lastTimestamp < since) {
11685
+ break;
11686
+ }
11671
11687
  }
11672
11688
  catch (e) {
11673
11689
  errors += 1;
@@ -11720,10 +11736,10 @@ class Exchange {
11720
11736
  const first = this.safeValue(result, 0);
11721
11737
  if (first !== undefined) {
11722
11738
  if ('timestamp' in first) {
11723
- return this.sortBy(result, 'timestamp');
11739
+ return this.sortBy(result, 'timestamp', true);
11724
11740
  }
11725
11741
  if ('id' in first) {
11726
- return this.sortBy(result, 'id');
11742
+ return this.sortBy(result, 'id', true);
11727
11743
  }
11728
11744
  }
11729
11745
  return result;
@@ -12304,8 +12320,14 @@ class NotSupported extends ExchangeError {
12304
12320
  this.name = 'NotSupported';
12305
12321
  }
12306
12322
  }
12323
+ class OperationFailed extends BaseError {
12324
+ constructor(message) {
12325
+ super(message);
12326
+ this.name = 'OperationFailed';
12327
+ }
12328
+ }
12307
12329
  // Network error
12308
- class NetworkError extends BaseError {
12330
+ class NetworkError extends OperationFailed {
12309
12331
  constructor(message) {
12310
12332
  super(message);
12311
12333
  this.name = 'NetworkError';
@@ -12347,12 +12369,6 @@ class RequestTimeout extends NetworkError {
12347
12369
  this.name = 'RequestTimeout';
12348
12370
  }
12349
12371
  }
12350
- class OperationFailed extends BaseError {
12351
- constructor(message) {
12352
- super(message);
12353
- this.name = 'OperationFailed';
12354
- }
12355
- }
12356
12372
  /* ------------------------------------------------------------------------ */
12357
12373
  // export default subclass (
12358
12374
  // // Root class
@@ -14342,6 +14358,7 @@ class Client {
14342
14358
  this.reset(this.error);
14343
14359
  this.onErrorCallback(this, this.error);
14344
14360
  }
14361
+ /* eslint-disable no-shadow */
14345
14362
  onClose(event) {
14346
14363
  if (this.verbose) {
14347
14364
  this.log(new Date(), 'onClose', event);
@@ -14369,6 +14386,7 @@ class Client {
14369
14386
  message = (typeof message === 'string') ? message : JSON.stringify(message);
14370
14387
  const future = (0,_Future_js__WEBPACK_IMPORTED_MODULE_2__/* .createFuture */ .N)();
14371
14388
  if (_base_functions_js__WEBPACK_IMPORTED_MODULE_5__/* .isNode */ .UG) {
14389
+ /* eslint-disable no-inner-declarations */
14372
14390
  function onSendComplete(error) {
14373
14391
  if (error) {
14374
14392
  future.reject(error);
@@ -14393,23 +14411,20 @@ class Client {
14393
14411
  // MessageEvent {isTrusted: true, data: "{"e":"depthUpdate","E":1581358737706,"s":"ETHBTC",…"0.06200000"]],"a":[["0.02261300","0.00000000"]]}", origin: "wss://stream.binance.com:9443", lastEventId: "", source: null, …}
14394
14412
  let message = messageEvent.data;
14395
14413
  let arrayBuffer;
14396
- if (this.gunzip || this.inflate) {
14397
- if (typeof message === 'string') {
14398
- arrayBuffer = _static_dependencies_scure_base_index_js__WEBPACK_IMPORTED_MODULE_6__/* .utf8 */ .KA.decode(message);
14399
- }
14400
- else {
14414
+ if (typeof message !== 'string') {
14415
+ if (this.gunzip || this.inflate) {
14401
14416
  arrayBuffer = new Uint8Array(message.buffer.slice(message.byteOffset, message.byteOffset + message.byteLength));
14417
+ if (this.gunzip) {
14418
+ arrayBuffer = (0,_static_dependencies_fflake_browser_js__WEBPACK_IMPORTED_MODULE_0__/* .gunzipSync */ ._Z)(arrayBuffer);
14419
+ }
14420
+ else if (this.inflate) {
14421
+ arrayBuffer = (0,_static_dependencies_fflake_browser_js__WEBPACK_IMPORTED_MODULE_0__/* .inflateSync */ .n)(arrayBuffer);
14422
+ }
14423
+ message = _static_dependencies_scure_base_index_js__WEBPACK_IMPORTED_MODULE_6__/* .utf8 */ .KA.encode(arrayBuffer);
14402
14424
  }
14403
- if (this.gunzip) {
14404
- arrayBuffer = (0,_static_dependencies_fflake_browser_js__WEBPACK_IMPORTED_MODULE_0__/* .gunzipSync */ ._Z)(arrayBuffer);
14405
- }
14406
- else if (this.inflate) {
14407
- arrayBuffer = (0,_static_dependencies_fflake_browser_js__WEBPACK_IMPORTED_MODULE_0__/* .inflateSync */ .n)(arrayBuffer);
14425
+ else {
14426
+ message = message.toString();
14408
14427
  }
14409
- message = _static_dependencies_scure_base_index_js__WEBPACK_IMPORTED_MODULE_6__/* .utf8 */ .KA.encode(arrayBuffer);
14410
- }
14411
- if (typeof message !== 'string') {
14412
- message = message.toString();
14413
14428
  }
14414
14429
  try {
14415
14430
  if ((0,_base_functions_js__WEBPACK_IMPORTED_MODULE_7__/* .isJsonEncodedObject */ .Dd)(message)) {
@@ -15045,6 +15060,8 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
15045
15060
  'option': undefined,
15046
15061
  'cancelAllOrders': true,
15047
15062
  'cancelOrder': true,
15063
+ 'createMarketBuyOrderWithCost': true,
15064
+ 'createMarketSellOrderWithCost': false,
15048
15065
  'createOrder': true,
15049
15066
  'createPostOnlyOrder': true,
15050
15067
  'createStopLimitOrder': true,
@@ -16167,6 +16184,20 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
16167
16184
  'trades': undefined,
16168
16185
  }, market);
16169
16186
  }
16187
+ async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
16188
+ /**
16189
+ * @method
16190
+ * @name bigone#createMarketBuyOrderWithCost
16191
+ * @see https://open.big.one/docs/spot_orders.html#create-order
16192
+ * @description create a market buy order by providing the symbol and cost
16193
+ * @param {string} symbol unified symbol of the market to create an order in
16194
+ * @param {float} cost how much you want to trade in units of the quote currency
16195
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
16196
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
16197
+ */
16198
+ params['createMarketBuyOrderRequiresPrice'] = false;
16199
+ return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
16200
+ }
16170
16201
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
16171
16202
  /**
16172
16203
  * @method
@@ -16194,7 +16225,7 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
16194
16225
  const requestSide = isBuy ? 'BID' : 'ASK';
16195
16226
  let uppercaseType = type.toUpperCase();
16196
16227
  const isLimit = uppercaseType === 'LIMIT';
16197
- const exchangeSpecificParam = this.safeValue(params, 'post_only');
16228
+ const exchangeSpecificParam = this.safeValue(params, 'post_only', false);
16198
16229
  let postOnly = undefined;
16199
16230
  [postOnly, params] = this.handlePostOnly((uppercaseType === 'MARKET'), exchangeSpecificParam, params);
16200
16231
  const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
@@ -16218,21 +16249,34 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
16218
16249
  request['post_only'] = true;
16219
16250
  }
16220
16251
  }
16252
+ request['amount'] = this.amountToPrecision(symbol, amount);
16221
16253
  }
16222
16254
  else {
16223
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice');
16224
- if (createMarketBuyOrderRequiresPrice && (side === 'buy')) {
16225
- if (price === undefined) {
16226
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to false and pass in the cost to spend into the amount parameter');
16255
+ if (isBuy) {
16256
+ let createMarketBuyOrderRequiresPrice = true;
16257
+ [createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
16258
+ const cost = this.safeNumber(params, 'cost');
16259
+ params = this.omit(params, 'cost');
16260
+ if (createMarketBuyOrderRequiresPrice) {
16261
+ if ((price === undefined) && (cost === undefined)) {
16262
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
16263
+ }
16264
+ else {
16265
+ const amountString = this.numberToString(amount);
16266
+ const priceString = this.numberToString(price);
16267
+ const quoteAmount = this.parseToNumeric(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
16268
+ const costRequest = (cost !== undefined) ? cost : quoteAmount;
16269
+ request['amount'] = this.costToPrecision(symbol, costRequest);
16270
+ }
16227
16271
  }
16228
16272
  else {
16229
- const amountString = this.numberToString(amount);
16230
- const priceString = this.numberToString(price);
16231
- amount = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
16273
+ request['amount'] = this.costToPrecision(symbol, amount);
16232
16274
  }
16233
16275
  }
16276
+ else {
16277
+ request['amount'] = this.amountToPrecision(symbol, amount);
16278
+ }
16234
16279
  }
16235
- request['amount'] = this.amountToPrecision(symbol, amount);
16236
16280
  if (triggerPrice !== undefined) {
16237
16281
  request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
16238
16282
  request['operator'] = isBuy ? 'GTE' : 'LTE';
@@ -16977,6 +17021,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16977
17021
  'cancelAllOrders': true,
16978
17022
  'cancelOrder': true,
16979
17023
  'cancelOrders': true,
17024
+ 'closeAllPositions': false,
17025
+ 'closePosition': false,
16980
17026
  'createDepositAddress': false,
16981
17027
  'createOrder': true,
16982
17028
  'createOrders': true,
@@ -17813,6 +17859,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
17813
17859
  'uiKlines': 0.4,
17814
17860
  'ticker/24hr': { 'cost': 0.4, 'noSymbol': 16 },
17815
17861
  'ticker': { 'cost': 0.4, 'noSymbol': 16 },
17862
+ 'ticker/tradingDay': 0.8,
17816
17863
  'ticker/price': { 'cost': 0.4, 'noSymbol': 0.8 },
17817
17864
  'ticker/bookTicker': { 'cost': 0.4, 'noSymbol': 0.8 },
17818
17865
  'exchangeInfo': 4,
@@ -17841,6 +17888,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
17841
17888
  'rateLimit/order': 8,
17842
17889
  'myPreventedMatches': 4,
17843
17890
  'myAllocations': 4,
17891
+ 'account/commission': 4,
17844
17892
  },
17845
17893
  'post': {
17846
17894
  'order/oco': 0.2,
@@ -26749,6 +26797,8 @@ class binanceus extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
26749
26797
  'option': false,
26750
26798
  'addMargin': false,
26751
26799
  'borrowMargin': false,
26800
+ 'closeAllPositions': false,
26801
+ 'closePosition': false,
26752
26802
  'createReduceOnlyOrder': false,
26753
26803
  'fetchBorrowInterest': false,
26754
26804
  'fetchBorrowRate': false,
@@ -26889,6 +26939,9 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
26889
26939
  'cancelAllOrders': true,
26890
26940
  'cancelOrder': true,
26891
26941
  'cancelOrders': true,
26942
+ 'createMarketBuyOrderWithCost': true,
26943
+ 'createMarketOrderWithCost': true,
26944
+ 'createMarketSellOrderWithCost': true,
26892
26945
  'createOrder': true,
26893
26946
  'createOrders': true,
26894
26947
  'fetchBalance': true,
@@ -26937,10 +26990,18 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
26937
26990
  'www': 'https://bingx.com/',
26938
26991
  'doc': 'https://bingx-api.github.io/docs/',
26939
26992
  'referral': 'https://bingx.com/invite/OHETOM',
26940
- 'fees': {
26941
- 'trading': {
26942
- 'tierBased': true,
26943
- },
26993
+ },
26994
+ 'fees': {
26995
+ 'tierBased': true,
26996
+ 'spot': {
26997
+ 'feeSide': 'get',
26998
+ 'maker': this.parseNumber('0.001'),
26999
+ 'taker': this.parseNumber('0.001'),
27000
+ },
27001
+ 'swap': {
27002
+ 'feeSide': 'quote',
27003
+ 'maker': this.parseNumber('0.0002'),
27004
+ 'taker': this.parseNumber('0.0005'),
26944
27005
  },
26945
27006
  },
26946
27007
  'requiredCredentials': {
@@ -27159,9 +27220,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
27159
27220
  '1w': '1w',
27160
27221
  '1M': '1M',
27161
27222
  },
27162
- 'fees': {
27163
- 'trading': {},
27164
- },
27165
27223
  'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .DECIMAL_PLACES */ .nr,
27166
27224
  'exceptions': {
27167
27225
  'exact': {
@@ -27413,11 +27471,12 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
27413
27471
  if (settle !== undefined) {
27414
27472
  symbol += ':' + settle;
27415
27473
  }
27474
+ const fees = this.safeValue(this.fees, type, {});
27416
27475
  const contractSize = this.safeNumber(market, 'size');
27417
27476
  const isActive = this.safeString(market, 'status') === '1';
27418
27477
  const isInverse = (spot) ? undefined : false;
27419
27478
  const isLinear = (spot) ? undefined : swap;
27420
- return {
27479
+ return this.safeMarketStructure({
27421
27480
  'id': id,
27422
27481
  'symbol': symbol,
27423
27482
  'base': base,
@@ -27436,8 +27495,9 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
27436
27495
  'contract': swap,
27437
27496
  'linear': isLinear,
27438
27497
  'inverse': isInverse,
27439
- 'taker': undefined,
27440
- 'maker': undefined,
27498
+ 'taker': this.safeNumber(fees, 'taker'),
27499
+ 'maker': this.safeNumber(fees, 'maker'),
27500
+ 'feeSide': this.safeString(fees, 'feeSide'),
27441
27501
  'contractSize': contractSize,
27442
27502
  'expiry': undefined,
27443
27503
  'expiryDatetime': undefined,
@@ -27467,7 +27527,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
27467
27527
  },
27468
27528
  'created': undefined,
27469
27529
  'info': market,
27470
- };
27530
+ });
27471
27531
  }
27472
27532
  async fetchMarkets(params = {}) {
27473
27533
  /**
@@ -28433,23 +28493,28 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28433
28493
  // "avgPrice": "2.2",
28434
28494
  // "leverage": 10,
28435
28495
  // }
28496
+ //
28436
28497
  // standard position
28498
+ //
28437
28499
  // {
28438
- // "currentPrice":"82.91",
28439
- // "symbol":"LTC/USDT",
28440
- // "initialMargin":"5.00000000000000000000",
28441
- // "unrealizedProfit":"-0.26464500",
28442
- // "leverage":"20.000000000",
28443
- // "isolated":true,
28444
- // "entryPrice":"83.13",
28445
- // "positionSide":"LONG",
28446
- // "positionAmt":"1.20365912",
28500
+ // "currentPrice": "82.91",
28501
+ // "symbol": "LTC/USDT",
28502
+ // "initialMargin": "5.00000000000000000000",
28503
+ // "unrealizedProfit": "-0.26464500",
28504
+ // "leverage": "20.000000000",
28505
+ // "isolated": true,
28506
+ // "entryPrice": "83.13",
28507
+ // "positionSide": "LONG",
28508
+ // "positionAmt": "1.20365912",
28447
28509
  // }
28448
28510
  //
28449
- let marketId = this.safeString(position, 'symbol');
28511
+ let marketId = this.safeString(position, 'symbol', '');
28450
28512
  marketId = marketId.replace('/', '-'); // standard return different format
28451
28513
  const isolated = this.safeValue(position, 'isolated');
28452
- const marginMode = isolated ? 'isolated' : 'cross';
28514
+ let marginMode = undefined;
28515
+ if (isolated !== undefined) {
28516
+ marginMode = isolated ? 'isolated' : 'cross';
28517
+ }
28453
28518
  return this.safePosition({
28454
28519
  'info': position,
28455
28520
  'id': this.safeString(position, 'positionId'),
@@ -28481,6 +28546,46 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28481
28546
  'takeProfitPrice': undefined,
28482
28547
  });
28483
28548
  }
28549
+ async createMarketOrderWithCost(symbol, side, cost, params = {}) {
28550
+ /**
28551
+ * @method
28552
+ * @name bingx#createMarketOrderWithCost
28553
+ * @description create a market order by providing the symbol, side and cost
28554
+ * @param {string} symbol unified symbol of the market to create an order in
28555
+ * @param {string} side 'buy' or 'sell'
28556
+ * @param {float} cost how much you want to trade in units of the quote currency
28557
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
28558
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
28559
+ */
28560
+ params['quoteOrderQty'] = cost;
28561
+ return await this.createOrder(symbol, 'market', side, cost, undefined, params);
28562
+ }
28563
+ async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
28564
+ /**
28565
+ * @method
28566
+ * @name bingx#createMarketBuyOrderWithCost
28567
+ * @description create a market buy order by providing the symbol and cost
28568
+ * @param {string} symbol unified symbol of the market to create an order in
28569
+ * @param {float} cost how much you want to trade in units of the quote currency
28570
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
28571
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
28572
+ */
28573
+ params['quoteOrderQty'] = cost;
28574
+ return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
28575
+ }
28576
+ async createMarketSellOrderWithCost(symbol, cost, params = {}) {
28577
+ /**
28578
+ * @method
28579
+ * @name bingx#createMarketSellOrderWithCost
28580
+ * @description create a market sell order by providing the symbol and cost
28581
+ * @param {string} symbol unified symbol of the market to create an order in
28582
+ * @param {float} cost how much you want to trade in units of the quote currency
28583
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
28584
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
28585
+ */
28586
+ params['quoteOrderQty'] = cost;
28587
+ return await this.createOrder(symbol, 'market', 'sell', cost, undefined, params);
28588
+ }
28484
28589
  createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
28485
28590
  /**
28486
28591
  * @method
@@ -28516,26 +28621,21 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28516
28621
  if (postOnly || (timeInForce === 'POC')) {
28517
28622
  request['timeInForce'] = 'POC';
28518
28623
  }
28519
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
28520
- if (isMarketOrder && (side === 'buy')) {
28521
- if (createMarketBuyOrderRequiresPrice) {
28522
- if (price === undefined) {
28523
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to false and pass in the cost to spend into the amount parameter');
28524
- }
28525
- else {
28526
- const amountString = this.numberToString(amount);
28527
- const priceString = this.numberToString(price);
28528
- const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
28529
- request['quoteOrderQty'] = this.parseToNumeric(this.priceToPrecision(symbol, cost));
28530
- }
28624
+ const cost = this.safeNumber2(params, 'cost', 'quoteOrderQty');
28625
+ params = this.omit(params, 'cost');
28626
+ if (cost !== undefined) {
28627
+ request['quoteOrderQty'] = this.parseToNumeric(this.costToPrecision(symbol, cost));
28628
+ }
28629
+ else {
28630
+ if (market['spot'] && isMarketOrder && (price !== undefined)) {
28631
+ // keep the legacy behavior, to avoid breaking the old spot-market-buying code
28632
+ const calculatedCost = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(this.numberToString(amount), this.numberToString(price));
28633
+ request['quoteOrderQty'] = this.parseToNumeric(calculatedCost);
28531
28634
  }
28532
28635
  else {
28533
- request['quoteOrderQty'] = this.parseToNumeric(this.priceToPrecision(symbol, amount));
28636
+ request['quantity'] = this.parseToNumeric(this.amountToPrecision(symbol, amount));
28534
28637
  }
28535
28638
  }
28536
- else {
28537
- request['quantity'] = this.parseToNumeric(this.amountToPrecision(symbol, amount));
28538
- }
28539
28639
  if (!isMarketOrder) {
28540
28640
  request['price'] = this.parseToNumeric(this.priceToPrecision(symbol, price));
28541
28641
  }
@@ -28610,8 +28710,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28610
28710
  * @method
28611
28711
  * @name bingx#createOrder
28612
28712
  * @description create a trade order
28613
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Create%20an%20Order
28614
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Trade%20order
28713
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
28615
28714
  * @param {string} symbol unified symbol of the market to create an order in
28616
28715
  * @param {string} type 'market' or 'limit'
28617
28716
  * @param {string} side 'buy' or 'sell'
@@ -28624,6 +28723,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28624
28723
  * @param {float} [params.triggerPrice] *swap only* triggerPrice at which the attached take profit / stop loss order will be triggered
28625
28724
  * @param {float} [params.stopLossPrice] *swap only* stop loss trigger price
28626
28725
  * @param {float} [params.takeProfitPrice] *swap only* take profit trigger price
28726
+ * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount
28627
28727
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
28628
28728
  */
28629
28729
  await this.loadMarkets();
@@ -30230,6 +30330,50 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
30230
30330
  'datetime': this.iso8601(timestamp),
30231
30331
  });
30232
30332
  }
30333
+ async closeAllPositions(params = {}) {
30334
+ /**
30335
+ * @method
30336
+ * @name bitget#closePositions
30337
+ * @description closes open positions for a market
30338
+ * @see https://bitgetlimited.github.io/apidoc/en/mix/#close-all-position
30339
+ * @param {object} [params] extra parameters specific to the okx api endpoint
30340
+ * @param {string} [params.recvWindow] request valid time window value
30341
+ * @returns {[object]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
30342
+ */
30343
+ await this.loadMarkets();
30344
+ const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
30345
+ const recvWindow = this.safeInteger(this.parseParams, 'recvWindow', defaultRecvWindow);
30346
+ let marketType = undefined;
30347
+ [marketType, params] = this.handleMarketTypeAndParams('closeAllPositions', undefined, params);
30348
+ if (marketType === 'margin') {
30349
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' closePositions () cannot be used for ' + marketType + ' markets');
30350
+ }
30351
+ const request = {
30352
+ 'recvWindow': recvWindow,
30353
+ };
30354
+ const response = await this.swapV2PrivatePostTradeCloseAllPositions(this.extend(request, params));
30355
+ //
30356
+ // {
30357
+ // "code": 0,
30358
+ // "msg": "",
30359
+ // "data": {
30360
+ // "success": [
30361
+ // 1727686766700486656,
30362
+ // 1727686767048613888
30363
+ // ],
30364
+ // "failed": null
30365
+ // }
30366
+ // }
30367
+ //
30368
+ const data = this.safeValue(response, 'data', {});
30369
+ const success = this.safeValue(data, 'success', []);
30370
+ const positions = [];
30371
+ for (let i = 0; i < success.length; i++) {
30372
+ const position = this.parsePosition({ 'positionId': success[i] });
30373
+ positions.push(position);
30374
+ }
30375
+ return positions;
30376
+ }
30233
30377
  sign(path, section = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
30234
30378
  const type = section[0];
30235
30379
  const version = section[1];
@@ -30343,6 +30487,8 @@ class bit2c extends _abstract_bit2c_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
30343
30487
  'option': false,
30344
30488
  'addMargin': false,
30345
30489
  'cancelOrder': true,
30490
+ 'closeAllPositions': false,
30491
+ 'closePosition': false,
30346
30492
  'createOrder': true,
30347
30493
  'createReduceOnlyOrder': false,
30348
30494
  'fetchBalance': true,
@@ -31259,6 +31405,8 @@ class bitbank extends _abstract_bitbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
31259
31405
  'option': false,
31260
31406
  'addMargin': false,
31261
31407
  'cancelOrder': true,
31408
+ 'closeAllPositions': false,
31409
+ 'closePosition': false,
31262
31410
  'createOrder': true,
31263
31411
  'createReduceOnlyOrder': false,
31264
31412
  'fetchBalance': true,
@@ -47244,6 +47392,8 @@ class bithumb extends _abstract_bithumb_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
47244
47392
  'option': false,
47245
47393
  'addMargin': false,
47246
47394
  'cancelOrder': true,
47395
+ 'closeAllPositions': false,
47396
+ 'closePosition': false,
47247
47397
  'createMarketOrder': true,
47248
47398
  'createOrder': true,
47249
47399
  'createReduceOnlyOrder': false,
@@ -48350,6 +48500,9 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
48350
48500
  'cancelAllOrders': true,
48351
48501
  'cancelOrder': true,
48352
48502
  'cancelOrders': false,
48503
+ 'createMarketBuyOrderWithCost': true,
48504
+ 'createMarketOrderWithCost': false,
48505
+ 'createMarketSellOrderWithCost': false,
48353
48506
  'createOrder': true,
48354
48507
  'createPostOnlyOrder': true,
48355
48508
  'createStopLimitOrder': false,
@@ -50475,12 +50628,31 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
50475
50628
  const statuses = this.safeValue(statusesByType, type, {});
50476
50629
  return this.safeString(statuses, status, status);
50477
50630
  }
50631
+ async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
50632
+ /**
50633
+ * @method
50634
+ * @name bitmart#createMarketBuyOrderWithCost
50635
+ * @description create a market buy order by providing the symbol and cost
50636
+ * @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
50637
+ * @param {string} symbol unified symbol of the market to create an order in
50638
+ * @param {float} cost how much you want to trade in units of the quote currency
50639
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
50640
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
50641
+ */
50642
+ await this.loadMarkets();
50643
+ const market = this.market(symbol);
50644
+ if (!market['spot']) {
50645
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
50646
+ }
50647
+ params['createMarketBuyOrderRequiresPrice'] = false;
50648
+ return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
50649
+ }
50478
50650
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
50479
50651
  /**
50480
50652
  * @method
50481
50653
  * @name bitmart#createOrder
50482
50654
  * @description create a trade order
50483
- * @see https://developer-pro.bitmart.com/en/spot/#place-spot-order
50655
+ * @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
50484
50656
  * @see https://developer-pro.bitmart.com/en/spot/#place-margin-order
50485
50657
  * @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
50486
50658
  * @param {string} symbol unified symbol of the market to create an order in
@@ -50657,18 +50829,18 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
50657
50829
  else if (isMarketOrder) {
50658
50830
  // for market buy it requires the amount of quote currency to spend
50659
50831
  if (side === 'buy') {
50660
- let notional = this.safeNumber(params, 'notional');
50661
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
50832
+ let notional = this.safeNumber2(params, 'cost', 'notional');
50833
+ params = this.omit(params, 'cost');
50834
+ let createMarketBuyOrderRequiresPrice = true;
50835
+ [createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
50662
50836
  if (createMarketBuyOrderRequiresPrice) {
50663
- if (price !== undefined) {
50664
- if (notional === undefined) {
50665
- const amountString = this.numberToString(amount);
50666
- const priceString = this.numberToString(price);
50667
- notional = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
50668
- }
50837
+ if ((price === undefined) && (notional === undefined)) {
50838
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument or in the "notional" extra parameter (the exchange-specific behaviour)');
50669
50839
  }
50670
- else if (notional === undefined) {
50671
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + " createOrder () requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false and supply the total cost value in the 'amount' argument or in the 'notional' extra parameter (the exchange-specific behaviour)");
50840
+ else {
50841
+ const amountString = this.numberToString(amount);
50842
+ const priceString = this.numberToString(price);
50843
+ notional = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
50672
50844
  }
50673
50845
  }
50674
50846
  else {
@@ -55428,6 +55600,8 @@ class bitopro extends _abstract_bitopro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
55428
55600
  'cancelAllOrders': true,
55429
55601
  'cancelOrder': true,
55430
55602
  'cancelOrders': true,
55603
+ 'closeAllPositions': false,
55604
+ 'closePosition': false,
55431
55605
  'createOrder': true,
55432
55606
  'editOrder': false,
55433
55607
  'fetchBalance': true,
@@ -57160,6 +57334,8 @@ class bitpanda extends _abstract_bitpanda_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
57160
57334
  'cancelAllOrders': true,
57161
57335
  'cancelOrder': true,
57162
57336
  'cancelOrders': true,
57337
+ 'closeAllPositions': false,
57338
+ 'closePosition': false,
57163
57339
  'createDepositAddress': true,
57164
57340
  'createOrder': true,
57165
57341
  'createReduceOnlyOrder': false,
@@ -62415,6 +62591,8 @@ class bitso extends _abstract_bitso_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
62415
62591
  'cancelAllOrders': true,
62416
62592
  'cancelOrder': true,
62417
62593
  'cancelOrders': true,
62594
+ 'closeAllPositions': false,
62595
+ 'closePosition': false,
62418
62596
  'createDepositAddress': false,
62419
62597
  'createOrder': true,
62420
62598
  'createReduceOnlyOrder': false,
@@ -64178,6 +64356,8 @@ class bitstamp extends _abstract_bitstamp_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
64178
64356
  'addMargin': false,
64179
64357
  'cancelAllOrders': true,
64180
64358
  'cancelOrder': true,
64359
+ 'closeAllPositions': false,
64360
+ 'closePosition': false,
64181
64361
  'createOrder': true,
64182
64362
  'createReduceOnlyOrder': false,
64183
64363
  'createStopLimitOrder': false,
@@ -66347,6 +66527,8 @@ class bittrex extends _abstract_bittrex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
66347
66527
  'addMargin': false,
66348
66528
  'cancelAllOrders': true,
66349
66529
  'cancelOrder': true,
66530
+ 'closeAllPositions': false,
66531
+ 'closePosition': false,
66350
66532
  'createDepositAddress': true,
66351
66533
  'createMarketOrder': true,
66352
66534
  'createOrder': true,
@@ -68663,6 +68845,8 @@ class bitvavo extends _abstract_bitvavo_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
68663
68845
  'addMargin': false,
68664
68846
  'cancelAllOrders': true,
68665
68847
  'cancelOrder': true,
68848
+ 'closeAllPositions': false,
68849
+ 'closePosition': false,
68666
68850
  'createOrder': true,
68667
68851
  'createReduceOnlyOrder': false,
68668
68852
  'createStopLimitOrder': true,
@@ -70598,6 +70782,8 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
70598
70782
  'option': false,
70599
70783
  'addMargin': false,
70600
70784
  'cancelOrder': true,
70785
+ 'closeAllPositions': false,
70786
+ 'closePosition': false,
70601
70787
  'createOrder': true,
70602
70788
  'createReduceOnlyOrder': false,
70603
70789
  'createStopLimitOrder': false,
@@ -72261,6 +72447,8 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
72261
72447
  'option': false,
72262
72448
  'addMargin': false,
72263
72449
  'cancelOrder': true,
72450
+ 'closeAllPositions': false,
72451
+ 'closePosition': false,
72264
72452
  'createOrder': true,
72265
72453
  'createReduceOnlyOrder': false,
72266
72454
  'createStopLimitOrder': false,
@@ -73200,6 +73388,8 @@ class btcbox extends _abstract_btcbox_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
73200
73388
  'option': false,
73201
73389
  'addMargin': false,
73202
73390
  'cancelOrder': true,
73391
+ 'closeAllPositions': false,
73392
+ 'closePosition': false,
73203
73393
  'createOrder': true,
73204
73394
  'createReduceOnlyOrder': false,
73205
73395
  'fetchBalance': true,
@@ -73774,6 +73964,8 @@ class btcmarkets extends _abstract_btcmarkets_js__WEBPACK_IMPORTED_MODULE_0__/*
73774
73964
  'addMargin': false,
73775
73965
  'cancelOrder': true,
73776
73966
  'cancelOrders': true,
73967
+ 'closeAllPositions': false,
73968
+ 'closePosition': false,
73777
73969
  'createOrder': true,
73778
73970
  'createReduceOnlyOrder': false,
73779
73971
  'fetchBalance': true,
@@ -75018,6 +75210,8 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
75018
75210
  'option': false,
75019
75211
  'addMargin': false,
75020
75212
  'cancelOrder': true,
75213
+ 'closeAllPositions': false,
75214
+ 'closePosition': false,
75021
75215
  'createOrder': true,
75022
75216
  'createReduceOnlyOrder': false,
75023
75217
  'fetchBalance': true,
@@ -75962,6 +76156,8 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
75962
76156
  'borrowCrossMargin': true,
75963
76157
  'cancelAllOrders': true,
75964
76158
  'cancelOrder': true,
76159
+ 'closeAllPositions': false,
76160
+ 'closePosition': false,
75965
76161
  'createMarketBuyOrderWithCost': true,
75966
76162
  'createMarketSellOrderWithCost': false,
75967
76163
  'createOrder': true,
@@ -85260,6 +85456,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
85260
85456
  'addMargin': false,
85261
85457
  'cancelOrder': true,
85262
85458
  'cancelOrders': true,
85459
+ 'closeAllPositions': false,
85460
+ 'closePosition': false,
85263
85461
  'createDepositAddress': true,
85264
85462
  'createLimitBuyOrder': true,
85265
85463
  'createLimitSellOrder': true,
@@ -90400,6 +90598,8 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
90400
90598
  'option': false,
90401
90599
  'addMargin': false,
90402
90600
  'cancelOrder': true,
90601
+ 'closeAllPositions': false,
90602
+ 'closePosition': false,
90403
90603
  'createOrder': true,
90404
90604
  'createReduceOnlyOrder': false,
90405
90605
  'fetchBalance': true,
@@ -96514,6 +96714,8 @@ class coinlist extends _abstract_coinlist_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
96514
96714
  'cancelAllOrders': true,
96515
96715
  'cancelOrder': true,
96516
96716
  'cancelOrders': true,
96717
+ 'closeAllPositions': false,
96718
+ 'closePosition': false,
96517
96719
  'createDepositAddress': false,
96518
96720
  'createOrder': true,
96519
96721
  'createPostOnlyOrder': true,
@@ -98848,6 +99050,8 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
98848
99050
  'option': false,
98849
99051
  'addMargin': false,
98850
99052
  'cancelOrder': true,
99053
+ 'closeAllPositions': false,
99054
+ 'closePosition': false,
98851
99055
  'createOrder': true,
98852
99056
  'createReduceOnlyOrder': false,
98853
99057
  'fetchBalance': true,
@@ -99848,6 +100052,8 @@ class coinone extends _abstract_coinone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
99848
100052
  'option': false,
99849
100053
  'addMargin': false,
99850
100054
  'cancelOrder': true,
100055
+ 'closeAllPositions': false,
100056
+ 'closePosition': false,
99851
100057
  'createMarketOrder': false,
99852
100058
  'createOrder': true,
99853
100059
  'createReduceOnlyOrder': false,
@@ -100791,6 +100997,8 @@ class coinsph extends _abstract_coinsph_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
100791
100997
  'cancelAllOrders': true,
100792
100998
  'cancelOrder': true,
100793
100999
  'cancelOrders': false,
101000
+ 'closeAllPositions': false,
101001
+ 'closePosition': false,
100794
101002
  'createDepositAddress': false,
100795
101003
  'createOrder': true,
100796
101004
  'createPostOnlyOrder': false,
@@ -102731,6 +102939,8 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
102731
102939
  'option': false,
102732
102940
  'addMargin': false,
102733
102941
  'cancelOrder': true,
102942
+ 'closeAllPositions': false,
102943
+ 'closePosition': false,
102734
102944
  'createMarketOrder': false,
102735
102945
  'createOrder': true,
102736
102946
  'createReduceOnlyOrder': false,
@@ -103345,7 +103555,7 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
103345
103555
  'fetchTradingFees': false,
103346
103556
  'fetchTransactionFees': false,
103347
103557
  'fetchTransactions': false,
103348
- 'fetchTransfers': true,
103558
+ 'fetchTransfers': false,
103349
103559
  'fetchUnderlyingAssets': false,
103350
103560
  'fetchVolatilityHistory': false,
103351
103561
  'fetchWithdrawals': true,
@@ -103354,7 +103564,7 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
103354
103564
  'setLeverage': false,
103355
103565
  'setMarginMode': false,
103356
103566
  'setPositionMode': false,
103357
- 'transfer': true,
103567
+ 'transfer': false,
103358
103568
  'withdraw': true,
103359
103569
  },
103360
103570
  'timeframes': {
@@ -105111,189 +105321,6 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
105111
105321
  const withdrawalList = this.safeValue(data, 'withdrawal_list', []);
105112
105322
  return this.parseTransactions(withdrawalList, currency, since, limit);
105113
105323
  }
105114
- async transfer(code, amount, fromAccount, toAccount, params = {}) {
105115
- /**
105116
- * @method
105117
- * @name cryptocom#transfer
105118
- * @description transfer currency internally between wallets on the same account
105119
- * @param {string} code unified currency code
105120
- * @param {float} amount amount to transfer
105121
- * @param {string} fromAccount account to transfer from
105122
- * @param {string} toAccount account to transfer to
105123
- * @param {object} [params] extra parameters specific to the exchange API endpoint
105124
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
105125
- */
105126
- await this.loadMarkets();
105127
- const currency = this.currency(code);
105128
- fromAccount = fromAccount.toLowerCase();
105129
- toAccount = toAccount.toLowerCase();
105130
- const accountsById = this.safeValue(this.options, 'accountsById', {});
105131
- const fromId = this.safeString(accountsById, fromAccount, fromAccount);
105132
- const toId = this.safeString(accountsById, toAccount, toAccount);
105133
- const request = {
105134
- 'currency': currency['id'],
105135
- 'amount': parseFloat(amount),
105136
- 'from': fromId,
105137
- 'to': toId,
105138
- };
105139
- let method = 'v2PrivatePostPrivateDerivTransfer';
105140
- if ((fromAccount === 'margin') || (toAccount === 'margin')) {
105141
- method = 'v2PrivatePostPrivateMarginTransfer';
105142
- }
105143
- const response = await this[method](this.extend(request, params));
105144
- //
105145
- // {
105146
- // "id": 11,
105147
- // "method": "private/deriv/transfer",
105148
- // "code": 0
105149
- // }
105150
- //
105151
- return this.parseTransfer(response, currency);
105152
- }
105153
- async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
105154
- /**
105155
- * @method
105156
- * @name cryptocom#fetchTransfers
105157
- * @description fetch a history of internal transfers made on an account
105158
- * @param {string} code unified currency code of the currency transferred
105159
- * @param {int} [since] the earliest time in ms to fetch transfers for
105160
- * @param {int} [limit] the maximum number of transfers structures to retrieve
105161
- * @param {object} [params] extra parameters specific to the exchange API endpoint
105162
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
105163
- */
105164
- if (!('direction' in params)) {
105165
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchTransfers() requires a direction param to be either "IN" or "OUT"');
105166
- }
105167
- await this.loadMarkets();
105168
- let currency = undefined;
105169
- const request = {
105170
- 'direction': 'OUT',
105171
- };
105172
- if (code !== undefined) {
105173
- currency = this.currency(code);
105174
- request['currency'] = currency['id'];
105175
- }
105176
- if (since !== undefined) {
105177
- request['start_ts'] = since;
105178
- }
105179
- if (limit !== undefined) {
105180
- request['page_size'] = limit;
105181
- }
105182
- let method = 'v2PrivatePostPrivateDerivGetTransferHistory';
105183
- const [marginMode, query] = this.customHandleMarginModeAndParams('fetchTransfers', params);
105184
- if (marginMode !== undefined) {
105185
- method = 'v2PrivatePostPrivateMarginGetTransferHistory';
105186
- }
105187
- const response = await this[method](this.extend(request, query));
105188
- //
105189
- // {
105190
- // "id": "1641032709328",
105191
- // "method": "private/deriv/get-transfer-history",
105192
- // "code": "0",
105193
- // "result": {
105194
- // "transfer_list": [
105195
- // {
105196
- // "direction": "IN",
105197
- // "time": "1641025185223",
105198
- // "amount": "109.56",
105199
- // "status": "COMPLETED",
105200
- // "information": "From Spot Wallet",
105201
- // "currency": "USDC"
105202
- // }
105203
- // ]
105204
- // }
105205
- // }
105206
- //
105207
- const transfer = [];
105208
- transfer.push({
105209
- 'response': response,
105210
- });
105211
- return this.parseTransfers(transfer, currency, since, limit, params);
105212
- }
105213
- parseTransferStatus(status) {
105214
- const statuses = {
105215
- 'COMPLETED': 'ok',
105216
- 'PROCESSING': 'pending',
105217
- };
105218
- return this.safeString(statuses, status, status);
105219
- }
105220
- parseTransfer(transfer, currency = undefined) {
105221
- //
105222
- // {
105223
- // "response": {
105224
- // "id": "1641032709328",
105225
- // "method": "private/deriv/get-transfer-history",
105226
- // "code": "0",
105227
- // "result": {
105228
- // "transfer_list": [
105229
- // {
105230
- // "direction": "IN",
105231
- // "time": "1641025185223",
105232
- // "amount": "109.56",
105233
- // "status": "COMPLETED",
105234
- // "information": "From Spot Wallet",
105235
- // "currency": "USDC"
105236
- // }
105237
- // ]
105238
- // }
105239
- // }
105240
- // }
105241
- //
105242
- const response = this.safeValue(transfer, 'response', {});
105243
- const result = this.safeValue(response, 'result', {});
105244
- const transferList = this.safeValue(result, 'transfer_list', []);
105245
- let timestamp = undefined;
105246
- let amount = undefined;
105247
- let code = undefined;
105248
- let information = undefined;
105249
- let status = undefined;
105250
- for (let i = 0; i < transferList.length; i++) {
105251
- const entry = transferList[i];
105252
- timestamp = this.safeInteger(entry, 'time');
105253
- amount = this.safeNumber(entry, 'amount');
105254
- const currencyId = this.safeString(entry, 'currency');
105255
- code = this.safeCurrencyCode(currencyId);
105256
- information = this.safeString(entry, 'information');
105257
- const rawStatus = this.safeString(entry, 'status');
105258
- status = this.parseTransferStatus(rawStatus);
105259
- }
105260
- let fromAccount = undefined;
105261
- let toAccount = undefined;
105262
- if (information !== undefined) {
105263
- const parts = information.split(' ');
105264
- const direction = this.safeStringLower(parts, 0);
105265
- const method = this.safeString(response, 'method');
105266
- if (direction === 'from') {
105267
- fromAccount = this.safeStringLower(parts, 1);
105268
- if (method === 'private/margin/get-transfer-history') {
105269
- toAccount = 'margin';
105270
- }
105271
- else {
105272
- toAccount = 'derivative';
105273
- }
105274
- }
105275
- else if (direction === 'to') {
105276
- toAccount = this.safeStringLower(parts, 1);
105277
- if (method === 'private/margin/get-transfer-history') {
105278
- fromAccount = 'margin';
105279
- }
105280
- else {
105281
- fromAccount = 'derivative';
105282
- }
105283
- }
105284
- }
105285
- return {
105286
- 'info': transferList,
105287
- 'id': this.safeString(response, 'id'),
105288
- 'timestamp': timestamp,
105289
- 'datetime': this.iso8601(timestamp),
105290
- 'currency': code,
105291
- 'amount': amount,
105292
- 'fromAccount': fromAccount,
105293
- 'toAccount': toAccount,
105294
- 'status': status,
105295
- };
105296
- }
105297
105324
  parseTicker(ticker, market = undefined) {
105298
105325
  //
105299
105326
  // fetchTicker
@@ -121937,6 +121964,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
121937
121964
  'subAccounts': 'https://api.gateio.ws/api/v4',
121938
121965
  'rebate': 'https://api.gateio.ws/api/v4',
121939
121966
  'earn': 'https://api.gateio.ws/api/v4',
121967
+ 'account': 'https://api.gateio.ws/api/v4',
121940
121968
  },
121941
121969
  },
121942
121970
  'test': {
@@ -128930,6 +128958,8 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
128930
128958
  'option': false,
128931
128959
  'addMargin': false,
128932
128960
  'cancelOrder': true,
128961
+ 'closeAllPositions': false,
128962
+ 'closePosition': false,
128933
128963
  'createDepositAddress': true,
128934
128964
  'createMarketOrder': false,
128935
128965
  'createOrder': true,
@@ -129239,26 +129269,28 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
129239
129269
  const networks = {};
129240
129270
  const networkId = this.safeString(currency, 9);
129241
129271
  const networkCode = this.networkIdToCode(networkId);
129242
- networks[networkCode] = {
129243
- 'info': currency,
129244
- 'id': networkId,
129245
- 'network': networkCode,
129246
- 'active': undefined,
129247
- 'deposit': undefined,
129248
- 'withdraw': undefined,
129249
- 'fee': undefined,
129250
- 'precision': precision,
129251
- 'limits': {
129252
- 'deposit': {
129253
- 'min': undefined,
129254
- 'max': undefined,
129255
- },
129256
- 'withdraw': {
129257
- 'min': undefined,
129258
- 'max': undefined,
129272
+ if (networkCode !== undefined) {
129273
+ networks[networkCode] = {
129274
+ 'info': currency,
129275
+ 'id': networkId,
129276
+ 'network': networkCode,
129277
+ 'active': undefined,
129278
+ 'deposit': undefined,
129279
+ 'withdraw': undefined,
129280
+ 'fee': undefined,
129281
+ 'precision': precision,
129282
+ 'limits': {
129283
+ 'deposit': {
129284
+ 'min': undefined,
129285
+ 'max': undefined,
129286
+ },
129287
+ 'withdraw': {
129288
+ 'min': undefined,
129289
+ 'max': undefined,
129290
+ },
129259
129291
  },
129260
- },
129261
- };
129292
+ };
129293
+ }
129262
129294
  result[code] = {
129263
129295
  'info': currency,
129264
129296
  'id': id,
@@ -146748,6 +146780,8 @@ class idex extends _abstract_idex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
146748
146780
  'cancelAllOrders': true,
146749
146781
  'cancelOrder': true,
146750
146782
  'cancelOrders': false,
146783
+ 'closeAllPositions': false,
146784
+ 'closePosition': false,
146751
146785
  'createDepositAddress': false,
146752
146786
  'createOrder': true,
146753
146787
  'createReduceOnlyOrder': false,
@@ -148507,6 +148541,8 @@ class independentreserve extends _abstract_independentreserve_js__WEBPACK_IMPORT
148507
148541
  'option': false,
148508
148542
  'addMargin': false,
148509
148543
  'cancelOrder': true,
148544
+ 'closeAllPositions': false,
148545
+ 'closePosition': false,
148510
148546
  'createOrder': true,
148511
148547
  'createReduceOnlyOrder': false,
148512
148548
  'createStopLimitOrder': false,
@@ -149276,6 +149312,8 @@ class indodax extends _abstract_indodax_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
149276
149312
  'cancelAllOrders': false,
149277
149313
  'cancelOrder': true,
149278
149314
  'cancelOrders': false,
149315
+ 'closeAllPositions': false,
149316
+ 'closePosition': false,
149279
149317
  'createDepositAddress': false,
149280
149318
  'createOrder': true,
149281
149319
  'createReduceOnlyOrder': false,
@@ -150648,6 +150686,91 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
150648
150686
  'ZEC': 'Zcash (Transparent)',
150649
150687
  'ZRX': '0x (ZRX)',
150650
150688
  },
150689
+ 'withdrawMethods': {
150690
+ 'Lightning': 'Lightning',
150691
+ 'Bitcoin': 'BTC',
150692
+ 'Ripple': 'XRP',
150693
+ 'Litecoin': 'LTC',
150694
+ 'Dogecoin': 'DOGE',
150695
+ 'Stellar': 'XLM',
150696
+ 'Ethereum': 'ERC20',
150697
+ 'Arbitrum One': 'Arbitrum',
150698
+ 'Polygon': 'MATIC',
150699
+ 'Arbitrum Nova': 'Arbitrum',
150700
+ 'Optimism': 'Optimism',
150701
+ 'zkSync Era': 'zkSync',
150702
+ 'Ethereum Classic': 'ETC',
150703
+ 'Zcash': 'ZEC',
150704
+ 'Monero': 'XMR',
150705
+ 'Tron': 'TRC20',
150706
+ 'Solana': 'SOL',
150707
+ 'EOS': 'EOS',
150708
+ 'Bitcoin Cash': 'BCH',
150709
+ 'Cardano': 'ADA',
150710
+ 'Qtum': 'QTUM',
150711
+ 'Tezos': 'XTZ',
150712
+ 'Cosmos': 'ATOM',
150713
+ 'Nano': 'NANO',
150714
+ 'Siacoin': 'SC',
150715
+ 'Lisk': 'LSK',
150716
+ 'Waves': 'WAVES',
150717
+ 'ICON': 'ICX',
150718
+ 'Algorand': 'ALGO',
150719
+ 'Polygon - USDC.e': 'MATIC',
150720
+ 'Arbitrum One - USDC.e': 'Arbitrum',
150721
+ 'Polkadot': 'DOT',
150722
+ 'Kava': 'KAVA',
150723
+ 'Filecoin': 'FIL',
150724
+ 'Kusama': 'KSM',
150725
+ 'Flow': 'FLOW',
150726
+ 'Energy Web': 'EW',
150727
+ 'Mina': 'MINA',
150728
+ 'Centrifuge': 'CFG',
150729
+ 'Karura': 'KAR',
150730
+ 'Moonriver': 'MOVR',
150731
+ 'Shiden': 'SDN',
150732
+ 'Khala': 'PHA',
150733
+ 'Bifrost Kusama': 'BNC',
150734
+ 'Songbird': 'SGB',
150735
+ 'Terra classic': 'LUNC',
150736
+ 'KILT': 'KILT',
150737
+ 'Basilisk': 'BSX',
150738
+ 'Flare': 'FLR',
150739
+ 'Avalanche C-Chain': 'AVAX',
150740
+ 'Kintsugi': 'KINT',
150741
+ 'Altair': 'AIR',
150742
+ 'Moonbeam': 'GLMR',
150743
+ 'Acala': 'ACA',
150744
+ 'Astar': 'ASTR',
150745
+ 'Akash': 'AKT',
150746
+ 'Robonomics': 'XRT',
150747
+ 'Fantom': 'FTM',
150748
+ 'Elrond': 'EGLD',
150749
+ 'THORchain': 'RUNE',
150750
+ 'Secret': 'SCRT',
150751
+ 'Near': 'NEAR',
150752
+ 'Internet Computer Protocol': 'ICP',
150753
+ 'Picasso': 'PICA',
150754
+ 'Crust Shadow': 'CSM',
150755
+ 'Integritee': 'TEER',
150756
+ 'Parallel Finance': 'PARA',
150757
+ 'HydraDX': 'HDX',
150758
+ 'Interlay': 'INTR',
150759
+ 'Fetch.ai': 'FET',
150760
+ 'NYM': 'NYM',
150761
+ 'Terra 2.0': 'LUNA2',
150762
+ 'Juno': 'JUNO',
150763
+ 'Nodle': 'NODL',
150764
+ 'Stacks': 'STX',
150765
+ 'Ethereum PoW': 'ETHW',
150766
+ 'Aptos': 'APT',
150767
+ 'Sui': 'SUI',
150768
+ 'Genshiro': 'GENS',
150769
+ 'Aventus': 'AVT',
150770
+ 'Sei': 'SEI',
150771
+ 'OriginTrail': 'OTP',
150772
+ 'Celestia': 'TIA',
150773
+ },
150651
150774
  },
150652
150775
  'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
150653
150776
  'exceptions': {
@@ -152394,6 +152517,10 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
152394
152517
  };
152395
152518
  return this.safeString(statuses, status, status);
152396
152519
  }
152520
+ parseNetwork(network) {
152521
+ const withdrawMethods = this.safeValue(this.options, 'withdrawMethods', {});
152522
+ return this.safeString(withdrawMethods, network, network);
152523
+ }
152397
152524
  parseTransaction(transaction, currency = undefined) {
152398
152525
  //
152399
152526
  // fetchDeposits
@@ -152444,6 +152571,8 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
152444
152571
  // "fee": "0.0050000000",
152445
152572
  // "time": 1530481750,
152446
152573
  // "status": "Success"
152574
+ // "key":"Huobi wallet",
152575
+ // "network":"Tron"
152447
152576
  // status-prop: 'on-hold' // this field might not be present in some cases
152448
152577
  // }
152449
152578
  //
@@ -152480,7 +152609,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
152480
152609
  'id': id,
152481
152610
  'currency': code,
152482
152611
  'amount': amount,
152483
- 'network': undefined,
152612
+ 'network': this.parseNetwork(this.safeString(transaction, 'network')),
152484
152613
  'address': address,
152485
152614
  'addressTo': undefined,
152486
152615
  'addressFrom': undefined,
@@ -152584,19 +152713,28 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
152584
152713
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
152585
152714
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
152586
152715
  * @param {object} [params] extra parameters specific to the exchange API endpoint
152716
+ * @param {object} [params.end] End timestamp, withdrawals created strictly after will be not be included in the response
152717
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
152587
152718
  * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
152588
- */
152589
- // https://www.kraken.com/en-us/help/api#withdraw-status
152590
- if (code === undefined) {
152591
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchWithdrawals() requires a currency code argument');
152592
- }
152719
+ */
152593
152720
  await this.loadMarkets();
152594
- const currency = this.currency(code);
152595
- const request = {
152596
- 'asset': currency['id'],
152597
- };
152721
+ let paginate = false;
152722
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
152723
+ if (paginate) {
152724
+ params['cursor'] = true;
152725
+ return await this.fetchPaginatedCallCursor('fetchWithdrawals', code, since, limit, params, 'next_cursor', 'cursor');
152726
+ }
152727
+ const request = {};
152728
+ if (code !== undefined) {
152729
+ const currency = this.currency(code);
152730
+ request['asset'] = currency['id'];
152731
+ }
152732
+ if (since !== undefined) {
152733
+ request['since'] = since.toString();
152734
+ }
152598
152735
  const response = await this.privatePostWithdrawStatus(this.extend(request, params));
152599
152736
  //
152737
+ // with no pagination
152600
152738
  // { error: [],
152601
152739
  // "result": [ { "method": "Ether",
152602
152740
  // "aclass": "currency",
@@ -152608,8 +152746,51 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
152608
152746
  // "fee": "0.0050000000",
152609
152747
  // "time": 1530481750,
152610
152748
  // "status": "Success" } ] }
152749
+ // with pagination
152750
+ // {
152751
+ // "error":[],
152752
+ // "result":{
152753
+ // "withdrawals":[
152754
+ // {
152755
+ // "method":"Tether USD (TRC20)",
152756
+ // "aclass":"currency",
152757
+ // "asset":"USDT",
152758
+ // "refid":"BSNFZU2-MEFN4G-J3NEZV",
152759
+ // "txid":"1c7a642fb7387bbc2c6a2c509fd1ae146937f4cf793b4079a4f0715e3a02615a",
152760
+ // "info":"TQmdxSuC16EhFg8FZWtYgrfFRosoRF7bCp",
152761
+ // "amount":"1996.50000000",
152762
+ // "fee":"2.50000000",
152763
+ // "time":1669126657,
152764
+ // "status":"Success",
152765
+ // "key":"poloniex",
152766
+ // "network":"Tron"
152767
+ // },
152768
+ // ...
152769
+ // ],
152770
+ // "next_cursor":"HgAAAAAAAABGVFRSd3k1LVF4Y0JQY05Gd0xRY0NxenFndHpybkwBAQH2AwEBAAAAAQAAAAAAAAABAAAAAAAZAAAAAAAAAA=="
152771
+ // }
152772
+ // }
152611
152773
  //
152612
- return this.parseTransactionsByType('withdrawal', response['result'], code, since, limit);
152774
+ let rawWithdrawals = undefined;
152775
+ const result = this.safeValue(response, 'result');
152776
+ if (!Array.isArray(result)) {
152777
+ rawWithdrawals = this.addPaginationCursorToResult(result);
152778
+ }
152779
+ else {
152780
+ rawWithdrawals = result;
152781
+ }
152782
+ return this.parseTransactionsByType('withdrawal', rawWithdrawals, code, since, limit);
152783
+ }
152784
+ addPaginationCursorToResult(result) {
152785
+ const cursor = this.safeString(result, 'next_cursor');
152786
+ const data = this.safeValue(result, 'withdrawals');
152787
+ const dataLength = data.length;
152788
+ if (cursor !== undefined && dataLength > 0) {
152789
+ const last = data[dataLength - 1];
152790
+ last['next_cursor'] = cursor;
152791
+ data[dataLength - 1] = last;
152792
+ }
152793
+ return data;
152613
152794
  }
152614
152795
  async createDepositAddress(code, params = {}) {
152615
152796
  /**
@@ -155470,6 +155651,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
155470
155651
  'borrowIsolatedMargin': true,
155471
155652
  'cancelAllOrders': true,
155472
155653
  'cancelOrder': true,
155654
+ 'closeAllPositions': false,
155655
+ 'closePosition': false,
155473
155656
  'createDepositAddress': true,
155474
155657
  'createOrder': true,
155475
155658
  'createOrders': true,
@@ -162304,6 +162487,8 @@ class kuna extends _abstract_kuna_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
162304
162487
  'borrowMargin': false,
162305
162488
  'cancelOrder': true,
162306
162489
  'cancelOrders': true,
162490
+ 'closeAllPositions': false,
162491
+ 'closePosition': false,
162307
162492
  'createDepositAddress': true,
162308
162493
  'createOrder': true,
162309
162494
  'createPostOnlyOrder': false,
@@ -164255,6 +164440,8 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
164255
164440
  'option': false,
164256
164441
  'cancelAllOrders': true,
164257
164442
  'cancelOrder': true,
164443
+ 'closeAllPositions': false,
164444
+ 'closePosition': false,
164258
164445
  'createOrder': true,
164259
164446
  'createPostOnlyOrder': false,
164260
164447
  'createStopLimitOrder': true,
@@ -168798,6 +168985,8 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
168798
168985
  'option': false,
168799
168986
  'addMargin': false,
168800
168987
  'cancelOrder': true,
168988
+ 'closeAllPositions': false,
168989
+ 'closePosition': false,
168801
168990
  'createOrder': true,
168802
168991
  'createReduceOnlyOrder': false,
168803
168992
  'fetchAccounts': true,
@@ -171148,6 +171337,8 @@ class mercado extends _abstract_mercado_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
171148
171337
  'option': false,
171149
171338
  'addMargin': false,
171150
171339
  'cancelOrder': true,
171340
+ 'closeAllPositions': false,
171341
+ 'closePosition': false,
171151
171342
  'createMarketOrder': true,
171152
171343
  'createOrder': true,
171153
171344
  'createReduceOnlyOrder': false,
@@ -172059,6 +172250,8 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172059
172250
  'cancelAllOrders': true,
172060
172251
  'cancelOrder': true,
172061
172252
  'cancelOrders': undefined,
172253
+ 'closeAllPositions': false,
172254
+ 'closePosition': false,
172062
172255
  'createDepositAddress': true,
172063
172256
  'createOrder': true,
172064
172257
  'createOrders': true,
@@ -177394,6 +177587,8 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
177394
177587
  'addMargin': false,
177395
177588
  'cancelAllOrders': true,
177396
177589
  'cancelOrder': true,
177590
+ 'closeAllPositions': false,
177591
+ 'closePosition': false,
177397
177592
  'createDepositAddress': true,
177398
177593
  'createOrder': true,
177399
177594
  'createReduceOnlyOrder': false,
@@ -179853,6 +180048,8 @@ class novadax extends _abstract_novadax_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
179853
180048
  'option': false,
179854
180049
  'addMargin': false,
179855
180050
  'cancelOrder': true,
180051
+ 'closeAllPositions': false,
180052
+ 'closePosition': false,
179856
180053
  'createOrder': true,
179857
180054
  'createReduceOnlyOrder': false,
179858
180055
  'createStopLimitOrder': true,
@@ -185645,6 +185842,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
185645
185842
  'finance/savings/lending-rate-history': 5 / 3,
185646
185843
  // public broker
185647
185844
  'finance/sfp/dcd/products': 2 / 3,
185845
+ // copytrading
185846
+ 'copytrading/public-lead-traders': 4,
185847
+ 'copytrading/public-weekly-pnl': 4,
185848
+ 'copytrading/public-stats': 4,
185849
+ 'copytrading/public-preference-currency': 4,
185850
+ 'copytrading/public-current-subpositions': 4,
185851
+ 'copytrading/public-subpositions-history': 4,
185648
185852
  },
185649
185853
  },
185650
185854
  'private': {
@@ -185754,12 +185958,16 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
185754
185958
  'finance/staking-defi/eth/balance': 5 / 3,
185755
185959
  'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
185756
185960
  // copytrading
185757
- 'copytrading/current-subpositions': 4,
185758
- 'copytrading/subpositions-history': 10,
185759
- 'copytrading/instruments': 10,
185760
- 'copytrading/profit-sharing-details': 10,
185761
- 'copytrading/total-profit-sharing': 10,
185762
- 'copytrading/unrealized-profit-sharing-details': 10,
185961
+ 'copytrading/current-subpositions': 1,
185962
+ 'copytrading/subpositions-history': 1,
185963
+ 'copytrading/instruments': 4,
185964
+ 'copytrading/profit-sharing-details': 4,
185965
+ 'copytrading/total-profit-sharing': 4,
185966
+ 'copytrading/unrealized-profit-sharing-details': 4,
185967
+ 'copytrading/copy-settings': 4,
185968
+ 'copytrading/batch-leverage-info': 4,
185969
+ 'copytrading/current-lead-traders': 4,
185970
+ 'copytrading/lead-traders-history': 4,
185763
185971
  // broker
185764
185972
  'broker/nd/info': 10,
185765
185973
  'broker/nd/subaccount-info': 10,
@@ -185864,9 +186072,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
185864
186072
  'finance/staking-defi/eth/purchase': 5,
185865
186073
  'finance/staking-defi/eth/redeem': 5,
185866
186074
  // copytrading
185867
- 'copytrading/algo-order': 20,
185868
- 'copytrading/close-subposition': 4,
185869
- 'copytrading/set-instruments': 10,
186075
+ 'copytrading/algo-order': 1,
186076
+ 'copytrading/close-subposition': 1,
186077
+ 'copytrading/set-instruments': 4,
186078
+ 'copytrading/first-copy-settings': 4,
186079
+ 'copytrading/amend-copy-settings': 4,
186080
+ 'copytrading/stop-copy-trading': 4,
186081
+ 'copytrading/batch-set-leverage': 4,
185870
186082
  // broker
185871
186083
  'broker/nd/create-subaccount': 0.25,
185872
186084
  'broker/nd/delete-subaccount': 1,
@@ -192602,6 +192814,8 @@ class p2b extends _abstract_p2b_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
192602
192814
  'cancelAllOrders': false,
192603
192815
  'cancelOrder': true,
192604
192816
  'cancelOrders': false,
192817
+ 'closeAllPositions': false,
192818
+ 'closePosition': false,
192605
192819
  'createDepositAddress': false,
192606
192820
  'createMarketOrder': false,
192607
192821
  'createOrder': true,
@@ -199698,32 +199912,34 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
199698
199912
  let withdrawAvailable = this.safeValue(result[code], 'withdraw');
199699
199913
  withdrawAvailable = (withdrawEnabled) ? withdrawEnabled : withdrawAvailable;
199700
199914
  const networks = this.safeValue(result[code], 'networks', {});
199701
- networks[networkCode] = {
199702
- 'info': currency,
199703
- 'id': networkId,
199704
- 'network': networkCode,
199705
- 'currencyId': id,
199706
- 'numericId': numericId,
199707
- 'deposit': depositEnabled,
199708
- 'withdraw': withdrawEnabled,
199709
- 'active': active,
199710
- 'fee': this.parseNumber(feeString),
199711
- 'precision': undefined,
199712
- 'limits': {
199713
- 'amount': {
199714
- 'min': undefined,
199715
- 'max': undefined,
199716
- },
199717
- 'withdraw': {
199718
- 'min': undefined,
199719
- 'max': undefined,
199720
- },
199721
- 'deposit': {
199722
- 'min': undefined,
199723
- 'max': undefined,
199915
+ if (networkCode !== undefined) {
199916
+ networks[networkCode] = {
199917
+ 'info': currency,
199918
+ 'id': networkId,
199919
+ 'network': networkCode,
199920
+ 'currencyId': id,
199921
+ 'numericId': numericId,
199922
+ 'deposit': depositEnabled,
199923
+ 'withdraw': withdrawEnabled,
199924
+ 'active': active,
199925
+ 'fee': this.parseNumber(feeString),
199926
+ 'precision': undefined,
199927
+ 'limits': {
199928
+ 'amount': {
199929
+ 'min': undefined,
199930
+ 'max': undefined,
199931
+ },
199932
+ 'withdraw': {
199933
+ 'min': undefined,
199934
+ 'max': undefined,
199935
+ },
199936
+ 'deposit': {
199937
+ 'min': undefined,
199938
+ 'max': undefined,
199939
+ },
199724
199940
  },
199725
- },
199726
- };
199941
+ };
199942
+ }
199727
199943
  result[code]['networks'] = networks;
199728
199944
  const info = this.safeValue(result[code], 'info', []);
199729
199945
  const rawInfo = {};
@@ -204830,6 +205046,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
204830
205046
  'watchOrderBook': true,
204831
205047
  'watchOrderBookForSymbols': true,
204832
205048
  'watchOrders': true,
205049
+ 'watchOrdersForSymbols': true,
204833
205050
  'watchPositions': true,
204834
205051
  'watchTicker': true,
204835
205052
  'watchTickers': true,
@@ -206869,6 +207086,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
206869
207086
  /**
206870
207087
  * @method
206871
207088
  * @name binance#watchOrders
207089
+ * @see https://binance-docs.github.io/apidocs/spot/en/#payload-order-update
206872
207090
  * @description watches information on multiple orders made by the user
206873
207091
  * @param {string} symbol unified market symbol of the market orders were made in
206874
207092
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -206882,7 +207100,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
206882
207100
  if (symbol !== undefined) {
206883
207101
  market = this.market(symbol);
206884
207102
  symbol = market['symbol'];
206885
- messageHash += ':' + symbol;
207103
+ messageHash += '::' + symbol;
206886
207104
  }
206887
207105
  let type = undefined;
206888
207106
  [type, params] = this.handleMarketTypeAndParams('watchOrders', market, params);
@@ -206905,11 +207123,63 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
206905
207123
  this.setBalanceCache(client, type);
206906
207124
  this.setPositionsCache(client, type);
206907
207125
  const message = undefined;
206908
- const orders = await this.watch(url, messageHash, message, type);
207126
+ const newOrder = await this.watch(url, messageHash, message, type);
206909
207127
  if (this.newUpdates) {
206910
- limit = orders.getLimit(symbol, limit);
207128
+ return newOrder;
206911
207129
  }
206912
- return this.filterBySymbolSinceLimit(orders, symbol, since, limit, true);
207130
+ return this.filterBySymbolSinceLimit(this.orders, symbol, since, limit, true);
207131
+ }
207132
+ async watchOrdersForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
207133
+ /**
207134
+ * @method
207135
+ * @name binance#watchOrdersForSymbols
207136
+ * @see https://binance-docs.github.io/apidocs/spot/en/#payload-order-update
207137
+ * @description watches information on multiple orders made by the user
207138
+ * @param {string[]} symbols unified symbol of the market to fetch orders for
207139
+ * @param {int} [since] the earliest time in ms to fetch orders for
207140
+ * @param {int} [limit] the maximum number of trade structures to retrieve
207141
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
207142
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
207143
+ */
207144
+ let marginMode = undefined;
207145
+ [marginMode, params] = this.handleMarginModeAndParams('authenticate', params);
207146
+ const isIsolatedMargin = (marginMode === 'isolated');
207147
+ if (isIsolatedMargin) {
207148
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' watchOrdersForSymbols does not support isolated margin markets, use watchOrders instead');
207149
+ }
207150
+ await this.loadMarkets();
207151
+ let type = undefined;
207152
+ const market = this.getMarketFromSymbols(symbols);
207153
+ [type, params] = this.handleMarketTypeAndParams('watchOrdersForSymbols', market, params);
207154
+ symbols = this.marketSymbols(symbols, type, true, true, true);
207155
+ let messageHash = 'orders';
207156
+ if (symbols !== undefined) {
207157
+ messageHash = messageHash + '::' + symbols.join(',');
207158
+ }
207159
+ let subType = undefined;
207160
+ [subType, params] = this.handleSubTypeAndParams('watchOrdersForSymbols', market, params);
207161
+ if (this.isLinear(type, subType)) {
207162
+ type = 'future';
207163
+ }
207164
+ else if (this.isInverse(type, subType)) {
207165
+ type = 'delivery';
207166
+ }
207167
+ params = this.extend(params, { 'type': type });
207168
+ await this.authenticate(params);
207169
+ let urlType = type;
207170
+ if (type === 'margin') {
207171
+ urlType = 'spot'; // spot-margin shares the same stream as regular spot
207172
+ }
207173
+ const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
207174
+ const client = this.client(url);
207175
+ this.setBalanceCache(client, type);
207176
+ this.setPositionsCache(client, type);
207177
+ const message = undefined;
207178
+ const newOrders = await this.watch(url, messageHash, message, type);
207179
+ if (this.newUpdates) {
207180
+ return newOrders;
207181
+ }
207182
+ return this.filterBySymbolsSinceLimit(this.orders, symbols, since, limit, true);
206913
207183
  }
206914
207184
  parseWsOrder(order, market = undefined) {
206915
207185
  //
@@ -207540,7 +207810,6 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
207540
207810
  }
207541
207811
  }
207542
207812
  handleOrder(client, message) {
207543
- const messageHash = 'orders';
207544
207813
  const parsed = this.parseWsOrder(message);
207545
207814
  const symbol = this.safeString(parsed, 'symbol');
207546
207815
  const orderId = this.safeString(parsed, 'id');
@@ -207569,9 +207838,8 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
207569
207838
  }
207570
207839
  }
207571
207840
  cachedOrders.append(parsed);
207572
- client.resolve(this.orders, messageHash);
207573
- const messageHashSymbol = messageHash + ':' + symbol;
207574
- client.resolve(this.orders, messageHashSymbol);
207841
+ this.resolvePromiseIfMessagehashMatches(client, 'orders::', symbol, parsed);
207842
+ client.resolve(parsed, 'orders');
207575
207843
  }
207576
207844
  }
207577
207845
  handleAcountUpdate(client, message) {
@@ -223884,8 +224152,8 @@ class coinbasepro extends _coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defau
223884
224152
  * @param {object} [params] extra parameters specific to the exchange API endpoint
223885
224153
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
223886
224154
  */
223887
- symbols = this.marketSymbols(symbols, undefined, false);
223888
224155
  await this.loadMarkets();
224156
+ symbols = this.marketSymbols(symbols, undefined, false);
223889
224157
  const name = 'user';
223890
224158
  const messageHash = 'multipleOrders::';
223891
224159
  const authentication = this.authenticate();
@@ -269942,6 +270210,8 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
269942
270210
  'option': false,
269943
270211
  'addMargin': false,
269944
270212
  'cancelOrder': true,
270213
+ 'closeAllPositions': false,
270214
+ 'closePosition': false,
269945
270215
  'createMarketOrder': true,
269946
270216
  'createOrder': true,
269947
270217
  'createReduceOnlyOrder': false,
@@ -272558,6 +272828,8 @@ class wazirx extends _abstract_wazirx_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
272558
272828
  'borrowMargin': false,
272559
272829
  'cancelAllOrders': true,
272560
272830
  'cancelOrder': true,
272831
+ 'closeAllPositions': false,
272832
+ 'closePosition': false,
272561
272833
  'createOrder': true,
272562
272834
  'createReduceOnlyOrder': false,
272563
272835
  'createStopLimitOrder': true,
@@ -275808,6 +276080,8 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
275808
276080
  'cancelAllOrders': true,
275809
276081
  'cancelOrder': true,
275810
276082
  'cancelWithdraw': false,
276083
+ 'closeAllPositions': false,
276084
+ 'closePosition': false,
275811
276085
  'createDepositAddress': false,
275812
276086
  'createMarketOrder': false,
275813
276087
  'createOrder': true,
@@ -278445,6 +278719,8 @@ class yobit extends _abstract_yobit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
278445
278719
  'option': false,
278446
278720
  'addMargin': false,
278447
278721
  'cancelOrder': true,
278722
+ 'closeAllPositions': false,
278723
+ 'closePosition': false,
278448
278724
  'createDepositAddress': true,
278449
278725
  'createMarketOrder': false,
278450
278726
  'createOrder': true,
@@ -280514,6 +280790,8 @@ class zonda extends _abstract_zonda_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
280514
280790
  'cancelAllOrders': false,
280515
280791
  'cancelOrder': true,
280516
280792
  'cancelOrders': false,
280793
+ 'closeAllPositions': false,
280794
+ 'closePosition': false,
280517
280795
  'createDepositAddress': false,
280518
280796
  'createOrder': true,
280519
280797
  'createReduceOnlyOrder': false,
@@ -287922,7 +288200,7 @@ SOFTWARE.
287922
288200
 
287923
288201
  //-----------------------------------------------------------------------------
287924
288202
  // this is updated by vss.js when building
287925
- const version = '4.1.74';
288203
+ const version = '4.1.76';
287926
288204
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
287927
288205
  //-----------------------------------------------------------------------------
287928
288206