ccxt 4.4.38 → 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 (192) 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/alpaca.js +73 -2
  5. package/dist/cjs/src/ascendex.js +9 -9
  6. package/dist/cjs/src/base/Exchange.js +38 -27
  7. package/dist/cjs/src/binance.js +13 -19
  8. package/dist/cjs/src/bingx.js +1 -2
  9. package/dist/cjs/src/bit2c.js +0 -1
  10. package/dist/cjs/src/bitbank.js +0 -1
  11. package/dist/cjs/src/bitbns.js +0 -1
  12. package/dist/cjs/src/bitfinex.js +17 -18
  13. package/dist/cjs/src/bitfinex1.js +0 -1
  14. package/dist/cjs/src/bitflyer.js +0 -1
  15. package/dist/cjs/src/bitget.js +1 -2
  16. package/dist/cjs/src/bithumb.js +0 -1
  17. package/dist/cjs/src/bitmart.js +3 -4
  18. package/dist/cjs/src/bitmex.js +5 -6
  19. package/dist/cjs/src/bitopro.js +4 -5
  20. package/dist/cjs/src/bitrue.js +5 -7
  21. package/dist/cjs/src/bitso.js +1 -2
  22. package/dist/cjs/src/bitstamp.js +1 -2
  23. package/dist/cjs/src/bitteam.js +1 -3
  24. package/dist/cjs/src/bitvavo.js +2 -4
  25. package/dist/cjs/src/blockchaincom.js +5 -5
  26. package/dist/cjs/src/blofin.js +10 -10
  27. package/dist/cjs/src/btcalpha.js +0 -1
  28. package/dist/cjs/src/btcbox.js +0 -1
  29. package/dist/cjs/src/btcmarkets.js +1 -3
  30. package/dist/cjs/src/bybit.js +2 -3
  31. package/dist/cjs/src/cex.js +1 -1
  32. package/dist/cjs/src/coinbase.js +77 -1
  33. package/dist/cjs/src/coinbaseexchange.js +1 -1
  34. package/dist/cjs/src/coinbaseinternational.js +62 -0
  35. package/dist/cjs/src/coincatch.js +1 -1
  36. package/dist/cjs/src/coinex.js +9 -9
  37. package/dist/cjs/src/coinlist.js +1 -1
  38. package/dist/cjs/src/coinmetro.js +1 -1
  39. package/dist/cjs/src/cryptocom.js +91 -2
  40. package/dist/cjs/src/currencycom.js +1 -1
  41. package/dist/cjs/src/defx.js +1 -2
  42. package/dist/cjs/src/delta.js +1 -1
  43. package/dist/cjs/src/digifinex.js +59 -19
  44. package/dist/cjs/src/exmo.js +2 -2
  45. package/dist/cjs/src/gate.js +1 -1
  46. package/dist/cjs/src/hashkey.js +3 -5
  47. package/dist/cjs/src/htx.js +155 -33
  48. package/dist/cjs/src/hyperliquid.js +1 -1
  49. package/dist/cjs/src/kraken.js +1 -1
  50. package/dist/cjs/src/kucoin.js +25 -24
  51. package/dist/cjs/src/luno.js +1 -1
  52. package/dist/cjs/src/mexc.js +174 -27
  53. package/dist/cjs/src/ndax.js +1 -1
  54. package/dist/cjs/src/okcoin.js +18 -18
  55. package/dist/cjs/src/okx.js +22 -21
  56. package/dist/cjs/src/phemex.js +12 -8
  57. package/dist/cjs/src/poloniex.js +1 -1
  58. package/dist/cjs/src/poloniexfutures.js +6 -6
  59. package/dist/cjs/src/pro/bitget.js +1 -1
  60. package/dist/cjs/src/pro/bybit.js +13 -1
  61. package/dist/cjs/src/pro/coinex.js +2 -2
  62. package/dist/cjs/src/pro/gate.js +6 -6
  63. package/dist/cjs/src/pro/kucoin.js +3 -3
  64. package/dist/cjs/src/pro/okx.js +11 -11
  65. package/dist/cjs/src/pro/upbit.js +3 -3
  66. package/dist/cjs/src/pro/woo.js +1 -1
  67. package/dist/cjs/src/vertex.js +11 -11
  68. package/dist/cjs/src/woo.js +37 -37
  69. package/dist/cjs/src/woofipro.js +24 -24
  70. package/dist/cjs/src/xt.js +26 -26
  71. package/dist/cjs/src/zonda.js +1 -1
  72. package/js/ccxt.d.ts +1 -1
  73. package/js/ccxt.js +1 -1
  74. package/js/src/abstract/digifinex.d.ts +1 -0
  75. package/js/src/abstract/mexc.d.ts +1 -0
  76. package/js/src/alpaca.d.ts +11 -1
  77. package/js/src/alpaca.js +73 -2
  78. package/js/src/ascendex.d.ts +2 -2
  79. package/js/src/ascendex.js +9 -9
  80. package/js/src/base/Exchange.js +38 -27
  81. package/js/src/binance.d.ts +9 -9
  82. package/js/src/binance.js +13 -19
  83. package/js/src/bingx.d.ts +1 -1
  84. package/js/src/bingx.js +1 -2
  85. package/js/src/bit2c.js +0 -1
  86. package/js/src/bitbank.js +0 -1
  87. package/js/src/bitbns.js +0 -1
  88. package/js/src/bitfinex.d.ts +3 -3
  89. package/js/src/bitfinex.js +17 -18
  90. package/js/src/bitfinex1.js +0 -1
  91. package/js/src/bitflyer.js +0 -1
  92. package/js/src/bitget.d.ts +1 -1
  93. package/js/src/bitget.js +1 -2
  94. package/js/src/bithumb.js +0 -1
  95. package/js/src/bitmart.d.ts +1 -1
  96. package/js/src/bitmart.js +3 -4
  97. package/js/src/bitmex.d.ts +1 -1
  98. package/js/src/bitmex.js +5 -6
  99. package/js/src/bitopro.js +4 -5
  100. package/js/src/bitrue.js +5 -7
  101. package/js/src/bitso.d.ts +1 -1
  102. package/js/src/bitso.js +1 -2
  103. package/js/src/bitstamp.d.ts +1 -1
  104. package/js/src/bitstamp.js +1 -2
  105. package/js/src/bitteam.js +1 -3
  106. package/js/src/bitvavo.d.ts +1 -1
  107. package/js/src/bitvavo.js +2 -4
  108. package/js/src/blockchaincom.js +5 -5
  109. package/js/src/blofin.d.ts +3 -3
  110. package/js/src/blofin.js +10 -10
  111. package/js/src/btcalpha.js +0 -1
  112. package/js/src/btcbox.js +0 -1
  113. package/js/src/btcmarkets.js +1 -3
  114. package/js/src/bybit.d.ts +1 -1
  115. package/js/src/bybit.js +2 -3
  116. package/js/src/cex.d.ts +1 -1
  117. package/js/src/cex.js +1 -1
  118. package/js/src/coinbase.d.ts +1 -1
  119. package/js/src/coinbase.js +77 -1
  120. package/js/src/coinbaseexchange.d.ts +1 -1
  121. package/js/src/coinbaseexchange.js +1 -1
  122. package/js/src/coinbaseinternational.js +62 -0
  123. package/js/src/coincatch.d.ts +1 -1
  124. package/js/src/coincatch.js +1 -1
  125. package/js/src/coinex.js +9 -9
  126. package/js/src/coinlist.d.ts +1 -1
  127. package/js/src/coinlist.js +1 -1
  128. package/js/src/coinmetro.d.ts +1 -1
  129. package/js/src/coinmetro.js +1 -1
  130. package/js/src/cryptocom.d.ts +2 -2
  131. package/js/src/cryptocom.js +91 -2
  132. package/js/src/currencycom.d.ts +1 -1
  133. package/js/src/currencycom.js +1 -1
  134. package/js/src/defx.d.ts +1 -2
  135. package/js/src/defx.js +1 -2
  136. package/js/src/delta.d.ts +1 -1
  137. package/js/src/delta.js +1 -1
  138. package/js/src/digifinex.d.ts +5 -3
  139. package/js/src/digifinex.js +59 -19
  140. package/js/src/exmo.js +2 -2
  141. package/js/src/gate.d.ts +1 -1
  142. package/js/src/gate.js +1 -1
  143. package/js/src/hashkey.d.ts +1 -1
  144. package/js/src/hashkey.js +3 -5
  145. package/js/src/htx.d.ts +6 -6
  146. package/js/src/htx.js +155 -33
  147. package/js/src/hyperliquid.d.ts +1 -1
  148. package/js/src/hyperliquid.js +1 -1
  149. package/js/src/kraken.d.ts +1 -1
  150. package/js/src/kraken.js +1 -1
  151. package/js/src/kucoin.d.ts +13 -13
  152. package/js/src/kucoin.js +25 -24
  153. package/js/src/luno.d.ts +1 -1
  154. package/js/src/luno.js +1 -1
  155. package/js/src/mexc.d.ts +8 -9
  156. package/js/src/mexc.js +174 -27
  157. package/js/src/ndax.d.ts +1 -1
  158. package/js/src/ndax.js +1 -1
  159. package/js/src/okcoin.d.ts +4 -4
  160. package/js/src/okcoin.js +18 -18
  161. package/js/src/okx.d.ts +4 -3
  162. package/js/src/okx.js +22 -21
  163. package/js/src/phemex.js +12 -8
  164. package/js/src/poloniex.d.ts +1 -1
  165. package/js/src/poloniex.js +1 -1
  166. package/js/src/poloniexfutures.d.ts +1 -1
  167. package/js/src/poloniexfutures.js +6 -6
  168. package/js/src/pro/bitget.d.ts +1 -1
  169. package/js/src/pro/bitget.js +1 -1
  170. package/js/src/pro/bybit.d.ts +1 -1
  171. package/js/src/pro/bybit.js +13 -1
  172. package/js/src/pro/coinex.js +2 -2
  173. package/js/src/pro/gate.d.ts +2 -2
  174. package/js/src/pro/gate.js +6 -6
  175. package/js/src/pro/kucoin.d.ts +1 -1
  176. package/js/src/pro/kucoin.js +3 -3
  177. package/js/src/pro/okx.d.ts +2 -2
  178. package/js/src/pro/okx.js +11 -11
  179. package/js/src/pro/upbit.d.ts +3 -3
  180. package/js/src/pro/upbit.js +3 -3
  181. package/js/src/pro/woo.js +1 -1
  182. package/js/src/vertex.d.ts +3 -3
  183. package/js/src/vertex.js +11 -11
  184. package/js/src/woo.d.ts +7 -7
  185. package/js/src/woo.js +37 -37
  186. package/js/src/woofipro.d.ts +1 -1
  187. package/js/src/woofipro.js +24 -24
  188. package/js/src/xt.d.ts +7 -7
  189. package/js/src/xt.js +26 -26
  190. package/js/src/zonda.d.ts +1 -1
  191. package/js/src/zonda.js +1 -1
  192. package/package.json +1 -1
@@ -1307,7 +1307,7 @@ class bitmex extends bitmex$1 {
1307
1307
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
1308
1308
  * @param {int} [limit] max number of ledger entries to return, default is undefined
1309
1309
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1310
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1310
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
1311
1311
  */
1312
1312
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1313
1313
  await this.loadMarkets();
@@ -1865,7 +1865,7 @@ class bitmex extends bitmex$1 {
1865
1865
  postOnly = (execInst === 'ParticipateDoNotInitiate');
1866
1866
  }
1867
1867
  const timestamp = this.parse8601(this.safeString(order, 'timestamp'));
1868
- const stopPrice = this.safeNumber(order, 'stopPx');
1868
+ const triggerPrice = this.safeNumber(order, 'stopPx');
1869
1869
  const remaining = this.safeString(order, 'leavesQty');
1870
1870
  return this.safeOrder({
1871
1871
  'info': order,
@@ -1880,8 +1880,7 @@ class bitmex extends bitmex$1 {
1880
1880
  'postOnly': postOnly,
1881
1881
  'side': this.safeStringLower(order, 'side'),
1882
1882
  'price': this.safeString(order, 'price'),
1883
- 'stopPrice': stopPrice,
1884
- 'triggerPrice': stopPrice,
1883
+ 'triggerPrice': triggerPrice,
1885
1884
  'amount': amount,
1886
1885
  'cost': cost,
1887
1886
  'average': average,
@@ -2035,7 +2034,7 @@ class bitmex extends bitmex$1 {
2035
2034
  else {
2036
2035
  if (triggerPrice === undefined) {
2037
2036
  // if exchange specific trigger types were provided
2038
- throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice (stopPx|stopPrice) parameter for the ' + orderType + ' order type');
2037
+ throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice parameter for the ' + orderType + ' order type');
2039
2038
  }
2040
2039
  request['stopPx'] = this.parseToNumeric(this.priceToPrecision(symbol, triggerPrice));
2041
2040
  }
@@ -2629,7 +2628,7 @@ class bitmex extends bitmex$1 {
2629
2628
  'timestamp': this.parse8601(datetime),
2630
2629
  'datetime': datetime,
2631
2630
  'fundingRate': this.safeNumber(contract, 'fundingRate'),
2632
- 'fundingTimestamp': this.parseToNumeric(this.iso8601(fundingDatetime)),
2631
+ 'fundingTimestamp': this.parse8601(fundingDatetime),
2633
2632
  'fundingDatetime': fundingDatetime,
2634
2633
  'nextFundingRate': this.safeNumber(contract, 'indicativeFundingRate'),
2635
2634
  'nextFundingTimestamp': undefined,
@@ -981,7 +981,6 @@ class bitopro extends bitopro$1 {
981
981
  'postOnly': postOnly,
982
982
  'side': side,
983
983
  'price': price,
984
- 'stopPrice': undefined,
985
984
  'triggerPrice': undefined,
986
985
  'amount': amount,
987
986
  'cost': undefined,
@@ -1024,13 +1023,13 @@ class bitopro extends bitopro$1 {
1024
1023
  }
1025
1024
  if (orderType === 'STOP_LIMIT') {
1026
1025
  request['price'] = this.priceToPrecision(symbol, price);
1027
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1026
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1028
1027
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
1029
- if (stopPrice === undefined) {
1030
- throw new errors.InvalidOrder(this.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders');
1028
+ if (triggerPrice === undefined) {
1029
+ throw new errors.InvalidOrder(this.id + ' createOrder() requires a triggerPrice parameter for ' + orderType + ' orders');
1031
1030
  }
1032
1031
  else {
1033
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1032
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1034
1033
  }
1035
1034
  const condition = this.safeString(params, 'condition');
1036
1035
  if (condition === undefined) {
@@ -1834,8 +1834,7 @@ class bitrue extends bitrue$1 {
1834
1834
  if (type === 'limit_maker') {
1835
1835
  type = 'limit';
1836
1836
  }
1837
- const stopPriceString = this.safeString(order, 'stopPrice');
1838
- const stopPrice = this.parseNumber(this.omitZero(stopPriceString));
1837
+ const triggerPrice = this.parseNumber(this.omitZero(this.safeString(order, 'stopPrice')));
1839
1838
  return this.safeOrder({
1840
1839
  'info': order,
1841
1840
  'id': id,
@@ -1849,8 +1848,7 @@ class bitrue extends bitrue$1 {
1849
1848
  'postOnly': postOnly,
1850
1849
  'side': side,
1851
1850
  'price': price,
1852
- 'stopPrice': stopPrice,
1853
- 'triggerPrice': stopPrice,
1851
+ 'triggerPrice': triggerPrice,
1854
1852
  'amount': amount,
1855
1853
  'cost': cost,
1856
1854
  'average': average,
@@ -1988,10 +1986,10 @@ class bitrue extends bitrue$1 {
1988
1986
  params = this.omit(params, ['newClientOrderId', 'clientOrderId']);
1989
1987
  request['newClientOrderId'] = clientOrderId;
1990
1988
  }
1991
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1992
- if (stopPrice !== undefined) {
1989
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1990
+ if (triggerPrice !== undefined) {
1993
1991
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
1994
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1992
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1995
1993
  }
1996
1994
  response = await this.spotV1PrivatePostOrder(this.extend(request, params));
1997
1995
  data = response;
@@ -202,7 +202,7 @@ class bitso extends bitso$1 {
202
202
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
203
203
  * @param {int} [limit] max number of ledger entries to return, default is undefined
204
204
  * @param {object} [params] extra parameters specific to the exchange API endpoint
205
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
205
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
206
206
  */
207
207
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
208
208
  const request = {};
@@ -1137,7 +1137,6 @@ class bitso extends bitso$1 {
1137
1137
  'postOnly': undefined,
1138
1138
  'side': side,
1139
1139
  'price': price,
1140
- 'stopPrice': undefined,
1141
1140
  'triggerPrice': undefined,
1142
1141
  'amount': amount,
1143
1142
  'cost': undefined,
@@ -1915,7 +1915,6 @@ class bitstamp extends bitstamp$1 {
1915
1915
  'postOnly': undefined,
1916
1916
  'side': side,
1917
1917
  'price': price,
1918
- 'stopPrice': undefined,
1919
1918
  'triggerPrice': undefined,
1920
1919
  'cost': undefined,
1921
1920
  'amount': amount,
@@ -2039,7 +2038,7 @@ class bitstamp extends bitstamp$1 {
2039
2038
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2040
2039
  * @param {int} [limit] max number of ledger entries to return, default is undefined
2041
2040
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2042
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2041
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
2043
2042
  */
2044
2043
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2045
2044
  await this.loadMarkets();
@@ -1193,7 +1193,6 @@ class bitteam extends bitteam$1 {
1193
1193
  const side = this.safeString(order, 'side');
1194
1194
  const feeRaw = this.safeValue(order, 'fee');
1195
1195
  const price = this.safeString(order, 'price');
1196
- const stopPrice = this.safeString(order, 'stopPrice');
1197
1196
  const amount = this.safeString(order, 'quantity');
1198
1197
  const filled = this.safeString(order, 'executed');
1199
1198
  let fee = undefined;
@@ -1219,8 +1218,7 @@ class bitteam extends bitteam$1 {
1219
1218
  'timeInForce': 'GTC',
1220
1219
  'side': side,
1221
1220
  'price': price,
1222
- 'stopPrice': stopPrice,
1223
- 'triggerPrice': stopPrice,
1221
+ 'triggerPrice': this.safeString(order, 'stopPrice'),
1224
1222
  'average': undefined,
1225
1223
  'amount': amount,
1226
1224
  'cost': undefined,
@@ -1128,7 +1128,7 @@ class bitvavo extends bitvavo$1 {
1128
1128
  * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1129
1129
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
1130
1130
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
1131
- * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
1131
+ * @param {float} [params.stopPrice] Alias for triggerPrice
1132
1132
  * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1133
1133
  * @param {bool} [params.postOnly] If true, the order will only be posted to the order book and not executed immediately
1134
1134
  * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
@@ -1599,7 +1599,6 @@ class bitvavo extends bitvavo$1 {
1599
1599
  const timeInForce = this.safeString(order, 'timeInForce');
1600
1600
  const postOnly = this.safeValue(order, 'postOnly');
1601
1601
  // https://github.com/ccxt/ccxt/issues/8489
1602
- const stopPrice = this.safeNumber(order, 'triggerPrice');
1603
1602
  return this.safeOrder({
1604
1603
  'info': order,
1605
1604
  'id': id,
@@ -1613,8 +1612,7 @@ class bitvavo extends bitvavo$1 {
1613
1612
  'postOnly': postOnly,
1614
1613
  'side': side,
1615
1614
  'price': price,
1616
- 'stopPrice': stopPrice,
1617
- 'triggerPrice': stopPrice,
1615
+ 'triggerPrice': this.safeNumber(order, 'triggerPrice'),
1618
1616
  'amount': amount,
1619
1617
  'cost': cost,
1620
1618
  'average': undefined,
@@ -568,14 +568,14 @@ class blockchaincom extends blockchaincom$1 {
568
568
  'orderQty': this.amountToPrecision(symbol, amount),
569
569
  'clOrdId': clientOrderId,
570
570
  };
571
- const stopPrice = this.safeValue2(params, 'stopPx', 'stopPrice');
571
+ const triggerPrice = this.safeValue2(params, 'stopPx', 'stopPrice');
572
572
  params = this.omit(params, ['stopPx', 'stopPrice']);
573
573
  if (uppercaseOrderType === 'STOP' || uppercaseOrderType === 'STOPLIMIT') {
574
- if (stopPrice === undefined) {
575
- throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a stopPx or stopPrice param for a ' + uppercaseOrderType + ' order');
574
+ if (triggerPrice === undefined) {
575
+ throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a stopPx or triggerPrice param for a ' + uppercaseOrderType + ' order');
576
576
  }
577
577
  }
578
- if (stopPrice !== undefined) {
578
+ if (triggerPrice !== undefined) {
579
579
  if (uppercaseOrderType === 'MARKET') {
580
580
  request['ordType'] = 'STOP';
581
581
  }
@@ -595,7 +595,7 @@ class blockchaincom extends blockchaincom$1 {
595
595
  request['price'] = this.priceToPrecision(symbol, price);
596
596
  }
597
597
  if (stopPriceRequired) {
598
- request['stopPx'] = this.priceToPrecision(symbol, stopPrice);
598
+ request['stopPx'] = this.priceToPrecision(symbol, triggerPrice);
599
599
  }
600
600
  const response = await this.privatePostOrders(this.extend(request, params));
601
601
  return this.parseOrder(response, market);
@@ -1372,7 +1372,7 @@ class blofin extends blofin$1 {
1372
1372
  * @param {int} [since] the earliest time in ms to fetch open orders for
1373
1373
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1374
1374
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1375
- * @param {bool} [params.stop] True if fetching trigger or conditional orders
1375
+ * @param {bool} [params.trigger] True if fetching trigger or conditional orders
1376
1376
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1377
1377
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1378
1378
  */
@@ -1392,12 +1392,12 @@ class blofin extends blofin$1 {
1392
1392
  if (limit !== undefined) {
1393
1393
  request['limit'] = limit; // default 100, max 100
1394
1394
  }
1395
- const isStop = this.safeBoolN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
1395
+ const isTrigger = this.safeBoolN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
1396
1396
  let method = undefined;
1397
1397
  [method, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersPending');
1398
1398
  const query = this.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL']);
1399
1399
  let response = undefined;
1400
- if (isStop || (method === 'privateGetTradeOrdersTpslPending')) {
1400
+ if (isTrigger || (method === 'privateGetTradeOrdersTpslPending')) {
1401
1401
  response = await this.privateGetTradeOrdersTpslPending(this.extend(request, query));
1402
1402
  }
1403
1403
  else {
@@ -1526,7 +1526,7 @@ class blofin extends blofin$1 {
1526
1526
  * @param {string} [params.marginMode] 'cross' or 'isolated'
1527
1527
  * @param {int} [params.until] the latest time in ms to fetch entries for
1528
1528
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1529
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1529
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
1530
1530
  */
1531
1531
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1532
1532
  await this.loadMarkets();
@@ -1723,8 +1723,8 @@ class blofin extends blofin$1 {
1723
1723
  let method = this.safeString(params, 'method', defaultMethod);
1724
1724
  const clientOrderIds = this.parseIds(this.safeValue(params, 'clientOrderId'));
1725
1725
  const tpslIds = this.parseIds(this.safeValue(params, 'tpslId'));
1726
- const stop = this.safeBoolN(params, ['stop', 'trigger', 'tpsl']);
1727
- if (stop) {
1726
+ const trigger = this.safeBoolN(params, ['stop', 'trigger', 'tpsl']);
1727
+ if (trigger) {
1728
1728
  method = 'privatePostTradeCancelTpsl';
1729
1729
  }
1730
1730
  if (clientOrderIds === undefined) {
@@ -1738,7 +1738,7 @@ class blofin extends blofin$1 {
1738
1738
  }
1739
1739
  }
1740
1740
  for (let i = 0; i < ids.length; i++) {
1741
- if (stop) {
1741
+ if (trigger) {
1742
1742
  request.push({
1743
1743
  'tpslId': ids[i],
1744
1744
  'instId': market['id'],
@@ -2156,7 +2156,7 @@ class blofin extends blofin$1 {
2156
2156
  * @param {int} [since] the earliest time in ms to fetch orders for
2157
2157
  * @param {int} [limit] the maximum number of orde structures to retrieve
2158
2158
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2159
- * @param {bool} [params.stop] True if fetching trigger or conditional orders
2159
+ * @param {bool} [params.trigger] True if fetching trigger or conditional orders
2160
2160
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2161
2161
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2162
2162
  */
@@ -2179,12 +2179,12 @@ class blofin extends blofin$1 {
2179
2179
  if (since !== undefined) {
2180
2180
  request['begin'] = since;
2181
2181
  }
2182
- const isStop = this.safeBoolN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
2182
+ const isTrigger = this.safeBoolN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
2183
2183
  let method = undefined;
2184
2184
  [method, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersHistory');
2185
2185
  const query = this.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL']);
2186
2186
  let response = undefined;
2187
- if ((isStop) || (method === 'privateGetTradeOrdersTpslHistory')) {
2187
+ if ((isTrigger) || (method === 'privateGetTradeOrdersTpslHistory')) {
2188
2188
  response = await this.privateGetTradeOrdersTpslHistory(this.extend(request, query));
2189
2189
  }
2190
2190
  else {
@@ -718,7 +718,6 @@ class btcalpha extends btcalpha$1 {
718
718
  'postOnly': undefined,
719
719
  'side': side,
720
720
  'price': price,
721
- 'stopPrice': undefined,
722
721
  'triggerPrice': undefined,
723
722
  'cost': undefined,
724
723
  'amount': amount,
@@ -553,7 +553,6 @@ class btcbox extends btcbox$1 {
553
553
  'status': status,
554
554
  'symbol': market['symbol'],
555
555
  'price': price,
556
- 'stopPrice': undefined,
557
556
  'triggerPrice': undefined,
558
557
  'cost': undefined,
559
558
  'trades': trades,
@@ -1038,7 +1038,6 @@ class btcmarkets extends btcmarkets$1 {
1038
1038
  const id = this.safeString(order, 'orderId');
1039
1039
  const clientOrderId = this.safeString(order, 'clientOrderId');
1040
1040
  const timeInForce = this.safeString(order, 'timeInForce');
1041
- const stopPrice = this.safeNumber(order, 'triggerPrice');
1042
1041
  const postOnly = this.safeBool(order, 'postOnly');
1043
1042
  return this.safeOrder({
1044
1043
  'info': order,
@@ -1053,8 +1052,7 @@ class btcmarkets extends btcmarkets$1 {
1053
1052
  'postOnly': postOnly,
1054
1053
  'side': side,
1055
1054
  'price': price,
1056
- 'stopPrice': stopPrice,
1057
- 'triggerPrice': stopPrice,
1055
+ 'triggerPrice': this.safeNumber(order, 'triggerPrice'),
1058
1056
  'cost': undefined,
1059
1057
  'amount': amount,
1060
1058
  'filled': undefined,
@@ -3726,7 +3726,6 @@ class bybit extends bybit$1 {
3726
3726
  'reduceOnly': this.safeBool(order, 'reduceOnly'),
3727
3727
  'side': side,
3728
3728
  'price': price,
3729
- 'stopPrice': stopPrice,
3730
3729
  'triggerPrice': stopPrice,
3731
3730
  'takeProfitPrice': takeProfitPrice,
3732
3731
  'stopLossPrice': stopLossPrice,
@@ -5735,7 +5734,7 @@ class bybit extends bybit$1 {
5735
5734
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5736
5735
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
5737
5736
  * @param {string} [params.subType] if inverse will use v5/account/contract-transaction-log
5738
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5737
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
5739
5738
  */
5740
5739
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5741
5740
  await this.loadMarkets();
@@ -8125,7 +8124,7 @@ class bybit extends bybit$1 {
8125
8124
  }
8126
8125
  symbol = market['symbol'];
8127
8126
  }
8128
- const data = await this.getLeverageTiersPaginated(symbol, this.extend({ 'paginate': true, 'paginationCalls': 20 }, params));
8127
+ const data = await this.getLeverageTiersPaginated(symbol, this.extend({ 'paginate': true, 'paginationCalls': 40 }, params));
8129
8128
  symbols = this.marketSymbols(symbols);
8130
8129
  return this.parseLeverageTiers(data, symbols, 'symbol');
8131
8130
  }
@@ -1261,7 +1261,7 @@ class cex extends cex$1 {
1261
1261
  * @param {int} [limit] max number of ledger entries to return
1262
1262
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1263
1263
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
1264
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1264
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
1265
1265
  */
1266
1266
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1267
1267
  await this.loadMarkets();
@@ -374,6 +374,82 @@ class coinbase extends coinbase$1 {
374
374
  'fetchTime': 'v2PublicGetTime',
375
375
  'user_native_currency': 'USD', // needed to get fees for v3
376
376
  },
377
+ 'features': {
378
+ 'spot': {
379
+ 'sandbox': false,
380
+ 'createOrder': {
381
+ 'marginMode': true,
382
+ 'triggerPrice': true,
383
+ 'triggerPriceType': undefined,
384
+ 'triggerDirection': true,
385
+ 'stopLossPrice': true,
386
+ 'takeProfitPrice': true,
387
+ 'attachedStopLossTakeProfit': undefined,
388
+ 'timeInForce': {
389
+ 'IOC': true,
390
+ 'FOK': true,
391
+ 'PO': true,
392
+ 'GTD': true,
393
+ },
394
+ 'hedged': false,
395
+ 'trailing': false,
396
+ },
397
+ 'createOrders': undefined,
398
+ 'fetchMyTrades': {
399
+ 'marginMode': false,
400
+ 'limit': 3000,
401
+ 'daysBack': undefined,
402
+ 'untilDays': 10000,
403
+ },
404
+ 'fetchOrder': {
405
+ 'marginMode': false,
406
+ 'trigger': false,
407
+ 'trailing': false,
408
+ },
409
+ 'fetchOpenOrders': {
410
+ 'marginMode': false,
411
+ 'limit': undefined,
412
+ 'trigger': false,
413
+ 'trailing': false,
414
+ },
415
+ 'fetchOrders': {
416
+ 'marginMode': false,
417
+ 'limit': undefined,
418
+ 'daysBack': undefined,
419
+ 'untilDays': 10000,
420
+ 'trigger': false,
421
+ 'trailing': false,
422
+ },
423
+ 'fetchClosedOrders': {
424
+ 'marginMode': false,
425
+ 'limit': undefined,
426
+ 'daysBackClosed': undefined,
427
+ 'daysBackCanceled': undefined,
428
+ 'untilDays': 10000,
429
+ 'trigger': false,
430
+ 'trailing': false,
431
+ },
432
+ 'fetchOHLCV': {
433
+ 'limit': 350,
434
+ },
435
+ },
436
+ 'swap': {
437
+ 'linear': {
438
+ 'extends': 'spot',
439
+ },
440
+ 'inverse': {
441
+ 'extends': 'spot',
442
+ },
443
+ },
444
+ 'future': {
445
+ 'linear': {
446
+ 'extends': 'spot',
447
+ },
448
+ 'inverse': {
449
+ 'extends': 'spot',
450
+ },
451
+ },
452
+ },
377
453
  });
378
454
  }
379
455
  /**
@@ -2350,7 +2426,7 @@ class coinbase extends coinbase$1 {
2350
2426
  * @param {int} [limit] max number of ledger entries to return, default is undefined
2351
2427
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2352
2428
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2353
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2429
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
2354
2430
  */
2355
2431
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2356
2432
  await this.loadMarkets();
@@ -1501,7 +1501,7 @@ class coinbaseexchange extends coinbaseexchange$1 {
1501
1501
  * @param {int} [limit] max number of ledger entries to return, default is undefined
1502
1502
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1503
1503
  * @param {int} [params.until] the latest time in ms to fetch trades for
1504
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1504
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
1505
1505
  */
1506
1506
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
1507
1507
  // https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
@@ -255,6 +255,68 @@ class coinbaseinternational extends coinbaseinternational$1 {
255
255
  'bitcoin': 'BTC',
256
256
  },
257
257
  },
258
+ 'features': {
259
+ 'spot': {
260
+ 'sandbox': true,
261
+ 'createOrder': {
262
+ 'marginMode': false,
263
+ 'triggerPrice': true,
264
+ 'triggerPriceType': undefined,
265
+ 'triggerDirection': true,
266
+ 'stopLossPrice': false,
267
+ 'takeProfitPrice': false,
268
+ 'attachedStopLossTakeProfit': undefined,
269
+ 'timeInForce': {
270
+ 'IOC': true,
271
+ 'FOK': true,
272
+ 'PO': true,
273
+ 'GTD': true,
274
+ 'GTC': true, // has 30 days max
275
+ },
276
+ 'hedged': false,
277
+ 'trailing': false,
278
+ },
279
+ 'createOrders': undefined,
280
+ 'fetchMyTrades': {
281
+ 'marginMode': false,
282
+ 'limit': 100,
283
+ 'daysBack': undefined,
284
+ 'untilDays': 10000,
285
+ },
286
+ 'fetchOrder': {
287
+ 'marginMode': false,
288
+ 'trigger': false,
289
+ 'trailing': false,
290
+ },
291
+ 'fetchOpenOrders': {
292
+ 'marginMode': false,
293
+ 'limit': 100,
294
+ 'trigger': false,
295
+ 'trailing': false,
296
+ },
297
+ 'fetchOrders': undefined,
298
+ 'fetchClosedOrders': undefined,
299
+ 'fetchOHLCV': {
300
+ 'limit': 300,
301
+ },
302
+ },
303
+ 'swap': {
304
+ 'linear': {
305
+ 'extends': 'spot',
306
+ },
307
+ 'inverse': {
308
+ 'extends': 'spot',
309
+ },
310
+ },
311
+ 'future': {
312
+ 'linear': {
313
+ 'extends': 'spot',
314
+ },
315
+ 'inverse': {
316
+ 'extends': 'spot',
317
+ },
318
+ },
319
+ },
258
320
  });
259
321
  }
260
322
  async handlePortfolioAndParams(methodName, params = {}) {
@@ -5076,7 +5076,7 @@ class coincatch extends coincatch$1 {
5076
5076
  * @param {string} [params.business] *swap only*
5077
5077
  * @param {string} [params.lastEndId] *swap only*
5078
5078
  * @param {bool} [params.next] *swap only*
5079
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5079
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
5080
5080
  */
5081
5081
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5082
5082
  const methodName = 'fetchLedger';
@@ -2629,21 +2629,21 @@ class coinex extends coinex$1 {
2629
2629
  const request = {
2630
2630
  'market': market['id'],
2631
2631
  };
2632
- const stop = this.safeBool2(params, 'stop', 'trigger');
2632
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
2633
2633
  params = this.omit(params, ['stop', 'trigger']);
2634
2634
  let response = undefined;
2635
2635
  const requestIds = [];
2636
2636
  for (let i = 0; i < ids.length; i++) {
2637
2637
  requestIds.push(parseInt(ids[i]));
2638
2638
  }
2639
- if (stop) {
2639
+ if (trigger) {
2640
2640
  request['stop_ids'] = requestIds;
2641
2641
  }
2642
2642
  else {
2643
2643
  request['order_ids'] = requestIds;
2644
2644
  }
2645
2645
  if (market['spot']) {
2646
- if (stop) {
2646
+ if (trigger) {
2647
2647
  response = await this.v2PrivatePostSpotCancelBatchStopOrder(this.extend(request, params));
2648
2648
  //
2649
2649
  // {
@@ -2715,7 +2715,7 @@ class coinex extends coinex$1 {
2715
2715
  }
2716
2716
  else {
2717
2717
  request['market_type'] = 'FUTURES';
2718
- if (stop) {
2718
+ if (trigger) {
2719
2719
  response = await this.v2PrivatePostFuturesCancelBatchStopOrder(this.extend(request, params));
2720
2720
  //
2721
2721
  // {
@@ -3411,7 +3411,7 @@ class coinex extends coinex$1 {
3411
3411
  if (limit !== undefined) {
3412
3412
  request['limit'] = limit;
3413
3413
  }
3414
- const stop = this.safeBool2(params, 'stop', 'trigger');
3414
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
3415
3415
  params = this.omit(params, ['stop', 'trigger']);
3416
3416
  let marketType = undefined;
3417
3417
  [marketType, params] = this.handleMarketTypeAndParams('fetchOrdersByStatus', market, params);
@@ -3421,7 +3421,7 @@ class coinex extends coinex$1 {
3421
3421
  if (marketType === 'swap') {
3422
3422
  request['market_type'] = 'FUTURES';
3423
3423
  if (isClosed) {
3424
- if (stop) {
3424
+ if (trigger) {
3425
3425
  response = await this.v2PrivateGetFuturesFinishedStopOrder(this.extend(request, params));
3426
3426
  //
3427
3427
  // {
@@ -3485,7 +3485,7 @@ class coinex extends coinex$1 {
3485
3485
  }
3486
3486
  }
3487
3487
  else if (isOpen) {
3488
- if (stop) {
3488
+ if (trigger) {
3489
3489
  response = await this.v2PrivateGetFuturesPendingStopOrder(this.extend(request, params));
3490
3490
  //
3491
3491
  // {
@@ -3564,7 +3564,7 @@ class coinex extends coinex$1 {
3564
3564
  request['market_type'] = 'SPOT';
3565
3565
  }
3566
3566
  if (isClosed) {
3567
- if (stop) {
3567
+ if (trigger) {
3568
3568
  response = await this.v2PrivateGetSpotFinishedStopOrder(this.extend(request, params));
3569
3569
  //
3570
3570
  // {
@@ -3631,7 +3631,7 @@ class coinex extends coinex$1 {
3631
3631
  }
3632
3632
  }
3633
3633
  else if (status === 'pending') {
3634
- if (stop) {
3634
+ if (trigger) {
3635
3635
  response = await this.v2PrivateGetSpotPendingStopOrder(this.extend(request, params));
3636
3636
  //
3637
3637
  // {
@@ -2091,7 +2091,7 @@ class coinlist extends coinlist$1 {
2091
2091
  * @param {int} [limit] max number of ledger entries to return (default 200, max 500)
2092
2092
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2093
2093
  * @param {int} [params.until] the latest time in ms to fetch entries for
2094
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2094
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
2095
2095
  */
2096
2096
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2097
2097
  const traderId = this.safeString2(params, 'trader_id', 'traderId');