ccxt 4.4.40 → 4.4.42

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 (183) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -1
  5. package/dist/cjs/src/alpaca.js +0 -1
  6. package/dist/cjs/src/ascendex.js +0 -1
  7. package/dist/cjs/src/base/Exchange.js +41 -19
  8. package/dist/cjs/src/bigone.js +0 -1
  9. package/dist/cjs/src/binance.js +27 -24
  10. package/dist/cjs/src/bingx.js +6 -1
  11. package/dist/cjs/src/bitfinex.js +124 -1
  12. package/dist/cjs/src/bitget.js +1 -0
  13. package/dist/cjs/src/bitmart.js +254 -1
  14. package/dist/cjs/src/blofin.js +16 -7
  15. package/dist/cjs/src/bybit.js +8 -8
  16. package/dist/cjs/src/cex.js +1 -1
  17. package/dist/cjs/src/coinbase.js +8 -9
  18. package/dist/cjs/src/coinbaseexchange.js +5 -6
  19. package/dist/cjs/src/coinbaseinternational.js +7 -8
  20. package/dist/cjs/src/coincatch.js +0 -1
  21. package/dist/cjs/src/coincheck.js +0 -1
  22. package/dist/cjs/src/coinex.js +91 -6
  23. package/dist/cjs/src/coinlist.js +3 -4
  24. package/dist/cjs/src/coinmate.js +1 -3
  25. package/dist/cjs/src/coinmetro.js +4 -5
  26. package/dist/cjs/src/coinone.js +0 -1
  27. package/dist/cjs/src/coinsph.js +7 -8
  28. package/dist/cjs/src/cryptocom.js +3 -0
  29. package/dist/cjs/src/currencycom.js +3 -4
  30. package/dist/cjs/src/defx.js +6 -7
  31. package/dist/cjs/src/deribit.js +1 -3
  32. package/dist/cjs/src/digifinex.js +0 -1
  33. package/dist/cjs/src/ellipx.js +0 -2
  34. package/dist/cjs/src/exmo.js +63 -6
  35. package/dist/cjs/src/gate.js +2 -3
  36. package/dist/cjs/src/gemini.js +4 -5
  37. package/dist/cjs/src/hashkey.js +79 -83
  38. package/dist/cjs/src/hitbtc.js +49 -5
  39. package/dist/cjs/src/hollaex.js +4 -6
  40. package/dist/cjs/src/htx.js +2 -4
  41. package/dist/cjs/src/huobijp.js +0 -1
  42. package/dist/cjs/src/hyperliquid.js +65 -1
  43. package/dist/cjs/src/idex.js +8 -8
  44. package/dist/cjs/src/independentreserve.js +0 -1
  45. package/dist/cjs/src/indodax.js +0 -1
  46. package/dist/cjs/src/kraken.js +192 -29
  47. package/dist/cjs/src/krakenfutures.js +75 -3
  48. package/dist/cjs/src/kucoin.js +7 -4
  49. package/dist/cjs/src/kucoinfutures.js +10 -9
  50. package/dist/cjs/src/kuna.js +1 -3
  51. package/dist/cjs/src/latoken.js +1 -3
  52. package/dist/cjs/src/lbank.js +0 -1
  53. package/dist/cjs/src/luno.js +0 -1
  54. package/dist/cjs/src/lykke.js +0 -1
  55. package/dist/cjs/src/mercado.js +0 -1
  56. package/dist/cjs/src/mexc.js +6 -7
  57. package/dist/cjs/src/ndax.js +1 -1
  58. package/dist/cjs/src/novadax.js +4 -6
  59. package/dist/cjs/src/oceanex.js +0 -1
  60. package/dist/cjs/src/okcoin.js +1 -3
  61. package/dist/cjs/src/okx.js +7 -4
  62. package/dist/cjs/src/onetrading.js +1 -3
  63. package/dist/cjs/src/p2b.js +1 -1
  64. package/dist/cjs/src/paradex.js +5 -7
  65. package/dist/cjs/src/phemex.js +8 -10
  66. package/dist/cjs/src/poloniex.js +1 -3
  67. package/dist/cjs/src/poloniexfutures.js +6 -6
  68. package/dist/cjs/src/probit.js +0 -1
  69. package/dist/cjs/src/timex.js +0 -1
  70. package/dist/cjs/src/tokocrypto.js +11 -14
  71. package/dist/cjs/src/tradeogre.js +1 -1
  72. package/dist/cjs/src/upbit.js +0 -1
  73. package/dist/cjs/src/wavesexchange.js +4 -5
  74. package/dist/cjs/src/whitebit.js +8 -9
  75. package/dist/cjs/src/woo.js +99 -13
  76. package/dist/cjs/src/woofipro.js +96 -15
  77. package/dist/cjs/src/xt.js +8 -4
  78. package/dist/cjs/src/yobit.js +0 -1
  79. package/dist/cjs/src/zaif.js +0 -1
  80. package/dist/cjs/src/zonda.js +1 -2
  81. package/js/ccxt.d.ts +3 -3
  82. package/js/ccxt.js +1 -1
  83. package/js/src/abstract/binance.d.ts +3 -0
  84. package/js/src/abstract/binancecoinm.d.ts +3 -0
  85. package/js/src/abstract/binanceus.d.ts +3 -0
  86. package/js/src/abstract/binanceusdm.d.ts +3 -0
  87. package/js/src/abstract/bitmart.d.ts +2 -0
  88. package/js/src/abstract/okx.d.ts +5 -0
  89. package/js/src/ace.js +1 -1
  90. package/js/src/alpaca.js +0 -1
  91. package/js/src/ascendex.js +0 -1
  92. package/js/src/base/Exchange.d.ts +12 -9
  93. package/js/src/base/Exchange.js +41 -19
  94. package/js/src/base/types.d.ts +2 -0
  95. package/js/src/bigone.js +0 -1
  96. package/js/src/binance.js +27 -24
  97. package/js/src/bingx.js +6 -1
  98. package/js/src/bitfinex.d.ts +11 -1
  99. package/js/src/bitfinex.js +124 -1
  100. package/js/src/bitget.js +1 -0
  101. package/js/src/bitmart.d.ts +52 -1
  102. package/js/src/bitmart.js +254 -1
  103. package/js/src/blofin.d.ts +1 -1
  104. package/js/src/blofin.js +16 -7
  105. package/js/src/bybit.js +8 -8
  106. package/js/src/cex.js +1 -1
  107. package/js/src/coinbase.js +8 -9
  108. package/js/src/coinbaseexchange.js +5 -6
  109. package/js/src/coinbaseinternational.d.ts +1 -1
  110. package/js/src/coinbaseinternational.js +7 -8
  111. package/js/src/coincatch.js +0 -1
  112. package/js/src/coincheck.js +0 -1
  113. package/js/src/coinex.js +91 -6
  114. package/js/src/coinlist.js +3 -4
  115. package/js/src/coinmate.js +1 -3
  116. package/js/src/coinmetro.js +4 -5
  117. package/js/src/coinone.js +0 -1
  118. package/js/src/coinsph.js +7 -8
  119. package/js/src/cryptocom.js +3 -0
  120. package/js/src/currencycom.js +3 -4
  121. package/js/src/defx.js +6 -7
  122. package/js/src/deribit.js +1 -3
  123. package/js/src/digifinex.js +0 -1
  124. package/js/src/ellipx.js +0 -2
  125. package/js/src/exmo.d.ts +36 -1
  126. package/js/src/exmo.js +63 -6
  127. package/js/src/gate.d.ts +1 -1
  128. package/js/src/gate.js +2 -3
  129. package/js/src/gemini.js +4 -5
  130. package/js/src/hashkey.js +79 -83
  131. package/js/src/hitbtc.d.ts +11 -1
  132. package/js/src/hitbtc.js +49 -5
  133. package/js/src/hollaex.js +4 -6
  134. package/js/src/htx.js +2 -4
  135. package/js/src/huobijp.js +0 -1
  136. package/js/src/hyperliquid.d.ts +20 -1
  137. package/js/src/hyperliquid.js +65 -1
  138. package/js/src/idex.js +8 -8
  139. package/js/src/independentreserve.js +0 -1
  140. package/js/src/indodax.js +0 -1
  141. package/js/src/kraken.d.ts +15 -9
  142. package/js/src/kraken.js +192 -29
  143. package/js/src/krakenfutures.d.ts +2 -2
  144. package/js/src/krakenfutures.js +75 -3
  145. package/js/src/kucoin.js +7 -4
  146. package/js/src/kucoinfutures.d.ts +5 -4
  147. package/js/src/kucoinfutures.js +10 -9
  148. package/js/src/kuna.js +1 -3
  149. package/js/src/latoken.js +1 -3
  150. package/js/src/lbank.js +0 -1
  151. package/js/src/luno.js +0 -1
  152. package/js/src/lykke.js +0 -1
  153. package/js/src/mercado.js +0 -1
  154. package/js/src/mexc.js +6 -7
  155. package/js/src/ndax.js +1 -1
  156. package/js/src/novadax.js +4 -6
  157. package/js/src/oceanex.js +0 -1
  158. package/js/src/okcoin.js +1 -3
  159. package/js/src/okx.js +7 -4
  160. package/js/src/onetrading.js +1 -3
  161. package/js/src/p2b.js +1 -1
  162. package/js/src/paradex.d.ts +1 -1
  163. package/js/src/paradex.js +5 -7
  164. package/js/src/phemex.js +8 -10
  165. package/js/src/poloniex.js +1 -3
  166. package/js/src/poloniexfutures.js +6 -6
  167. package/js/src/probit.js +0 -1
  168. package/js/src/timex.js +0 -1
  169. package/js/src/tokocrypto.js +11 -14
  170. package/js/src/tradeogre.js +1 -1
  171. package/js/src/upbit.js +0 -1
  172. package/js/src/wavesexchange.d.ts +1 -1
  173. package/js/src/wavesexchange.js +4 -5
  174. package/js/src/whitebit.js +8 -9
  175. package/js/src/woo.d.ts +1 -1
  176. package/js/src/woo.js +99 -13
  177. package/js/src/woofipro.js +96 -15
  178. package/js/src/xt.d.ts +2 -1
  179. package/js/src/xt.js +8 -4
  180. package/js/src/yobit.js +0 -1
  181. package/js/src/zaif.js +0 -1
  182. package/js/src/zonda.js +1 -2
  183. package/package.json +2 -2
@@ -675,7 +675,7 @@ class mexc extends mexc$1 {
675
675
  'broker': 'CCXT',
676
676
  },
677
677
  'features': {
678
- 'def': {
678
+ 'default': {
679
679
  'sandbox': false,
680
680
  'createOrder': {
681
681
  'marginMode': true,
@@ -743,10 +743,10 @@ class mexc extends mexc$1 {
743
743
  },
744
744
  },
745
745
  'spot': {
746
- 'extends': 'def',
746
+ 'extends': 'default',
747
747
  },
748
748
  'forDerivs': {
749
- 'extends': 'def',
749
+ 'extends': 'default',
750
750
  'createOrder': {
751
751
  'triggerPrice': true,
752
752
  'triggerPriceType': {
@@ -2540,11 +2540,11 @@ class mexc extends mexc$1 {
2540
2540
  if (clientOrderId !== undefined) {
2541
2541
  request['externalOid'] = clientOrderId;
2542
2542
  }
2543
- const stopPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
2543
+ const triggerPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
2544
2544
  params = this.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice', 'hedged']);
2545
2545
  let response = undefined;
2546
- if (stopPrice) {
2547
- request['triggerPrice'] = this.priceToPrecision(symbol, stopPrice);
2546
+ if (triggerPrice) {
2547
+ request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
2548
2548
  request['triggerType'] = this.safeInteger(params, 'triggerType', 1);
2549
2549
  request['executeCycle'] = this.safeInteger(params, 'executeCycle', 1);
2550
2550
  request['trend'] = this.safeInteger(params, 'trend', 1);
@@ -3599,7 +3599,6 @@ class mexc extends mexc$1 {
3599
3599
  'timeInForce': this.parseOrderTimeInForce(this.safeString(order, 'timeInForce')),
3600
3600
  'side': this.parseOrderSide(this.safeString(order, 'side')),
3601
3601
  'price': this.safeNumber(order, 'price'),
3602
- 'stopPrice': this.safeNumber2(order, 'stopPrice', 'triggerPrice'),
3603
3602
  'triggerPrice': this.safeNumber2(order, 'stopPrice', 'triggerPrice'),
3604
3603
  'average': this.safeNumber(order, 'dealAvgPrice'),
3605
3604
  'amount': this.safeNumber2(order, 'origQty', 'vol'),
@@ -1354,7 +1354,7 @@ class ndax extends ndax$1 {
1354
1354
  'postOnly': undefined,
1355
1355
  'side': this.safeStringLower(order, 'Side'),
1356
1356
  'price': this.safeString(order, 'Price'),
1357
- 'stopPrice': this.parseNumber(this.omitZero(this.safeString(order, 'StopPrice'))),
1357
+ 'triggerPrice': this.parseNumber(this.omitZero(this.safeString(order, 'StopPrice'))),
1358
1358
  'cost': this.safeString(order, 'GrossValueExecuted'),
1359
1359
  'amount': this.safeString(order, 'OrigQuantity'),
1360
1360
  'filled': this.safeString(order, 'QuantityExecuted'),
@@ -756,8 +756,8 @@ class novadax extends novadax$1 {
756
756
  // "stopPrice": this.priceToPrecision (symbol, stopPrice),
757
757
  // "accountId": "...", // subaccount id, optional
758
758
  };
759
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
760
- if (stopPrice === undefined) {
759
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
760
+ if (triggerPrice === undefined) {
761
761
  if ((uppercaseType === 'STOP_LIMIT') || (uppercaseType === 'STOP_MARKET')) {
762
762
  throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a stopPrice parameter for ' + uppercaseType + ' orders');
763
763
  }
@@ -771,7 +771,7 @@ class novadax extends novadax$1 {
771
771
  }
772
772
  const defaultOperator = (uppercaseSide === 'BUY') ? 'LTE' : 'GTE';
773
773
  request['operator'] = this.safeString(params, 'operator', defaultOperator);
774
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
774
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
775
775
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
776
776
  }
777
777
  if ((uppercaseType === 'LIMIT') || (uppercaseType === 'STOP_LIMIT')) {
@@ -1104,7 +1104,6 @@ class novadax extends novadax$1 {
1104
1104
  }
1105
1105
  const marketId = this.safeString(order, 'symbol');
1106
1106
  const symbol = this.safeSymbol(marketId, market, '_');
1107
- const stopPrice = this.safeNumber(order, 'stopPrice');
1108
1107
  return this.safeOrder({
1109
1108
  'id': id,
1110
1109
  'clientOrderId': undefined,
@@ -1118,8 +1117,7 @@ class novadax extends novadax$1 {
1118
1117
  'postOnly': undefined,
1119
1118
  'side': side,
1120
1119
  'price': price,
1121
- 'stopPrice': stopPrice,
1122
- 'triggerPrice': stopPrice,
1120
+ 'triggerPrice': this.safeNumber(order, 'stopPrice'),
1123
1121
  'amount': amount,
1124
1122
  'cost': cost,
1125
1123
  'average': average,
@@ -851,7 +851,6 @@ class oceanex extends oceanex$1 {
851
851
  'postOnly': undefined,
852
852
  'side': this.safeValue(order, 'side'),
853
853
  'price': price,
854
- 'stopPrice': undefined,
855
854
  'triggerPrice': undefined,
856
855
  'average': average,
857
856
  'amount': amount,
@@ -1945,7 +1945,6 @@ class okcoin extends okcoin$1 {
1945
1945
  }
1946
1946
  const stopLossPrice = this.safeNumber2(order, 'slTriggerPx', 'slOrdPx');
1947
1947
  const takeProfitPrice = this.safeNumber2(order, 'tpTriggerPx', 'tpOrdPx');
1948
- const stopPrice = this.safeNumberN(order, ['triggerPx', 'moveTriggerPx']);
1949
1948
  const reduceOnlyRaw = this.safeString(order, 'reduceOnly');
1950
1949
  let reduceOnly = false;
1951
1950
  if (reduceOnly !== undefined) {
@@ -1967,8 +1966,7 @@ class okcoin extends okcoin$1 {
1967
1966
  'price': price,
1968
1967
  'stopLossPrice': stopLossPrice,
1969
1968
  'takeProfitPrice': takeProfitPrice,
1970
- 'stopPrice': stopPrice,
1971
- 'triggerPrice': stopPrice,
1969
+ 'triggerPrice': this.safeNumberN(order, ['triggerPx', 'moveTriggerPx']),
1972
1970
  'average': average,
1973
1971
  'cost': cost,
1974
1972
  'amount': amount,
@@ -259,6 +259,7 @@ class okx extends okx$1 {
259
259
  'tradingBot/public/rsi-back-testing': 1,
260
260
  'asset/exchange-list': 5 / 3,
261
261
  'finance/staking-defi/eth/apy-history': 5 / 3,
262
+ 'finance/staking-defi/sol/apy-history': 5 / 3,
262
263
  'finance/savings/lending-rate-summary': 5 / 3,
263
264
  'finance/savings/lending-rate-history': 5 / 3,
264
265
  'finance/fixed-loan/lending-offers': 10 / 3,
@@ -397,6 +398,8 @@ class okx extends okx$1 {
397
398
  'finance/staking-defi/eth/balance': 5 / 3,
398
399
  'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
399
400
  'finance/staking-defi/eth/product-info': 3,
401
+ 'finance/staking-defi/sol/balance': 5 / 3,
402
+ 'finance/staking-defi/sol/purchase-redeem-history': 5 / 3,
400
403
  // copytrading
401
404
  'copytrading/current-subpositions': 1,
402
405
  'copytrading/subpositions-history': 1,
@@ -531,6 +534,8 @@ class okx extends okx$1 {
531
534
  // eth staking
532
535
  'finance/staking-defi/eth/purchase': 5,
533
536
  'finance/staking-defi/eth/redeem': 5,
537
+ 'finance/staking-defi/sol/purchase': 5,
538
+ 'finance/staking-defi/sol/redeem': 5,
534
539
  // copytrading
535
540
  'copytrading/algo-order': 1,
536
541
  'copytrading/close-subposition': 1,
@@ -3840,7 +3845,6 @@ class okx extends okx$1 {
3840
3845
  }
3841
3846
  const stopLossPrice = this.safeNumber2(order, 'slTriggerPx', 'slOrdPx');
3842
3847
  const takeProfitPrice = this.safeNumber2(order, 'tpTriggerPx', 'tpOrdPx');
3843
- const stopPrice = this.safeNumberN(order, ['triggerPx', 'moveTriggerPx']);
3844
3848
  const reduceOnlyRaw = this.safeString(order, 'reduceOnly');
3845
3849
  let reduceOnly = false;
3846
3850
  if (reduceOnly !== undefined) {
@@ -3862,8 +3866,7 @@ class okx extends okx$1 {
3862
3866
  'price': price,
3863
3867
  'stopLossPrice': stopLossPrice,
3864
3868
  'takeProfitPrice': takeProfitPrice,
3865
- 'stopPrice': stopPrice,
3866
- 'triggerPrice': stopPrice,
3869
+ 'triggerPrice': this.safeNumberN(order, ['triggerPx', 'moveTriggerPx']),
3867
3870
  'average': average,
3868
3871
  'cost': cost,
3869
3872
  'amount': amount,
@@ -7395,7 +7398,7 @@ class okx extends okx$1 {
7395
7398
  // }
7396
7399
  //
7397
7400
  const data = this.safeList(response, 'data', []);
7398
- return this.parseOpenInterests(data, undefined, since, limit);
7401
+ return this.parseOpenInterestsHistory(data, undefined, since, limit);
7399
7402
  }
7400
7403
  parseOpenInterest(interest, market = undefined) {
7401
7404
  //
@@ -1085,7 +1085,6 @@ class onetrading extends onetrading$1 {
1085
1085
  const side = this.safeStringLower(rawOrder, 'side');
1086
1086
  const type = this.safeStringLower(rawOrder, 'type');
1087
1087
  const timeInForce = this.parseTimeInForce(this.safeString(rawOrder, 'time_in_force'));
1088
- const stopPrice = this.safeNumber(rawOrder, 'trigger_price');
1089
1088
  const postOnly = this.safeValue(rawOrder, 'is_post_only');
1090
1089
  const rawTrades = this.safeValue(order, 'trades', []);
1091
1090
  return this.safeOrder({
@@ -1101,8 +1100,7 @@ class onetrading extends onetrading$1 {
1101
1100
  'postOnly': postOnly,
1102
1101
  'side': side,
1103
1102
  'price': price,
1104
- 'stopPrice': stopPrice,
1105
- 'triggerPrice': stopPrice,
1103
+ 'triggerPrice': this.safeNumber(rawOrder, 'trigger_price'),
1106
1104
  'amount': amount,
1107
1105
  'cost': undefined,
1108
1106
  'average': undefined,
@@ -1192,7 +1192,7 @@ class p2b extends p2b$1 {
1192
1192
  'postOnly': undefined,
1193
1193
  'side': this.safeString(order, 'side'),
1194
1194
  'price': this.safeString(order, 'price'),
1195
- 'stopPrice': undefined,
1195
+ 'triggerPrice': undefined,
1196
1196
  'amount': this.safeString(order, 'amount'),
1197
1197
  'cost': undefined,
1198
1198
  'average': undefined,
@@ -1106,7 +1106,6 @@ class paradex extends paradex$1 {
1106
1106
  const side = this.safeStringLower(order, 'side');
1107
1107
  const average = this.omitZero(this.safeString(order, 'avg_fill_price'));
1108
1108
  const remaining = this.omitZero(this.safeString(order, 'remaining_size'));
1109
- const stopPrice = this.safeString(order, 'trigger_price');
1110
1109
  const lastUpdateTimestamp = this.safeInteger(order, 'last_updated_at');
1111
1110
  return this.safeOrder({
1112
1111
  'id': orderId,
@@ -1123,8 +1122,7 @@ class paradex extends paradex$1 {
1123
1122
  'reduceOnly': undefined,
1124
1123
  'side': side,
1125
1124
  'price': price,
1126
- 'stopPrice': stopPrice,
1127
- 'triggerPrice': stopPrice,
1125
+ 'triggerPrice': this.safeString(order, 'trigger_price'),
1128
1126
  'takeProfitPrice': undefined,
1129
1127
  'stopLossPrice': undefined,
1130
1128
  'average': average,
@@ -1187,7 +1185,7 @@ class paradex extends paradex$1 {
1187
1185
  * @param {float} amount how much of currency you want to trade in units of base currency
1188
1186
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1189
1187
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1190
- * @param {float} [params.stopPrice] The price a trigger order is triggered at
1188
+ * @param {float} [params.stopPrice] alias for triggerPrice
1191
1189
  * @param {float} [params.triggerPrice] The price a trigger order is triggered at
1192
1190
  * @param {string} [params.timeInForce] "GTC", "IOC", or "POST_ONLY"
1193
1191
  * @param {bool} [params.postOnly] true or false
@@ -1208,7 +1206,7 @@ class paradex extends paradex$1 {
1208
1206
  'type': orderType,
1209
1207
  'size': this.amountToPrecision(symbol, amount),
1210
1208
  };
1211
- const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1209
+ const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1212
1210
  const isMarket = orderType === 'MARKET';
1213
1211
  const timeInForce = this.safeStringUpper(params, 'timeInForce');
1214
1212
  const postOnly = this.isPostOnly(isMarket, undefined, params);
@@ -1232,14 +1230,14 @@ class paradex extends paradex$1 {
1232
1230
  if (clientOrderId !== undefined) {
1233
1231
  request['client_id'] = clientOrderId;
1234
1232
  }
1235
- if (stopPrice !== undefined) {
1233
+ if (triggerPrice !== undefined) {
1236
1234
  if (isMarket) {
1237
1235
  request['type'] = 'STOP_MARKET';
1238
1236
  }
1239
1237
  else {
1240
1238
  request['type'] = 'STOP_LIMIT';
1241
1239
  }
1242
- request['trigger_price'] = this.priceToPrecision(symbol, stopPrice);
1240
+ request['trigger_price'] = this.priceToPrecision(symbol, triggerPrice);
1243
1241
  }
1244
1242
  params = this.omit(params, ['reduceOnly', 'reduce_only', 'clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice']);
1245
1243
  const account = await this.retrieveAccount();
@@ -2267,7 +2267,7 @@ class phemex extends phemex$1 {
2267
2267
  };
2268
2268
  }
2269
2269
  const timeInForce = this.parseTimeInForce(this.safeString(order, 'timeInForce'));
2270
- const stopPrice = this.parseNumber(this.omitZero(this.fromEp(this.safeString(order, 'stopPxEp'))));
2270
+ const triggerPrice = this.parseNumber(this.omitZero(this.fromEp(this.safeString(order, 'stopPxEp'))));
2271
2271
  const postOnly = (timeInForce === 'PO');
2272
2272
  return this.safeOrder({
2273
2273
  'info': order,
@@ -2282,8 +2282,7 @@ class phemex extends phemex$1 {
2282
2282
  'postOnly': postOnly,
2283
2283
  'side': side,
2284
2284
  'price': price,
2285
- 'stopPrice': stopPrice,
2286
- 'triggerPrice': stopPrice,
2285
+ 'triggerPrice': triggerPrice,
2287
2286
  'amount': amount,
2288
2287
  'cost': cost,
2289
2288
  'average': average,
@@ -2431,7 +2430,7 @@ class phemex extends phemex$1 {
2431
2430
  lastTradeTimestamp = undefined;
2432
2431
  }
2433
2432
  const timeInForce = this.parseTimeInForce(this.safeString(order, 'timeInForce'));
2434
- const stopPrice = this.omitZero(this.safeString2(order, 'stopPx', 'stopPxRp'));
2433
+ const triggerPrice = this.omitZero(this.safeString2(order, 'stopPx', 'stopPxRp'));
2435
2434
  const postOnly = (timeInForce === 'PO');
2436
2435
  let reduceOnly = this.safeValue(order, 'reduceOnly');
2437
2436
  const execInst = this.safeString(order, 'execInst');
@@ -2469,8 +2468,7 @@ class phemex extends phemex$1 {
2469
2468
  'reduceOnly': reduceOnly,
2470
2469
  'side': side,
2471
2470
  'price': price,
2472
- 'stopPrice': stopPrice,
2473
- 'triggerPrice': stopPrice,
2471
+ 'triggerPrice': triggerPrice,
2474
2472
  'takeProfitPrice': takeProfit,
2475
2473
  'stopLossPrice': stopLoss,
2476
2474
  'amount': amount,
@@ -2875,13 +2873,13 @@ class phemex extends phemex$1 {
2875
2873
  request['baseQtyEV'] = this.toEv(amount, market);
2876
2874
  }
2877
2875
  }
2878
- const stopPrice = this.safeStringN(params, ['triggerPrice', 'stopPx', 'stopPrice']);
2879
- if (stopPrice !== undefined) {
2876
+ const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPx', 'stopPrice']);
2877
+ if (triggerPrice !== undefined) {
2880
2878
  if (isUSDTSettled) {
2881
- request['stopPxRp'] = this.priceToPrecision(symbol, stopPrice);
2879
+ request['stopPxRp'] = this.priceToPrecision(symbol, triggerPrice);
2882
2880
  }
2883
2881
  else {
2884
- request['stopPxEp'] = this.toEp(stopPrice, market);
2882
+ request['stopPxEp'] = this.toEp(triggerPrice, market);
2885
2883
  }
2886
2884
  }
2887
2885
  params = this.omit(params, ['triggerPrice', 'stopPx', 'stopPrice']);
@@ -1149,7 +1149,6 @@ class poloniex extends poloniex$1 {
1149
1149
  };
1150
1150
  }
1151
1151
  const clientOrderId = this.safeString(order, 'clientOrderId');
1152
- const triggerPrice = this.safeString2(order, 'triggerPrice', 'stopPrice');
1153
1152
  return this.safeOrder({
1154
1153
  'info': order,
1155
1154
  'id': id,
@@ -1164,8 +1163,7 @@ class poloniex extends poloniex$1 {
1164
1163
  'postOnly': undefined,
1165
1164
  'side': side,
1166
1165
  'price': price,
1167
- 'stopPrice': triggerPrice,
1168
- 'triggerPrice': triggerPrice,
1166
+ 'triggerPrice': this.safeString2(order, 'triggerPrice', 'stopPrice'),
1169
1167
  'cost': undefined,
1170
1168
  'average': this.safeString(order, 'avgPrice'),
1171
1169
  'amount': amount,
@@ -867,12 +867,12 @@ class poloniexfutures extends poloniexfutures$1 {
867
867
  'size': preciseAmount,
868
868
  'leverage': 1,
869
869
  };
870
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
871
- if (stopPrice) {
870
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
871
+ if (triggerPrice) {
872
872
  request['stop'] = (side === 'buy') ? 'up' : 'down';
873
873
  const stopPriceType = this.safeString(params, 'stopPriceType', 'TP');
874
874
  request['stopPriceType'] = stopPriceType;
875
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
875
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
876
876
  }
877
877
  const timeInForce = this.safeStringUpper(params, 'timeInForce');
878
878
  if (type === 'limit') {
@@ -929,7 +929,7 @@ class poloniexfutures extends poloniexfutures$1 {
929
929
  'trades': undefined,
930
930
  'timeInForce': undefined,
931
931
  'postOnly': undefined,
932
- 'stopPrice': undefined,
932
+ 'triggerPrice': undefined,
933
933
  'info': response,
934
934
  }, market);
935
935
  }
@@ -1260,7 +1260,7 @@ class poloniexfutures extends poloniexfutures$1 {
1260
1260
  'trades': undefined,
1261
1261
  'timeInForce': undefined,
1262
1262
  'postOnly': undefined,
1263
- 'stopPrice': undefined,
1263
+ 'triggerPrice': undefined,
1264
1264
  'info': response,
1265
1265
  }));
1266
1266
  }
@@ -1597,7 +1597,7 @@ class poloniexfutures extends poloniexfutures$1 {
1597
1597
  'side': this.safeString(order, 'side'),
1598
1598
  'amount': this.safeString(order, 'size'),
1599
1599
  'price': this.safeString(order, 'price'),
1600
- 'stopPrice': this.safeString(order, 'stopPrice'),
1600
+ 'triggerPrice': this.safeString(order, 'stopPrice'),
1601
1601
  'cost': this.safeString(order, 'dealValue'),
1602
1602
  'filled': filled,
1603
1603
  'remaining': undefined,
@@ -1164,7 +1164,6 @@ class probit extends probit$1 {
1164
1164
  'side': side,
1165
1165
  'status': status,
1166
1166
  'price': price,
1167
- 'stopPrice': undefined,
1168
1167
  'triggerPrice': undefined,
1169
1168
  'amount': amount,
1170
1169
  'filled': filled,
@@ -1562,7 +1562,6 @@ class timex extends timex$1 {
1562
1562
  'postOnly': undefined,
1563
1563
  'side': side,
1564
1564
  'price': price,
1565
- 'stopPrice': undefined,
1566
1565
  'triggerPrice': undefined,
1567
1566
  'amount': amount,
1568
1567
  'cost': undefined,
@@ -1549,8 +1549,6 @@ class tokocrypto extends tokocrypto$1 {
1549
1549
  timeInForce = 'PO';
1550
1550
  }
1551
1551
  const postOnly = (type === 'limit_maker') || (timeInForce === 'PO');
1552
- const stopPriceString = this.safeString(order, 'stopPrice');
1553
- const stopPrice = this.parseNumber(this.omitZero(stopPriceString));
1554
1552
  return this.safeOrder({
1555
1553
  'info': order,
1556
1554
  'id': id,
@@ -1565,8 +1563,7 @@ class tokocrypto extends tokocrypto$1 {
1565
1563
  'reduceOnly': this.safeValue(order, 'reduceOnly'),
1566
1564
  'side': side,
1567
1565
  'price': price,
1568
- 'stopPrice': stopPrice,
1569
- 'triggerPrice': stopPrice,
1566
+ 'triggerPrice': this.parseNumber(this.omitZero(this.safeString(order, 'stopPrice'))),
1570
1567
  'amount': amount,
1571
1568
  'cost': cost,
1572
1569
  'average': average,
@@ -1614,8 +1611,8 @@ class tokocrypto extends tokocrypto$1 {
1614
1611
  params = this.omit(params, ['clientId', 'clientOrderId']);
1615
1612
  const initialUppercaseType = type.toUpperCase();
1616
1613
  let uppercaseType = initialUppercaseType;
1617
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1618
- if (stopPrice !== undefined) {
1614
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1615
+ if (triggerPrice !== undefined) {
1619
1616
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
1620
1617
  if (uppercaseType === 'MARKET') {
1621
1618
  uppercaseType = 'STOP_LOSS';
@@ -1627,7 +1624,7 @@ class tokocrypto extends tokocrypto$1 {
1627
1624
  const validOrderTypes = this.safeValue(market['info'], 'orderTypes');
1628
1625
  if (!this.inArray(uppercaseType, validOrderTypes)) {
1629
1626
  if (initialUppercaseType !== uppercaseType) {
1630
- throw new errors.InvalidOrder(this.id + ' stopPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders');
1627
+ throw new errors.InvalidOrder(this.id + ' triggerPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders');
1631
1628
  }
1632
1629
  else {
1633
1630
  throw new errors.InvalidOrder(this.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market');
@@ -1666,7 +1663,7 @@ class tokocrypto extends tokocrypto$1 {
1666
1663
  }
1667
1664
  // additional required fields depending on the order type
1668
1665
  let priceIsRequired = false;
1669
- let stopPriceIsRequired = false;
1666
+ let triggerPriceIsRequired = false;
1670
1667
  let quantityIsRequired = false;
1671
1668
  //
1672
1669
  // spot/margin
@@ -1714,7 +1711,7 @@ class tokocrypto extends tokocrypto$1 {
1714
1711
  quantityIsRequired = true;
1715
1712
  }
1716
1713
  else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) {
1717
- stopPriceIsRequired = true;
1714
+ triggerPriceIsRequired = true;
1718
1715
  quantityIsRequired = true;
1719
1716
  if (market['linear'] || market['inverse']) {
1720
1717
  priceIsRequired = true;
@@ -1722,7 +1719,7 @@ class tokocrypto extends tokocrypto$1 {
1722
1719
  }
1723
1720
  else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
1724
1721
  quantityIsRequired = true;
1725
- stopPriceIsRequired = true;
1722
+ triggerPriceIsRequired = true;
1726
1723
  priceIsRequired = true;
1727
1724
  }
1728
1725
  else if (uppercaseType === 'LIMIT_MAKER') {
@@ -1738,12 +1735,12 @@ class tokocrypto extends tokocrypto$1 {
1738
1735
  }
1739
1736
  request['price'] = this.priceToPrecision(symbol, price);
1740
1737
  }
1741
- if (stopPriceIsRequired) {
1742
- if (stopPrice === undefined) {
1743
- throw new errors.InvalidOrder(this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order');
1738
+ if (triggerPriceIsRequired) {
1739
+ if (triggerPrice === undefined) {
1740
+ throw new errors.InvalidOrder(this.id + ' createOrder() requires a triggerPrice extra param for a ' + type + ' order');
1744
1741
  }
1745
1742
  else {
1746
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1743
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1747
1744
  }
1748
1745
  }
1749
1746
  const response = await this.privatePostOpenV1Orders(this.extend(request, params));
@@ -578,7 +578,7 @@ class tradeogre extends tradeogre$1 {
578
578
  'postOnly': undefined,
579
579
  'side': this.safeString(order, 'type'),
580
580
  'price': this.safeString(order, 'price'),
581
- 'stopPrice': undefined,
581
+ 'triggerPrice': undefined,
582
582
  'amount': this.safeString(order, 'quantity'),
583
583
  'cost': undefined,
584
584
  'average': undefined,
@@ -1560,7 +1560,6 @@ class upbit extends upbit$1 {
1560
1560
  'postOnly': undefined,
1561
1561
  'side': side,
1562
1562
  'price': price,
1563
- 'stopPrice': undefined,
1564
1563
  'triggerPrice': undefined,
1565
1564
  'cost': this.parseNumber(cost),
1566
1565
  'average': this.parseNumber(average),
@@ -1292,7 +1292,7 @@ class wavesexchange extends wavesexchange$1 {
1292
1292
  * @param {float} amount how much of currency you want to trade in units of base currency
1293
1293
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1294
1294
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1295
- * @param {float} [params.stopPrice] The price at which a stop order is triggered at
1295
+ * @param {float} [params.triggerPrice] The price at which a stop order is triggered at
1296
1296
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1297
1297
  */
1298
1298
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
@@ -1304,8 +1304,8 @@ class wavesexchange extends wavesexchange$1 {
1304
1304
  const amountAsset = this.getAssetId(market['baseId']);
1305
1305
  const priceAsset = this.getAssetId(market['quoteId']);
1306
1306
  const isMarketOrder = (type === 'market');
1307
- const stopPrice = this.safeFloat2(params, 'triggerPrice', 'stopPrice');
1308
- const isStopOrder = (stopPrice !== undefined);
1307
+ const triggerPrice = this.safeFloat2(params, 'triggerPrice', 'stopPrice');
1308
+ const isStopOrder = (triggerPrice !== undefined);
1309
1309
  if ((isMarketOrder) && (price === undefined)) {
1310
1310
  throw new errors.InvalidOrder(this.id + ' createOrder() requires a price argument for ' + type + ' orders to determine the max price for buy and the min price for sell');
1311
1311
  }
@@ -1412,7 +1412,7 @@ class wavesexchange extends wavesexchange$1 {
1412
1412
  'c': {
1413
1413
  't': 'sp',
1414
1414
  'v': {
1415
- 'p': this.toRealSymbolPrice(symbol, stopPrice),
1415
+ 'p': this.toRealSymbolPrice(symbol, triggerPrice),
1416
1416
  },
1417
1417
  },
1418
1418
  };
@@ -1810,7 +1810,6 @@ class wavesexchange extends wavesexchange$1 {
1810
1810
  'postOnly': undefined,
1811
1811
  'side': side,
1812
1812
  'price': price,
1813
- 'stopPrice': triggerPrice,
1814
1813
  'triggerPrice': triggerPrice,
1815
1814
  'amount': amount,
1816
1815
  'cost': undefined,
@@ -1294,8 +1294,8 @@ class whitebit extends whitebit$1 {
1294
1294
  const marketType = this.safeString(market, 'type');
1295
1295
  const isLimitOrder = type === 'limit';
1296
1296
  const isMarketOrder = type === 'market';
1297
- const stopPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'activation_price']);
1298
- const isStopOrder = (stopPrice !== undefined);
1297
+ const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'activation_price']);
1298
+ const isStopOrder = (triggerPrice !== undefined);
1299
1299
  const postOnly = this.isPostOnly(isMarketOrder, false, params);
1300
1300
  const [marginMode, query] = this.handleMarginModeAndParams('createOrder', params);
1301
1301
  if (postOnly) {
@@ -1308,7 +1308,7 @@ class whitebit extends whitebit$1 {
1308
1308
  const useCollateralEndpoint = marginMode !== undefined || marketType === 'swap';
1309
1309
  let response = undefined;
1310
1310
  if (isStopOrder) {
1311
- request['activation_price'] = this.priceToPrecision(symbol, stopPrice);
1311
+ request['activation_price'] = this.priceToPrecision(symbol, triggerPrice);
1312
1312
  if (isLimitOrder) {
1313
1313
  // stop limit order
1314
1314
  request['price'] = this.priceToPrecision(symbol, price);
@@ -1385,11 +1385,11 @@ class whitebit extends whitebit$1 {
1385
1385
  request['clientOrderId'] = clientOrderId;
1386
1386
  }
1387
1387
  const isLimitOrder = type === 'limit';
1388
- const stopPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'activation_price']);
1389
- const isStopOrder = (stopPrice !== undefined);
1388
+ const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'activation_price']);
1389
+ const isStopOrder = (triggerPrice !== undefined);
1390
1390
  params = this.omit(params, ['clOrdId', 'clientOrderId', 'triggerPrice', 'stopPrice']);
1391
1391
  if (isStopOrder) {
1392
- request['activation_price'] = this.priceToPrecision(symbol, stopPrice);
1392
+ request['activation_price'] = this.priceToPrecision(symbol, triggerPrice);
1393
1393
  if (isLimitOrder) {
1394
1394
  // stop limit order
1395
1395
  request['amount'] = this.amountToPrecision(symbol, amount);
@@ -1783,7 +1783,7 @@ class whitebit extends whitebit$1 {
1783
1783
  clientOrderId = undefined;
1784
1784
  }
1785
1785
  const price = this.safeString(order, 'price');
1786
- const stopPrice = this.safeNumber(order, 'activation_price');
1786
+ const triggerPrice = this.safeNumber(order, 'activation_price');
1787
1787
  const orderId = this.safeString2(order, 'orderId', 'id');
1788
1788
  const type = this.safeString(order, 'type');
1789
1789
  const orderType = this.parseOrderType(type);
@@ -1819,8 +1819,7 @@ class whitebit extends whitebit$1 {
1819
1819
  'side': side,
1820
1820
  'price': price,
1821
1821
  'type': orderType,
1822
- 'stopPrice': stopPrice,
1823
- 'triggerPrice': stopPrice,
1822
+ 'triggerPrice': triggerPrice,
1824
1823
  'amount': amount,
1825
1824
  'filled': filled,
1826
1825
  'remaining': remaining,