ccxt 4.4.39 → 4.4.40

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 (185) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ascendex.js +9 -9
  5. package/dist/cjs/src/base/Exchange.js +12 -18
  6. package/dist/cjs/src/binance.js +13 -19
  7. package/dist/cjs/src/bingx.js +1 -2
  8. package/dist/cjs/src/bit2c.js +0 -1
  9. package/dist/cjs/src/bitbank.js +0 -1
  10. package/dist/cjs/src/bitbns.js +0 -1
  11. package/dist/cjs/src/bitfinex.js +17 -18
  12. package/dist/cjs/src/bitfinex1.js +0 -1
  13. package/dist/cjs/src/bitflyer.js +0 -1
  14. package/dist/cjs/src/bitget.js +1 -2
  15. package/dist/cjs/src/bithumb.js +0 -1
  16. package/dist/cjs/src/bitmart.js +3 -4
  17. package/dist/cjs/src/bitmex.js +5 -6
  18. package/dist/cjs/src/bitopro.js +4 -5
  19. package/dist/cjs/src/bitrue.js +5 -7
  20. package/dist/cjs/src/bitso.js +1 -2
  21. package/dist/cjs/src/bitstamp.js +1 -2
  22. package/dist/cjs/src/bitteam.js +1 -3
  23. package/dist/cjs/src/bitvavo.js +2 -4
  24. package/dist/cjs/src/blockchaincom.js +5 -5
  25. package/dist/cjs/src/blofin.js +10 -10
  26. package/dist/cjs/src/btcalpha.js +0 -1
  27. package/dist/cjs/src/btcbox.js +0 -1
  28. package/dist/cjs/src/btcmarkets.js +1 -3
  29. package/dist/cjs/src/bybit.js +2 -3
  30. package/dist/cjs/src/cex.js +1 -1
  31. package/dist/cjs/src/coinbase.js +77 -1
  32. package/dist/cjs/src/coinbaseexchange.js +1 -1
  33. package/dist/cjs/src/coinbaseinternational.js +62 -0
  34. package/dist/cjs/src/coincatch.js +1 -1
  35. package/dist/cjs/src/coinex.js +9 -9
  36. package/dist/cjs/src/coinlist.js +1 -1
  37. package/dist/cjs/src/coinmetro.js +1 -1
  38. package/dist/cjs/src/cryptocom.js +91 -2
  39. package/dist/cjs/src/currencycom.js +1 -1
  40. package/dist/cjs/src/defx.js +1 -2
  41. package/dist/cjs/src/delta.js +1 -1
  42. package/dist/cjs/src/digifinex.js +1 -1
  43. package/dist/cjs/src/exmo.js +2 -2
  44. package/dist/cjs/src/gate.js +1 -1
  45. package/dist/cjs/src/hashkey.js +3 -5
  46. package/dist/cjs/src/htx.js +1 -1
  47. package/dist/cjs/src/hyperliquid.js +1 -1
  48. package/dist/cjs/src/kraken.js +1 -1
  49. package/dist/cjs/src/kucoin.js +24 -24
  50. package/dist/cjs/src/luno.js +1 -1
  51. package/dist/cjs/src/mexc.js +138 -2
  52. package/dist/cjs/src/ndax.js +1 -1
  53. package/dist/cjs/src/okcoin.js +18 -18
  54. package/dist/cjs/src/okx.js +21 -21
  55. package/dist/cjs/src/phemex.js +12 -8
  56. package/dist/cjs/src/poloniex.js +1 -1
  57. package/dist/cjs/src/poloniexfutures.js +6 -6
  58. package/dist/cjs/src/pro/bitget.js +1 -1
  59. package/dist/cjs/src/pro/bybit.js +13 -1
  60. package/dist/cjs/src/pro/coinex.js +2 -2
  61. package/dist/cjs/src/pro/gate.js +6 -6
  62. package/dist/cjs/src/pro/kucoin.js +3 -3
  63. package/dist/cjs/src/pro/okx.js +11 -11
  64. package/dist/cjs/src/pro/upbit.js +3 -3
  65. package/dist/cjs/src/vertex.js +11 -11
  66. package/dist/cjs/src/woo.js +33 -33
  67. package/dist/cjs/src/woofipro.js +24 -24
  68. package/dist/cjs/src/xt.js +26 -26
  69. package/dist/cjs/src/zonda.js +1 -1
  70. package/js/ccxt.d.ts +1 -1
  71. package/js/ccxt.js +1 -1
  72. package/js/src/ascendex.d.ts +2 -2
  73. package/js/src/ascendex.js +9 -9
  74. package/js/src/base/Exchange.js +12 -18
  75. package/js/src/binance.d.ts +9 -9
  76. package/js/src/binance.js +13 -19
  77. package/js/src/bingx.d.ts +1 -1
  78. package/js/src/bingx.js +1 -2
  79. package/js/src/bit2c.js +0 -1
  80. package/js/src/bitbank.js +0 -1
  81. package/js/src/bitbns.js +0 -1
  82. package/js/src/bitfinex.d.ts +3 -3
  83. package/js/src/bitfinex.js +17 -18
  84. package/js/src/bitfinex1.js +0 -1
  85. package/js/src/bitflyer.js +0 -1
  86. package/js/src/bitget.d.ts +1 -1
  87. package/js/src/bitget.js +1 -2
  88. package/js/src/bithumb.js +0 -1
  89. package/js/src/bitmart.d.ts +1 -1
  90. package/js/src/bitmart.js +3 -4
  91. package/js/src/bitmex.d.ts +1 -1
  92. package/js/src/bitmex.js +5 -6
  93. package/js/src/bitopro.js +4 -5
  94. package/js/src/bitrue.js +5 -7
  95. package/js/src/bitso.d.ts +1 -1
  96. package/js/src/bitso.js +1 -2
  97. package/js/src/bitstamp.d.ts +1 -1
  98. package/js/src/bitstamp.js +1 -2
  99. package/js/src/bitteam.js +1 -3
  100. package/js/src/bitvavo.d.ts +1 -1
  101. package/js/src/bitvavo.js +2 -4
  102. package/js/src/blockchaincom.js +5 -5
  103. package/js/src/blofin.d.ts +3 -3
  104. package/js/src/blofin.js +10 -10
  105. package/js/src/btcalpha.js +0 -1
  106. package/js/src/btcbox.js +0 -1
  107. package/js/src/btcmarkets.js +1 -3
  108. package/js/src/bybit.d.ts +1 -1
  109. package/js/src/bybit.js +2 -3
  110. package/js/src/cex.d.ts +1 -1
  111. package/js/src/cex.js +1 -1
  112. package/js/src/coinbase.d.ts +1 -1
  113. package/js/src/coinbase.js +77 -1
  114. package/js/src/coinbaseexchange.d.ts +1 -1
  115. package/js/src/coinbaseexchange.js +1 -1
  116. package/js/src/coinbaseinternational.js +62 -0
  117. package/js/src/coincatch.d.ts +1 -1
  118. package/js/src/coincatch.js +1 -1
  119. package/js/src/coinex.js +9 -9
  120. package/js/src/coinlist.d.ts +1 -1
  121. package/js/src/coinlist.js +1 -1
  122. package/js/src/coinmetro.d.ts +1 -1
  123. package/js/src/coinmetro.js +1 -1
  124. package/js/src/cryptocom.d.ts +2 -2
  125. package/js/src/cryptocom.js +91 -2
  126. package/js/src/currencycom.d.ts +1 -1
  127. package/js/src/currencycom.js +1 -1
  128. package/js/src/defx.d.ts +1 -2
  129. package/js/src/defx.js +1 -2
  130. package/js/src/delta.d.ts +1 -1
  131. package/js/src/delta.js +1 -1
  132. package/js/src/digifinex.d.ts +1 -1
  133. package/js/src/digifinex.js +1 -1
  134. package/js/src/exmo.js +2 -2
  135. package/js/src/gate.d.ts +1 -1
  136. package/js/src/gate.js +1 -1
  137. package/js/src/hashkey.d.ts +1 -1
  138. package/js/src/hashkey.js +3 -5
  139. package/js/src/htx.d.ts +1 -1
  140. package/js/src/htx.js +1 -1
  141. package/js/src/hyperliquid.d.ts +1 -1
  142. package/js/src/hyperliquid.js +1 -1
  143. package/js/src/kraken.d.ts +1 -1
  144. package/js/src/kraken.js +1 -1
  145. package/js/src/kucoin.d.ts +13 -13
  146. package/js/src/kucoin.js +24 -24
  147. package/js/src/luno.d.ts +1 -1
  148. package/js/src/luno.js +1 -1
  149. package/js/src/mexc.d.ts +1 -2
  150. package/js/src/mexc.js +138 -2
  151. package/js/src/ndax.d.ts +1 -1
  152. package/js/src/ndax.js +1 -1
  153. package/js/src/okcoin.d.ts +4 -4
  154. package/js/src/okcoin.js +18 -18
  155. package/js/src/okx.d.ts +3 -3
  156. package/js/src/okx.js +21 -21
  157. package/js/src/phemex.js +12 -8
  158. package/js/src/poloniex.d.ts +1 -1
  159. package/js/src/poloniex.js +1 -1
  160. package/js/src/poloniexfutures.d.ts +1 -1
  161. package/js/src/poloniexfutures.js +6 -6
  162. package/js/src/pro/bitget.d.ts +1 -1
  163. package/js/src/pro/bitget.js +1 -1
  164. package/js/src/pro/bybit.d.ts +1 -1
  165. package/js/src/pro/bybit.js +13 -1
  166. package/js/src/pro/coinex.js +2 -2
  167. package/js/src/pro/gate.d.ts +2 -2
  168. package/js/src/pro/gate.js +6 -6
  169. package/js/src/pro/kucoin.d.ts +1 -1
  170. package/js/src/pro/kucoin.js +3 -3
  171. package/js/src/pro/okx.d.ts +2 -2
  172. package/js/src/pro/okx.js +11 -11
  173. package/js/src/pro/upbit.d.ts +3 -3
  174. package/js/src/pro/upbit.js +3 -3
  175. package/js/src/vertex.d.ts +3 -3
  176. package/js/src/vertex.js +11 -11
  177. package/js/src/woo.d.ts +7 -7
  178. package/js/src/woo.js +33 -33
  179. package/js/src/woofipro.d.ts +1 -1
  180. package/js/src/woofipro.js +24 -24
  181. package/js/src/xt.d.ts +7 -7
  182. package/js/src/xt.js +26 -26
  183. package/js/src/zonda.d.ts +1 -1
  184. package/js/src/zonda.js +1 -1
  185. package/package.json +1 -1
@@ -1282,15 +1282,15 @@ export default class woofipro extends Exchange {
1282
1282
  const stopLoss = this.safeValue(params, 'stopLoss');
1283
1283
  const takeProfit = this.safeValue(params, 'takeProfit');
1284
1284
  const algoType = this.safeString(params, 'algoType');
1285
- const isStop = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
1285
+ const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
1286
1286
  const isMarket = orderType === 'MARKET';
1287
1287
  const timeInForce = this.safeStringLower(params, 'timeInForce');
1288
1288
  const postOnly = this.isPostOnly(isMarket, undefined, params);
1289
- const orderQtyKey = isStop ? 'quantity' : 'order_quantity';
1290
- const priceKey = isStop ? 'price' : 'order_price';
1291
- const typeKey = isStop ? 'type' : 'order_type';
1289
+ const orderQtyKey = isConditional ? 'quantity' : 'order_quantity';
1290
+ const priceKey = isConditional ? 'price' : 'order_price';
1291
+ const typeKey = isConditional ? 'type' : 'order_type';
1292
1292
  request[typeKey] = orderType; // LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
1293
- if (!isStop) {
1293
+ if (!isConditional) {
1294
1294
  if (postOnly) {
1295
1295
  request['order_type'] = 'POST_ONLY';
1296
1296
  }
@@ -1307,7 +1307,7 @@ export default class woofipro extends Exchange {
1307
1307
  if (price !== undefined) {
1308
1308
  request[priceKey] = this.priceToPrecision(symbol, price);
1309
1309
  }
1310
- if (isMarket && !isStop) {
1310
+ if (isMarket && !isConditional) {
1311
1311
  request[orderQtyKey] = this.amountToPrecision(symbol, amount);
1312
1312
  }
1313
1313
  else if (algoType !== 'POSITIONAL_TP_SL') {
@@ -1386,9 +1386,9 @@ export default class woofipro extends Exchange {
1386
1386
  const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1387
1387
  const stopLoss = this.safeValue(params, 'stopLoss');
1388
1388
  const takeProfit = this.safeValue(params, 'takeProfit');
1389
- const isStop = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
1389
+ const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
1390
1390
  let response = undefined;
1391
- if (isStop) {
1391
+ if (isConditional) {
1392
1392
  response = await this.v1PrivatePostAlgoOrder(request);
1393
1393
  //
1394
1394
  // {
@@ -1450,8 +1450,8 @@ export default class woofipro extends Exchange {
1450
1450
  const stopPrice = this.safeString2(orderParams, 'triggerPrice', 'stopPrice');
1451
1451
  const stopLoss = this.safeValue(orderParams, 'stopLoss');
1452
1452
  const takeProfit = this.safeValue(orderParams, 'takeProfit');
1453
- const isStop = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(orderParams, 'childOrders') !== undefined);
1454
- if (isStop) {
1453
+ const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(orderParams, 'childOrders') !== undefined);
1454
+ if (isConditional) {
1455
1455
  throw new NotSupported(this.id + 'createOrders() only support non-stop order');
1456
1456
  }
1457
1457
  const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
@@ -1510,9 +1510,9 @@ export default class woofipro extends Exchange {
1510
1510
  if (stopPrice !== undefined) {
1511
1511
  request['triggerPrice'] = this.priceToPrecision(symbol, stopPrice);
1512
1512
  }
1513
- const isStop = (stopPrice !== undefined) || (this.safeValue(params, 'childOrders') !== undefined);
1514
- const orderQtyKey = isStop ? 'quantity' : 'order_quantity';
1515
- const priceKey = isStop ? 'price' : 'order_price';
1513
+ const isConditional = (stopPrice !== undefined) || (this.safeValue(params, 'childOrders') !== undefined);
1514
+ const orderQtyKey = isConditional ? 'quantity' : 'order_quantity';
1515
+ const priceKey = isConditional ? 'price' : 'order_price';
1516
1516
  if (price !== undefined) {
1517
1517
  request[priceKey] = this.priceToPrecision(symbol, price);
1518
1518
  }
@@ -1521,7 +1521,7 @@ export default class woofipro extends Exchange {
1521
1521
  }
1522
1522
  params = this.omit(params, ['stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent']);
1523
1523
  let response = undefined;
1524
- if (isStop) {
1524
+ if (isConditional) {
1525
1525
  response = await this.v1PrivatePutAlgoOrder(this.extend(request, params));
1526
1526
  }
1527
1527
  else {
@@ -1581,9 +1581,9 @@ export default class woofipro extends Exchange {
1581
1581
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1582
1582
  */
1583
1583
  async cancelOrder(id, symbol = undefined, params = {}) {
1584
- const stop = this.safeBool2(params, 'stop', 'trigger', false);
1584
+ const trigger = this.safeBool2(params, 'stop', 'trigger', false);
1585
1585
  params = this.omit(params, ['stop', 'trigger']);
1586
- if (!stop && (symbol === undefined)) {
1586
+ if (!trigger && (symbol === undefined)) {
1587
1587
  throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
1588
1588
  }
1589
1589
  await this.loadMarkets();
@@ -1598,7 +1598,7 @@ export default class woofipro extends Exchange {
1598
1598
  const clientOrderIdExchangeSpecific = this.safeString(params, 'client_order_id', clientOrderIdUnified);
1599
1599
  const isByClientOrder = clientOrderIdExchangeSpecific !== undefined;
1600
1600
  let response = undefined;
1601
- if (stop) {
1601
+ if (trigger) {
1602
1602
  if (isByClientOrder) {
1603
1603
  request['client_order_id'] = clientOrderIdExchangeSpecific;
1604
1604
  params = this.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id']);
@@ -1642,7 +1642,7 @@ export default class woofipro extends Exchange {
1642
1642
  else {
1643
1643
  extendParams['id'] = id;
1644
1644
  }
1645
- if (stop) {
1645
+ if (trigger) {
1646
1646
  return this.extend(this.parseOrder(response), extendParams);
1647
1647
  }
1648
1648
  const data = this.safeDict(response, 'data', {});
@@ -1700,7 +1700,7 @@ export default class woofipro extends Exchange {
1700
1700
  */
1701
1701
  async cancelAllOrders(symbol = undefined, params = {}) {
1702
1702
  await this.loadMarkets();
1703
- const stop = this.safeBool2(params, 'stop', 'trigger');
1703
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
1704
1704
  params = this.omit(params, ['stop', 'trigger']);
1705
1705
  const request = {};
1706
1706
  if (symbol !== undefined) {
@@ -1708,13 +1708,13 @@ export default class woofipro extends Exchange {
1708
1708
  request['symbol'] = market['id'];
1709
1709
  }
1710
1710
  let response = undefined;
1711
- if (stop) {
1711
+ if (trigger) {
1712
1712
  response = await this.v1PrivateDeleteAlgoOrders(this.extend(request, params));
1713
1713
  }
1714
1714
  else {
1715
1715
  response = await this.v1PrivateDeleteOrders(this.extend(request, params));
1716
1716
  }
1717
- // stop
1717
+ // trigger
1718
1718
  // {
1719
1719
  // "success": true,
1720
1720
  // "timestamp": 1702989203989,
@@ -1753,12 +1753,12 @@ export default class woofipro extends Exchange {
1753
1753
  async fetchOrder(id, symbol = undefined, params = {}) {
1754
1754
  await this.loadMarkets();
1755
1755
  const market = (symbol !== undefined) ? this.market(symbol) : undefined;
1756
- const stop = this.safeBool2(params, 'stop', 'trigger', false);
1756
+ const trigger = this.safeBool2(params, 'stop', 'trigger', false);
1757
1757
  const request = {};
1758
1758
  const clientOrderId = this.safeStringN(params, ['clOrdID', 'clientOrderId', 'client_order_id']);
1759
1759
  params = this.omit(params, ['stop', 'trigger', 'clOrdID', 'clientOrderId', 'client_order_id']);
1760
1760
  let response = undefined;
1761
- if (stop) {
1761
+ if (trigger) {
1762
1762
  if (clientOrderId) {
1763
1763
  request['client_order_id'] = clientOrderId;
1764
1764
  response = await this.v1PrivateGetAlgoClientOrderClientOrderId(this.extend(request, params));
@@ -2192,7 +2192,7 @@ export default class woofipro extends Exchange {
2192
2192
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2193
2193
  * @param {int} [limit] max number of ledger entries to return, default is undefined
2194
2194
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2195
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2195
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
2196
2196
  */
2197
2197
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2198
2198
  const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
package/js/src/xt.d.ts CHANGED
@@ -184,7 +184,7 @@ export default class xt extends Exchange {
184
184
  * @param {string} id order id
185
185
  * @param {string} [symbol] unified symbol of the market the order was made in
186
186
  * @param {object} params extra parameters specific to the xt api endpoint
187
- * @param {bool} [params.stop] if the order is a stop trigger order or not
187
+ * @param {bool} [params.trigger] if the order is a trigger order or not
188
188
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
189
189
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
190
190
  */
@@ -200,7 +200,7 @@ export default class xt extends Exchange {
200
200
  * @param {int} [since] timestamp in ms of the earliest order
201
201
  * @param {int} [limit] the maximum number of order structures to retrieve
202
202
  * @param {object} params extra parameters specific to the xt api endpoint
203
- * @param {bool} [params.stop] if the order is a stop trigger order or not
203
+ * @param {bool} [params.trigger] if the order is a trigger order or not
204
204
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
205
205
  */
206
206
  fetchOrders(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
@@ -217,7 +217,7 @@ export default class xt extends Exchange {
217
217
  * @param {int} [since] timestamp in ms of the earliest order
218
218
  * @param {int} [limit] the maximum number of open order structures to retrieve
219
219
  * @param {object} params extra parameters specific to the xt api endpoint
220
- * @param {bool} [params.stop] if the order is a stop trigger order or not
220
+ * @param {bool} [params.trigger] if the order is a trigger order or not
221
221
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
222
222
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
223
223
  */
@@ -234,7 +234,7 @@ export default class xt extends Exchange {
234
234
  * @param {int} [since] timestamp in ms of the earliest order
235
235
  * @param {int} [limit] the maximum number of order structures to retrieve
236
236
  * @param {object} params extra parameters specific to the xt api endpoint
237
- * @param {bool} [params.stop] if the order is a stop trigger order or not
237
+ * @param {bool} [params.trigger] if the order is a trigger order or not
238
238
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
239
239
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
240
240
  */
@@ -251,7 +251,7 @@ export default class xt extends Exchange {
251
251
  * @param {int} [since] timestamp in ms of the earliest order
252
252
  * @param {int} [limit] the maximum number of order structures to retrieve
253
253
  * @param {object} params extra parameters specific to the xt api endpoint
254
- * @param {bool} [params.stop] if the order is a stop trigger order or not
254
+ * @param {bool} [params.trigger] if the order is a trigger order or not
255
255
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
256
256
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
257
257
  */
@@ -267,7 +267,7 @@ export default class xt extends Exchange {
267
267
  * @param {string} id order id
268
268
  * @param {string} [symbol] unified symbol of the market the order was made in
269
269
  * @param {object} params extra parameters specific to the xt api endpoint
270
- * @param {bool} [params.stop] if the order is a stop trigger order or not
270
+ * @param {bool} [params.trigger] if the order is a trigger order or not
271
271
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
272
272
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
273
273
  */
@@ -282,7 +282,7 @@ export default class xt extends Exchange {
282
282
  * @see https://doc.xt.com/#futures_entrustcancelProfitBatch
283
283
  * @param {string} [symbol] unified market symbol of the market to cancel orders in
284
284
  * @param {object} params extra parameters specific to the xt api endpoint
285
- * @param {bool} [params.stop] if the order is a stop trigger order or not
285
+ * @param {bool} [params.trigger] if the order is a trigger order or not
286
286
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
287
287
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
288
288
  */
package/js/src/xt.js CHANGED
@@ -2472,7 +2472,7 @@ export default class xt extends Exchange {
2472
2472
  * @param {string} id order id
2473
2473
  * @param {string} [symbol] unified symbol of the market the order was made in
2474
2474
  * @param {object} params extra parameters specific to the xt api endpoint
2475
- * @param {bool} [params.stop] if the order is a stop trigger order or not
2475
+ * @param {bool} [params.trigger] if the order is a trigger order or not
2476
2476
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
2477
2477
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
2478
2478
  */
@@ -2488,9 +2488,9 @@ export default class xt extends Exchange {
2488
2488
  let response = undefined;
2489
2489
  [type, params] = this.handleMarketTypeAndParams('fetchOrder', market, params);
2490
2490
  [subType, params] = this.handleSubTypeAndParams('fetchOrder', market, params);
2491
- const stop = this.safeValue(params, 'stop');
2491
+ const trigger = this.safeValue(params, 'stop');
2492
2492
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
2493
- if (stop) {
2493
+ if (trigger) {
2494
2494
  request['entrustId'] = id;
2495
2495
  }
2496
2496
  else if (stopLossTakeProfit) {
@@ -2499,7 +2499,7 @@ export default class xt extends Exchange {
2499
2499
  else {
2500
2500
  request['orderId'] = id;
2501
2501
  }
2502
- if (stop) {
2502
+ if (trigger) {
2503
2503
  params = this.omit(params, 'stop');
2504
2504
  if (subType === 'inverse') {
2505
2505
  response = await this.privateInverseGetFutureTradeV1EntrustPlanDetail(this.extend(request, params));
@@ -2657,7 +2657,7 @@ export default class xt extends Exchange {
2657
2657
  * @param {int} [since] timestamp in ms of the earliest order
2658
2658
  * @param {int} [limit] the maximum number of order structures to retrieve
2659
2659
  * @param {object} params extra parameters specific to the xt api endpoint
2660
- * @param {bool} [params.stop] if the order is a stop trigger order or not
2660
+ * @param {bool} [params.trigger] if the order is a trigger order or not
2661
2661
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
2662
2662
  */
2663
2663
  async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -2679,9 +2679,9 @@ export default class xt extends Exchange {
2679
2679
  let response = undefined;
2680
2680
  [type, params] = this.handleMarketTypeAndParams('fetchOrders', market, params);
2681
2681
  [subType, params] = this.handleSubTypeAndParams('fetchOrders', market, params);
2682
- const stop = this.safeValue(params, 'stop');
2683
- if (stop) {
2684
- params = this.omit(params, 'stop');
2682
+ const trigger = this.safeValue2(params, 'trigger', 'stop');
2683
+ if (trigger) {
2684
+ params = this.omit(params, ['trigger', 'stop']);
2685
2685
  if (subType === 'inverse') {
2686
2686
  response = await this.privateInverseGetFutureTradeV1EntrustPlanListHistory(this.extend(request, params));
2687
2687
  }
@@ -2829,10 +2829,10 @@ export default class xt extends Exchange {
2829
2829
  let response = undefined;
2830
2830
  [type, params] = this.handleMarketTypeAndParams('fetchOrdersByStatus', market, params);
2831
2831
  [subType, params] = this.handleSubTypeAndParams('fetchOrdersByStatus', market, params);
2832
- const stop = this.safeValue(params, 'stop');
2832
+ const trigger = this.safeValue(params, 'stop');
2833
2833
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
2834
2834
  if (status === 'open') {
2835
- if (stop || stopLossTakeProfit) {
2835
+ if (trigger || stopLossTakeProfit) {
2836
2836
  request['state'] = 'NOT_TRIGGERED';
2837
2837
  }
2838
2838
  else if (subType !== undefined) {
@@ -2840,7 +2840,7 @@ export default class xt extends Exchange {
2840
2840
  }
2841
2841
  }
2842
2842
  else if (status === 'closed') {
2843
- if (stop || stopLossTakeProfit) {
2843
+ if (trigger || stopLossTakeProfit) {
2844
2844
  request['state'] = 'TRIGGERED';
2845
2845
  }
2846
2846
  else {
@@ -2848,7 +2848,7 @@ export default class xt extends Exchange {
2848
2848
  }
2849
2849
  }
2850
2850
  else if (status === 'canceled') {
2851
- if (stop || stopLossTakeProfit) {
2851
+ if (trigger || stopLossTakeProfit) {
2852
2852
  request['state'] = 'USER_REVOCATION';
2853
2853
  }
2854
2854
  else {
@@ -2858,7 +2858,7 @@ export default class xt extends Exchange {
2858
2858
  else {
2859
2859
  request['state'] = status;
2860
2860
  }
2861
- if (stop || stopLossTakeProfit || (subType !== undefined) || (type === 'swap') || (type === 'future')) {
2861
+ if (trigger || stopLossTakeProfit || (subType !== undefined) || (type === 'swap') || (type === 'future')) {
2862
2862
  if (since !== undefined) {
2863
2863
  request['startTime'] = since;
2864
2864
  }
@@ -2866,7 +2866,7 @@ export default class xt extends Exchange {
2866
2866
  request['size'] = limit;
2867
2867
  }
2868
2868
  }
2869
- if (stop) {
2869
+ if (trigger) {
2870
2870
  params = this.omit(params, 'stop');
2871
2871
  if (subType === 'inverse') {
2872
2872
  response = await this.privateInverseGetFutureTradeV1EntrustPlanList(this.extend(request, params));
@@ -3105,7 +3105,7 @@ export default class xt extends Exchange {
3105
3105
  * @param {int} [since] timestamp in ms of the earliest order
3106
3106
  * @param {int} [limit] the maximum number of open order structures to retrieve
3107
3107
  * @param {object} params extra parameters specific to the xt api endpoint
3108
- * @param {bool} [params.stop] if the order is a stop trigger order or not
3108
+ * @param {bool} [params.trigger] if the order is a trigger order or not
3109
3109
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
3110
3110
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
3111
3111
  */
@@ -3124,7 +3124,7 @@ export default class xt extends Exchange {
3124
3124
  * @param {int} [since] timestamp in ms of the earliest order
3125
3125
  * @param {int} [limit] the maximum number of order structures to retrieve
3126
3126
  * @param {object} params extra parameters specific to the xt api endpoint
3127
- * @param {bool} [params.stop] if the order is a stop trigger order or not
3127
+ * @param {bool} [params.trigger] if the order is a trigger order or not
3128
3128
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
3129
3129
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
3130
3130
  */
@@ -3143,7 +3143,7 @@ export default class xt extends Exchange {
3143
3143
  * @param {int} [since] timestamp in ms of the earliest order
3144
3144
  * @param {int} [limit] the maximum number of order structures to retrieve
3145
3145
  * @param {object} params extra parameters specific to the xt api endpoint
3146
- * @param {bool} [params.stop] if the order is a stop trigger order or not
3146
+ * @param {bool} [params.trigger] if the order is a trigger order or not
3147
3147
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
3148
3148
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
3149
3149
  */
@@ -3161,7 +3161,7 @@ export default class xt extends Exchange {
3161
3161
  * @param {string} id order id
3162
3162
  * @param {string} [symbol] unified symbol of the market the order was made in
3163
3163
  * @param {object} params extra parameters specific to the xt api endpoint
3164
- * @param {bool} [params.stop] if the order is a stop trigger order or not
3164
+ * @param {bool} [params.trigger] if the order is a trigger order or not
3165
3165
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
3166
3166
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
3167
3167
  */
@@ -3177,9 +3177,9 @@ export default class xt extends Exchange {
3177
3177
  let response = undefined;
3178
3178
  [type, params] = this.handleMarketTypeAndParams('cancelOrder', market, params);
3179
3179
  [subType, params] = this.handleSubTypeAndParams('cancelOrder', market, params);
3180
- const stop = this.safeValue(params, 'stop');
3180
+ const trigger = this.safeValue2(params, 'trigger', 'stop');
3181
3181
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
3182
- if (stop) {
3182
+ if (trigger) {
3183
3183
  request['entrustId'] = id;
3184
3184
  }
3185
3185
  else if (stopLossTakeProfit) {
@@ -3188,8 +3188,8 @@ export default class xt extends Exchange {
3188
3188
  else {
3189
3189
  request['orderId'] = id;
3190
3190
  }
3191
- if (stop) {
3192
- params = this.omit(params, 'stop');
3191
+ if (trigger) {
3192
+ params = this.omit(params, ['trigger', 'stop']);
3193
3193
  if (subType === 'inverse') {
3194
3194
  response = await this.privateInversePostFutureTradeV1EntrustCancelPlan(this.extend(request, params));
3195
3195
  }
@@ -3250,7 +3250,7 @@ export default class xt extends Exchange {
3250
3250
  * @see https://doc.xt.com/#futures_entrustcancelProfitBatch
3251
3251
  * @param {string} [symbol] unified market symbol of the market to cancel orders in
3252
3252
  * @param {object} params extra parameters specific to the xt api endpoint
3253
- * @param {bool} [params.stop] if the order is a stop trigger order or not
3253
+ * @param {bool} [params.trigger] if the order is a trigger order or not
3254
3254
  * @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
3255
3255
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
3256
3256
  */
@@ -3267,10 +3267,10 @@ export default class xt extends Exchange {
3267
3267
  let response = undefined;
3268
3268
  [type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
3269
3269
  [subType, params] = this.handleSubTypeAndParams('cancelAllOrders', market, params);
3270
- const stop = this.safeValue(params, 'stop');
3270
+ const trigger = this.safeValue2(params, 'trigger', 'stop');
3271
3271
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
3272
- if (stop) {
3273
- params = this.omit(params, 'stop');
3272
+ if (trigger) {
3273
+ params = this.omit(params, ['trigger', 'stop']);
3274
3274
  if (subType === 'inverse') {
3275
3275
  response = await this.privateInversePostFutureTradeV1EntrustCancelAllPlan(this.extend(request, params));
3276
3276
  }
package/js/src/zonda.d.ts CHANGED
@@ -95,7 +95,7 @@ export default class zonda extends Exchange {
95
95
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
96
96
  * @param {int} [limit] max number of ledger entries to return, default is undefined
97
97
  * @param {object} [params] extra parameters specific to the exchange API endpoint
98
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
98
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
99
99
  */
100
100
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
101
101
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
package/js/src/zonda.js CHANGED
@@ -852,7 +852,7 @@ export default class zonda extends Exchange {
852
852
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
853
853
  * @param {int} [limit] max number of ledger entries to return, default is undefined
854
854
  * @param {object} [params] extra parameters specific to the exchange API endpoint
855
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
855
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
856
856
  */
857
857
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
858
858
  const balanceCurrencies = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.4.39",
3
+ "version": "4.4.40",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",