ccxt 4.4.41 → 4.4.43

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 (188) hide show
  1. package/README.md +36 -34
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +6 -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 +21 -16
  8. package/dist/cjs/src/bigone.js +0 -1
  9. package/dist/cjs/src/binance.js +3 -0
  10. package/dist/cjs/src/bingx.js +35 -12
  11. package/dist/cjs/src/bitfinex.js +123 -0
  12. package/dist/cjs/src/bitstamp.js +54 -0
  13. package/dist/cjs/src/blofin.js +16 -7
  14. package/dist/cjs/src/cex.js +1 -1
  15. package/dist/cjs/src/coinbase.js +8 -9
  16. package/dist/cjs/src/coinbaseexchange.js +5 -6
  17. package/dist/cjs/src/coinbaseinternational.js +7 -8
  18. package/dist/cjs/src/coincatch.js +0 -1
  19. package/dist/cjs/src/coincheck.js +0 -1
  20. package/dist/cjs/src/coinex.js +91 -6
  21. package/dist/cjs/src/coinlist.js +3 -4
  22. package/dist/cjs/src/coinmate.js +1 -3
  23. package/dist/cjs/src/coinmetro.js +4 -5
  24. package/dist/cjs/src/coinone.js +0 -1
  25. package/dist/cjs/src/coinsph.js +7 -8
  26. package/dist/cjs/src/cryptocom.js +3 -0
  27. package/dist/cjs/src/currencycom.js +3 -4
  28. package/dist/cjs/src/defx.js +6 -7
  29. package/dist/cjs/src/deribit.js +1 -3
  30. package/dist/cjs/src/digifinex.js +0 -1
  31. package/dist/cjs/src/ellipx.js +0 -2
  32. package/dist/cjs/src/exmo.js +1 -2
  33. package/dist/cjs/src/gate.js +1 -2
  34. package/dist/cjs/src/gemini.js +63 -6
  35. package/dist/cjs/src/hashkey.js +79 -83
  36. package/dist/cjs/src/hitbtc.js +49 -5
  37. package/dist/cjs/src/hollaex.js +4 -6
  38. package/dist/cjs/src/htx.js +1 -3
  39. package/dist/cjs/src/huobijp.js +0 -1
  40. package/dist/cjs/src/hyperliquid.js +1 -1
  41. package/dist/cjs/src/idex.js +8 -8
  42. package/dist/cjs/src/independentreserve.js +0 -1
  43. package/dist/cjs/src/indodax.js +0 -1
  44. package/dist/cjs/src/kraken.js +63 -3
  45. package/dist/cjs/src/krakenfutures.js +75 -3
  46. package/dist/cjs/src/kucoin.js +1 -3
  47. package/dist/cjs/src/kucoinfutures.js +10 -9
  48. package/dist/cjs/src/kuna.js +1 -3
  49. package/dist/cjs/src/latoken.js +1 -3
  50. package/dist/cjs/src/lbank.js +0 -1
  51. package/dist/cjs/src/luno.js +0 -1
  52. package/dist/cjs/src/lykke.js +0 -1
  53. package/dist/cjs/src/mercado.js +0 -1
  54. package/dist/cjs/src/mexc.js +3 -4
  55. package/dist/cjs/src/myokx.js +35 -0
  56. package/dist/cjs/src/ndax.js +1 -1
  57. package/dist/cjs/src/novadax.js +4 -6
  58. package/dist/cjs/src/oceanex.js +0 -1
  59. package/dist/cjs/src/okcoin.js +1 -3
  60. package/dist/cjs/src/okx.js +1 -3
  61. package/dist/cjs/src/onetrading.js +1 -3
  62. package/dist/cjs/src/p2b.js +1 -1
  63. package/dist/cjs/src/paradex.js +5 -7
  64. package/dist/cjs/src/phemex.js +15 -15
  65. package/dist/cjs/src/poloniex.js +1 -3
  66. package/dist/cjs/src/poloniexfutures.js +6 -6
  67. package/dist/cjs/src/pro/myokx.js +24 -0
  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/vertex.js +69 -4
  74. package/dist/cjs/src/wavesexchange.js +4 -5
  75. package/dist/cjs/src/whitebit.js +8 -9
  76. package/dist/cjs/src/woo.js +101 -15
  77. package/dist/cjs/src/woofipro.js +96 -15
  78. package/dist/cjs/src/xt.js +3 -2
  79. package/dist/cjs/src/yobit.js +0 -1
  80. package/dist/cjs/src/zaif.js +0 -1
  81. package/dist/cjs/src/zonda.js +1 -2
  82. package/js/ccxt.d.ts +8 -2
  83. package/js/ccxt.js +6 -2
  84. package/js/src/abstract/binance.d.ts +3 -0
  85. package/js/src/abstract/binancecoinm.d.ts +3 -0
  86. package/js/src/abstract/binanceus.d.ts +3 -0
  87. package/js/src/abstract/binanceusdm.d.ts +3 -0
  88. package/js/src/abstract/bingx.d.ts +4 -0
  89. package/js/src/abstract/bitstamp.d.ts +1 -0
  90. package/js/src/abstract/myokx.d.ts +343 -0
  91. package/js/src/abstract/myokx.js +11 -0
  92. package/js/src/ace.js +1 -1
  93. package/js/src/alpaca.js +0 -1
  94. package/js/src/ascendex.js +0 -1
  95. package/js/src/base/Exchange.d.ts +6 -6
  96. package/js/src/base/Exchange.js +21 -16
  97. package/js/src/bigone.js +0 -1
  98. package/js/src/binance.js +3 -0
  99. package/js/src/bingx.js +35 -12
  100. package/js/src/bitfinex.d.ts +11 -1
  101. package/js/src/bitfinex.js +123 -0
  102. package/js/src/bitstamp.js +54 -0
  103. package/js/src/blofin.d.ts +1 -1
  104. package/js/src/blofin.js +16 -7
  105. package/js/src/cex.js +1 -1
  106. package/js/src/coinbase.js +8 -9
  107. package/js/src/coinbaseexchange.js +5 -6
  108. package/js/src/coinbaseinternational.d.ts +1 -1
  109. package/js/src/coinbaseinternational.js +7 -8
  110. package/js/src/coincatch.js +0 -1
  111. package/js/src/coincheck.js +0 -1
  112. package/js/src/coinex.js +91 -6
  113. package/js/src/coinlist.js +3 -4
  114. package/js/src/coinmate.js +1 -3
  115. package/js/src/coinmetro.js +4 -5
  116. package/js/src/coinone.js +0 -1
  117. package/js/src/coinsph.js +7 -8
  118. package/js/src/cryptocom.js +3 -0
  119. package/js/src/currencycom.js +3 -4
  120. package/js/src/defx.js +6 -7
  121. package/js/src/deribit.js +1 -3
  122. package/js/src/digifinex.js +0 -1
  123. package/js/src/ellipx.js +0 -2
  124. package/js/src/exmo.d.ts +1 -1
  125. package/js/src/exmo.js +1 -2
  126. package/js/src/gate.d.ts +1 -1
  127. package/js/src/gate.js +1 -2
  128. package/js/src/gemini.js +63 -6
  129. package/js/src/hashkey.js +79 -83
  130. package/js/src/hitbtc.d.ts +11 -1
  131. package/js/src/hitbtc.js +49 -5
  132. package/js/src/hollaex.js +4 -6
  133. package/js/src/htx.js +1 -3
  134. package/js/src/huobijp.js +0 -1
  135. package/js/src/hyperliquid.js +1 -1
  136. package/js/src/idex.js +8 -8
  137. package/js/src/independentreserve.js +0 -1
  138. package/js/src/indodax.js +0 -1
  139. package/js/src/kraken.d.ts +2 -2
  140. package/js/src/kraken.js +63 -3
  141. package/js/src/krakenfutures.d.ts +2 -2
  142. package/js/src/krakenfutures.js +75 -3
  143. package/js/src/kucoin.js +1 -3
  144. package/js/src/kucoinfutures.d.ts +5 -4
  145. package/js/src/kucoinfutures.js +10 -9
  146. package/js/src/kuna.js +1 -3
  147. package/js/src/latoken.js +1 -3
  148. package/js/src/lbank.js +0 -1
  149. package/js/src/luno.js +0 -1
  150. package/js/src/lykke.js +0 -1
  151. package/js/src/mercado.js +0 -1
  152. package/js/src/mexc.js +3 -4
  153. package/js/src/myokx.d.ts +4 -0
  154. package/js/src/myokx.js +36 -0
  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 +1 -3
  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.d.ts +1 -0
  165. package/js/src/phemex.js +15 -15
  166. package/js/src/poloniex.js +1 -3
  167. package/js/src/poloniexfutures.js +6 -6
  168. package/js/src/pro/myokx.d.ts +4 -0
  169. package/js/src/pro/myokx.js +25 -0
  170. package/js/src/probit.js +0 -1
  171. package/js/src/timex.js +0 -1
  172. package/js/src/tokocrypto.js +11 -14
  173. package/js/src/tradeogre.js +1 -1
  174. package/js/src/upbit.js +0 -1
  175. package/js/src/vertex.d.ts +11 -1
  176. package/js/src/vertex.js +69 -4
  177. package/js/src/wavesexchange.d.ts +1 -1
  178. package/js/src/wavesexchange.js +4 -5
  179. package/js/src/whitebit.js +8 -9
  180. package/js/src/woo.d.ts +1 -1
  181. package/js/src/woo.js +101 -15
  182. package/js/src/woofipro.js +96 -15
  183. package/js/src/xt.d.ts +2 -1
  184. package/js/src/xt.js +3 -2
  185. package/js/src/yobit.js +0 -1
  186. package/js/src/zaif.js +0 -1
  187. package/js/src/zonda.js +1 -2
  188. package/package.json +15 -8
@@ -948,7 +948,6 @@ export default class coinmate extends Exchange {
948
948
  const marketId = this.safeString(order, 'currencyPair');
949
949
  const symbol = this.safeSymbol(marketId, market, '_');
950
950
  const clientOrderId = this.safeString(order, 'clientOrderId');
951
- const stopPrice = this.safeNumber(order, 'stopPrice');
952
951
  return this.safeOrder({
953
952
  'id': id,
954
953
  'clientOrderId': clientOrderId,
@@ -961,8 +960,7 @@ export default class coinmate extends Exchange {
961
960
  'postOnly': undefined,
962
961
  'side': side,
963
962
  'price': priceString,
964
- 'stopPrice': stopPrice,
965
- 'triggerPrice': stopPrice,
963
+ 'triggerPrice': this.safeNumber(order, 'stopPrice'),
966
964
  'amount': amountString,
967
965
  'cost': undefined,
968
966
  'average': averageString,
@@ -1238,10 +1238,10 @@ export default class coinmetro extends Exchange {
1238
1238
  params = this.omit(params, 'timeInForce');
1239
1239
  request['timeInForce'] = this.encodeOrderTimeInForce(timeInForce);
1240
1240
  }
1241
- const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1242
- if (stopPrice !== undefined) {
1241
+ const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1242
+ if (triggerPrice !== undefined) {
1243
1243
  params = this.omit(params, ['triggerPrice']);
1244
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1244
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1245
1245
  }
1246
1246
  const userData = this.safeValue(params, 'userData', {});
1247
1247
  const comment = this.safeString2(params, 'clientOrderId', 'comment');
@@ -1767,7 +1767,6 @@ export default class coinmetro extends Exchange {
1767
1767
  }
1768
1768
  const trades = this.safeValue(order, 'fills', []);
1769
1769
  const userData = this.safeValue(order, 'userData', {});
1770
- const triggerPrice = this.safeString(order, 'stopPrice');
1771
1770
  const clientOrderId = this.safeString(userData, 'comment');
1772
1771
  const takeProfitPrice = this.safeString(userData, 'takeProfit');
1773
1772
  const stopLossPrice = this.safeString(userData, 'stopLoss');
@@ -1783,7 +1782,7 @@ export default class coinmetro extends Exchange {
1783
1782
  'timeInForce': this.parseOrderTimeInForce(this.safeInteger(order, 'timeInForce')),
1784
1783
  'side': side,
1785
1784
  'price': price,
1786
- 'triggerPrice': triggerPrice,
1785
+ 'triggerPrice': this.safeString(order, 'stopPrice'),
1787
1786
  'takeProfitPrice': takeProfitPrice,
1788
1787
  'stopLossPrice': stopLossPrice,
1789
1788
  'average': undefined,
package/js/src/coinone.js CHANGED
@@ -933,7 +933,6 @@ export default class coinone extends Exchange {
933
933
  'postOnly': undefined,
934
934
  'side': side,
935
935
  'price': this.safeString(order, 'price'),
936
- 'stopPrice': undefined,
937
936
  'triggerPrice': undefined,
938
937
  'cost': undefined,
939
938
  'average': this.safeString(order, 'averageExecutedPrice'),
package/js/src/coinsph.js CHANGED
@@ -1176,11 +1176,11 @@ export default class coinsph extends Exchange {
1176
1176
  }
1177
1177
  }
1178
1178
  if (orderType === 'STOP_LOSS' || orderType === 'STOP_LOSS_LIMIT' || orderType === 'TAKE_PROFIT' || orderType === 'TAKE_PROFIT_LIMIT') {
1179
- const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1180
- if (stopPrice === undefined) {
1179
+ const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1180
+ if (triggerPrice === undefined) {
1181
1181
  throw new InvalidOrder(this.id + ' createOrder () requires a triggerPrice or stopPrice param for stop_loss, take_profit, stop_loss_limit, and take_profit_limit orders');
1182
1182
  }
1183
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1183
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1184
1184
  }
1185
1185
  request['newOrderRespType'] = newOrderRespType;
1186
1186
  params = this.omit(params, 'price', 'stopPrice', 'triggerPrice', 'quantity', 'quoteOrderQty');
@@ -1418,9 +1418,9 @@ export default class coinsph extends Exchange {
1418
1418
  market = this.safeMarket(marketId, market);
1419
1419
  const timestamp = this.safeInteger2(order, 'time', 'transactTime');
1420
1420
  const trades = this.safeValue(order, 'fills', undefined);
1421
- let stopPrice = this.safeString(order, 'stopPrice');
1422
- if (Precise.stringEq(stopPrice, '0')) {
1423
- stopPrice = undefined;
1421
+ let triggerPrice = this.safeString(order, 'stopPrice');
1422
+ if (Precise.stringEq(triggerPrice, '0')) {
1423
+ triggerPrice = undefined;
1424
1424
  }
1425
1425
  return this.safeOrder({
1426
1426
  'id': id,
@@ -1434,8 +1434,7 @@ export default class coinsph extends Exchange {
1434
1434
  'timeInForce': this.parseOrderTimeInForce(this.safeString(order, 'timeInForce')),
1435
1435
  'side': this.parseOrderSide(this.safeString(order, 'side')),
1436
1436
  'price': this.safeString(order, 'price'),
1437
- 'stopPrice': stopPrice,
1438
- 'triggerPrice': stopPrice,
1437
+ 'triggerPrice': triggerPrice,
1439
1438
  'average': undefined,
1440
1439
  'amount': this.safeString(order, 'origQty'),
1441
1440
  'cost': this.safeString(order, 'cummulativeQuoteQty'),
@@ -492,6 +492,9 @@ export default class cryptocom extends Exchange {
492
492
  '40801': RequestTimeout,
493
493
  '42901': RateLimitExceeded,
494
494
  '43005': InvalidOrder,
495
+ '43003': InvalidOrder,
496
+ '43004': InvalidOrder,
497
+ '43012': BadRequest,
495
498
  '50001': ExchangeError,
496
499
  '9010001': OnMaintenance, // {"code":9010001,"message":"SYSTEM_MAINTENANCE","details":"Crypto.com Exchange is currently under maintenance. Please refer to https://status.crypto.com for more details."}
497
500
  },
@@ -1209,7 +1209,6 @@ export default class currencycom extends Exchange {
1209
1209
  'timeInForce': timeInForce,
1210
1210
  'side': side,
1211
1211
  'price': price,
1212
- 'stopPrice': undefined,
1213
1212
  'triggerPrice': undefined,
1214
1213
  'amount': amount,
1215
1214
  'cost': undefined,
@@ -1311,11 +1310,11 @@ export default class currencycom extends Exchange {
1311
1310
  request['price'] = this.priceToPrecision(symbol, price);
1312
1311
  }
1313
1312
  else if (type === 'market') {
1314
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1313
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1315
1314
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
1316
- if (stopPrice !== undefined) {
1315
+ if (triggerPrice !== undefined) {
1317
1316
  request['type'] = 'STOP';
1318
- request['price'] = this.priceToPrecision(symbol, stopPrice);
1317
+ request['price'] = this.priceToPrecision(symbol, triggerPrice);
1319
1318
  }
1320
1319
  }
1321
1320
  }
package/js/src/defx.js CHANGED
@@ -1173,7 +1173,7 @@ export default class defx extends Exchange {
1173
1173
  'type': orderType,
1174
1174
  };
1175
1175
  const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
1176
- const stopPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
1176
+ const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
1177
1177
  const isMarket = orderType === 'MARKET';
1178
1178
  const isLimit = orderType === 'LIMIT';
1179
1179
  const timeInForce = this.safeStringUpper(params, 'timeInForce');
@@ -1193,7 +1193,7 @@ export default class defx extends Exchange {
1193
1193
  if (clientOrderId !== undefined) {
1194
1194
  request['newClientOrderId'] = clientOrderId;
1195
1195
  }
1196
- if (stopPrice !== undefined || takeProfitPrice !== undefined) {
1196
+ if (triggerPrice !== undefined || takeProfitPrice !== undefined) {
1197
1197
  request['workingType'] = 'MARK_PRICE';
1198
1198
  if (takeProfitPrice !== undefined) {
1199
1199
  request['stopPrice'] = this.priceToPrecision(symbol, takeProfitPrice);
@@ -1205,7 +1205,7 @@ export default class defx extends Exchange {
1205
1205
  }
1206
1206
  }
1207
1207
  else {
1208
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1208
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1209
1209
  if (isMarket) {
1210
1210
  request['type'] = 'STOP_MARKET';
1211
1211
  }
@@ -1298,13 +1298,13 @@ export default class defx extends Exchange {
1298
1298
  const average = this.omitZero(this.safeString(order, 'avgPrice'));
1299
1299
  const timeInForce = this.safeStringLower(order, 'timeInForce');
1300
1300
  let takeProfitPrice = undefined;
1301
- let stopPrice = undefined;
1301
+ let triggerPrice = undefined;
1302
1302
  if (orderType !== undefined) {
1303
1303
  if (orderType.indexOf('take_profit') >= 0) {
1304
1304
  takeProfitPrice = this.safeString(order, 'stopPrice');
1305
1305
  }
1306
1306
  else {
1307
- stopPrice = this.safeString(order, 'stopPrice');
1307
+ triggerPrice = this.safeString(order, 'stopPrice');
1308
1308
  }
1309
1309
  }
1310
1310
  const timestamp = this.parse8601(this.safeString(order, 'createdAt'));
@@ -1324,8 +1324,7 @@ export default class defx extends Exchange {
1324
1324
  'reduceOnly': this.safeBool(order, 'reduceOnly'),
1325
1325
  'side': side,
1326
1326
  'price': price,
1327
- 'stopPrice': stopPrice,
1328
- 'triggerPrice': stopPrice,
1327
+ 'triggerPrice': triggerPrice,
1329
1328
  'takeProfitPrice': takeProfitPrice,
1330
1329
  'stopLossPrice': undefined,
1331
1330
  'average': average,
package/js/src/deribit.js CHANGED
@@ -1815,7 +1815,6 @@ export default class deribit extends Exchange {
1815
1815
  // injected in createOrder
1816
1816
  const trades = this.safeValue(order, 'trades');
1817
1817
  const timeInForce = this.parseTimeInForce(this.safeString(order, 'time_in_force'));
1818
- const stopPrice = this.safeValue(order, 'stop_price');
1819
1818
  const postOnly = this.safeValue(order, 'post_only');
1820
1819
  return this.safeOrder({
1821
1820
  'info': order,
@@ -1830,8 +1829,7 @@ export default class deribit extends Exchange {
1830
1829
  'postOnly': postOnly,
1831
1830
  'side': side,
1832
1831
  'price': priceString,
1833
- 'stopPrice': stopPrice,
1834
- 'triggerPrice': stopPrice,
1832
+ 'triggerPrice': this.safeValue(order, 'stop_price'),
1835
1833
  'amount': amount,
1836
1834
  'cost': cost,
1837
1835
  'average': averageString,
@@ -2152,7 +2152,6 @@ export default class digifinex extends Exchange {
2152
2152
  'postOnly': undefined,
2153
2153
  'side': side,
2154
2154
  'price': this.safeNumber(order, 'price'),
2155
- 'stopPrice': undefined,
2156
2155
  'triggerPrice': undefined,
2157
2156
  'amount': this.safeNumber2(order, 'amount', 'size'),
2158
2157
  'filled': this.safeNumber2(order, 'executed_amount', 'filled_qty'),
package/js/src/ellipx.js CHANGED
@@ -1301,7 +1301,6 @@ export default class ellipx extends Exchange {
1301
1301
  'postOnly': postOnly,
1302
1302
  'side': side,
1303
1303
  'price': price,
1304
- 'stopPrice': undefined,
1305
1304
  'triggerPrice': undefined,
1306
1305
  'average': undefined,
1307
1306
  'cost': cost,
@@ -1361,7 +1360,6 @@ export default class ellipx extends Exchange {
1361
1360
  'postOnly': undefined,
1362
1361
  'side': undefined,
1363
1362
  'price': undefined,
1364
- 'stopPrice': undefined,
1365
1363
  'triggerPrice': undefined,
1366
1364
  'average': undefined,
1367
1365
  'cost': undefined,
package/js/src/exmo.d.ts CHANGED
@@ -229,7 +229,7 @@ export default class exmo extends Exchange {
229
229
  * @param {float} amount how much of currency you want to trade in units of base currency
230
230
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
231
231
  * @param {object} [params] extra parameters specific to the exchange API endpoint
232
- * @param {float} [params.stopPrice] the price at which a trigger order is triggered at
232
+ * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
233
233
  * @param {string} [params.timeInForce] *spot only* 'fok', 'ioc' or 'post_only'
234
234
  * @param {boolean} [params.postOnly] *spot only* true for post only orders
235
235
  * @param {float} [params.cost] *spot only* *market orders only* the cost of the order in the quote currency for market orders
package/js/src/exmo.js CHANGED
@@ -1471,7 +1471,7 @@ export default class exmo extends Exchange {
1471
1471
  * @param {float} amount how much of currency you want to trade in units of base currency
1472
1472
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1473
1473
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1474
- * @param {float} [params.stopPrice] the price at which a trigger order is triggered at
1474
+ * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
1475
1475
  * @param {string} [params.timeInForce] *spot only* 'fok', 'ioc' or 'post_only'
1476
1476
  * @param {boolean} [params.postOnly] *spot only* true for post only orders
1477
1477
  * @param {float} [params.cost] *spot only* *market orders only* the cost of the order in the quote currency for market orders
@@ -2008,7 +2008,6 @@ export default class exmo extends Exchange {
2008
2008
  'postOnly': undefined,
2009
2009
  'side': side,
2010
2010
  'price': price,
2011
- 'stopPrice': triggerPrice,
2012
2011
  'triggerPrice': triggerPrice,
2013
2012
  'cost': cost,
2014
2013
  'amount': amount,
package/js/src/gate.d.ts CHANGED
@@ -427,7 +427,7 @@ export default class gate extends Exchange {
427
427
  * @param {float} amount the amount of currency to trade
428
428
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
429
429
  * @param {object} [params] extra parameters specific to the exchange API endpoint
430
- * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
430
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
431
431
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
432
432
  * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
433
433
  * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
package/js/src/gate.js CHANGED
@@ -4085,7 +4085,7 @@ export default class gate extends Exchange {
4085
4085
  * @param {float} amount the amount of currency to trade
4086
4086
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4087
4087
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4088
- * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
4088
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
4089
4089
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
4090
4090
  * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
4091
4091
  * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
@@ -4925,7 +4925,6 @@ export default class gate extends Exchange {
4925
4925
  'reduceOnly': this.safeValue(order, 'is_reduce_only'),
4926
4926
  'side': side,
4927
4927
  'price': price,
4928
- 'stopPrice': triggerPrice,
4929
4928
  'triggerPrice': triggerPrice,
4930
4929
  'average': average,
4931
4930
  'amount': Precise.stringAbs(amount),
package/js/src/gemini.js CHANGED
@@ -299,6 +299,64 @@ export default class gemini extends Exchange {
299
299
  },
300
300
  },
301
301
  },
302
+ 'features': {
303
+ 'default': {
304
+ 'sandbox': true,
305
+ 'createOrder': {
306
+ 'marginMode': false,
307
+ 'triggerPrice': true,
308
+ 'triggerPriceType': undefined,
309
+ 'triggerDirection': false,
310
+ 'stopLossPrice': false,
311
+ 'takeProfitPrice': false,
312
+ 'attachedStopLossTakeProfit': undefined,
313
+ 'timeInForce': {
314
+ 'IOC': true,
315
+ 'FOK': true,
316
+ 'PO': true,
317
+ 'GTD': false,
318
+ },
319
+ 'hedged': false,
320
+ 'trailing': false,
321
+ },
322
+ 'createOrders': undefined,
323
+ 'fetchMyTrades': {
324
+ 'marginMode': false,
325
+ 'limit': 500,
326
+ 'daysBack': undefined,
327
+ 'untilDays': undefined,
328
+ },
329
+ 'fetchOrder': {
330
+ 'marginMode': false,
331
+ 'trigger': false,
332
+ 'trailing': false,
333
+ },
334
+ 'fetchOpenOrders': {
335
+ 'marginMode': false,
336
+ 'limit': undefined,
337
+ 'trigger': false,
338
+ 'trailing': false,
339
+ },
340
+ 'fetchOrders': undefined,
341
+ 'fetchClosedOrders': undefined,
342
+ 'fetchOHLCV': {
343
+ 'limit': undefined,
344
+ },
345
+ },
346
+ 'spot': {
347
+ 'extends': 'default',
348
+ },
349
+ 'swap': {
350
+ 'linear': {
351
+ 'extends': 'default',
352
+ },
353
+ 'inverse': undefined,
354
+ },
355
+ 'future': {
356
+ 'linear': undefined,
357
+ 'inverse': undefined,
358
+ },
359
+ },
302
360
  });
303
361
  }
304
362
  /**
@@ -1347,7 +1405,6 @@ export default class gemini extends Exchange {
1347
1405
  'postOnly': postOnly,
1348
1406
  'side': side,
1349
1407
  'price': price,
1350
- 'stopPrice': undefined,
1351
1408
  'triggerPrice': undefined,
1352
1409
  'average': average,
1353
1410
  'cost': undefined,
@@ -1481,13 +1538,13 @@ export default class gemini extends Exchange {
1481
1538
  };
1482
1539
  type = this.safeString(params, 'type', type);
1483
1540
  params = this.omit(params, 'type');
1484
- const rawStopPrice = this.safeString2(params, 'stop_price', 'stopPrice');
1485
- params = this.omit(params, ['stop_price', 'stopPrice', 'type']);
1541
+ const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stop_price', 'stopPrice']);
1542
+ params = this.omit(params, ['triggerPrice', 'stop_price', 'stopPrice', 'type']);
1486
1543
  if (type === 'stopLimit') {
1487
- throw new ArgumentsRequired(this.id + ' createOrder() requires a stopPrice parameter or a stop_price parameter for ' + type + ' orders');
1544
+ throw new ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice parameter or a stop_price parameter for ' + type + ' orders');
1488
1545
  }
1489
- if (rawStopPrice !== undefined) {
1490
- request['stop_price'] = this.priceToPrecision(symbol, rawStopPrice);
1546
+ if (triggerPrice !== undefined) {
1547
+ request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
1491
1548
  request['type'] = 'exchange stop limit';
1492
1549
  }
1493
1550
  else {
package/js/src/hashkey.js CHANGED
@@ -339,6 +339,84 @@ export default class hashkey extends Exchange {
339
339
  },
340
340
  'defaultNetwork': 'ERC20',
341
341
  },
342
+ 'features': {
343
+ 'default': {
344
+ 'sandbox': true,
345
+ 'createOrder': {
346
+ 'marginMode': false,
347
+ 'triggerPrice': false,
348
+ 'triggerPriceType': undefined,
349
+ 'triggerDirection': false,
350
+ 'stopLossPrice': false,
351
+ 'takeProfitPrice': false,
352
+ 'attachedStopLossTakeProfit': undefined,
353
+ 'timeInForce': {
354
+ 'IOC': true,
355
+ 'FOK': true,
356
+ 'PO': true,
357
+ 'GTD': false,
358
+ },
359
+ 'hedged': false,
360
+ 'trailing': false,
361
+ // exchange-supported features
362
+ // 'marketBuyRequiresPrice': false,
363
+ // 'marketBuyByCost': false,
364
+ // 'selfTradePrevention': true,
365
+ // 'twap': false,
366
+ // 'iceberg': false,
367
+ // 'oco': false,
368
+ },
369
+ 'createOrders': {
370
+ 'max': 20,
371
+ },
372
+ 'fetchMyTrades': {
373
+ 'marginMode': false,
374
+ 'limit': 1000,
375
+ 'daysBack': 30,
376
+ 'untilDays': 30,
377
+ },
378
+ 'fetchOrder': {
379
+ 'marginMode': false,
380
+ 'trigger': false,
381
+ 'trailing': false,
382
+ },
383
+ 'fetchOpenOrders': {
384
+ 'marginMode': false,
385
+ 'limit': 1000,
386
+ 'trigger': false,
387
+ 'trailing': false,
388
+ },
389
+ 'fetchOrders': undefined,
390
+ 'fetchClosedOrders': undefined,
391
+ 'fetchOHLCV': {
392
+ 'limit': 1000,
393
+ },
394
+ },
395
+ 'spot': {
396
+ 'extends': 'default',
397
+ },
398
+ 'forDerivatives': {
399
+ 'extends': 'default',
400
+ 'createOrder': {
401
+ 'triggerPrice': true,
402
+ 'selfTradePrevention': true,
403
+ },
404
+ 'fetchOpenOrders': {
405
+ 'trigger': true,
406
+ 'limit': 500,
407
+ },
408
+ },
409
+ 'swap': {
410
+ 'linear': {
411
+ 'extends': 'forDerivatives',
412
+ },
413
+ 'inverse': undefined,
414
+ },
415
+ 'future': {
416
+ 'linear': undefined,
417
+ 'inverse': undefined,
418
+ },
419
+ },
342
420
  'commonCurrencies': {},
343
421
  'exceptions': {
344
422
  'exact': {
@@ -560,12 +638,7 @@ export default class hashkey extends Exchange {
560
638
  * @returns {object[]} an array of objects representing market data
561
639
  */
562
640
  async fetchMarkets(params = {}) {
563
- let symbol = undefined;
564
641
  const request = {};
565
- [symbol, params] = this.handleOptionAndParams(params, 'fetchMarkets', 'symbol');
566
- if (symbol !== undefined) {
567
- request['symbol'] = symbol;
568
- }
569
642
  const response = await this.publicGetApiV1ExchangeInfo(this.extend(request, params));
570
643
  //
571
644
  // {
@@ -1250,11 +1323,6 @@ export default class hashkey extends Exchange {
1250
1323
  if (market !== undefined) {
1251
1324
  request['symbol'] = market['id'];
1252
1325
  }
1253
- let clientOrderId = undefined;
1254
- [clientOrderId, params] = this.handleOptionAndParams(params, methodName, 'clientOrderId');
1255
- if (clientOrderId !== undefined) {
1256
- request['clientOrderId'] = clientOrderId;
1257
- }
1258
1326
  if (accountId !== undefined) {
1259
1327
  request['accountId'] = accountId;
1260
1328
  }
@@ -1614,11 +1682,6 @@ export default class hashkey extends Exchange {
1614
1682
  await this.loadMarkets();
1615
1683
  symbols = this.marketSymbols(symbols);
1616
1684
  const request = {};
1617
- let symbol = undefined;
1618
- [symbol, params] = this.handleOptionAndParams(params, 'fetchLastPrices', 'symbol');
1619
- if (symbol !== undefined) {
1620
- request['symbol'] = symbol;
1621
- }
1622
1685
  const response = await this.publicGetQuoteV1TickerPrice(this.extend(request, params));
1623
1686
  //
1624
1687
  // [
@@ -1677,11 +1740,6 @@ export default class hashkey extends Exchange {
1677
1740
  return this.parseSwapBalance(balance);
1678
1741
  }
1679
1742
  else if (marketType === 'spot') {
1680
- let accountId = undefined;
1681
- [accountId, params] = this.handleOptionAndParams(params, methodName, 'accountId');
1682
- if (accountId !== undefined) {
1683
- request['accountId'] = accountId;
1684
- }
1685
1743
  const response = await this.privateGetApiV1Account(this.extend(request, params));
1686
1744
  //
1687
1745
  // {
@@ -1961,21 +2019,11 @@ export default class hashkey extends Exchange {
1961
2019
  if (tag !== undefined) {
1962
2020
  request['addressExt'] = tag;
1963
2021
  }
1964
- let clientOrderId = undefined;
1965
- [clientOrderId, params] = this.handleOptionAndParams(params, 'withdraw', 'clientOrderId');
1966
- if (clientOrderId !== undefined) {
1967
- request['clientOrderId'] = clientOrderId;
1968
- }
1969
2022
  let networkCode = undefined;
1970
2023
  [networkCode, params] = this.handleNetworkCodeAndParams(params);
1971
2024
  if (networkCode !== undefined) {
1972
2025
  request['chainType'] = this.networkCodeToId(networkCode);
1973
2026
  }
1974
- let platform = undefined;
1975
- [platform, params] = this.handleOptionAndParams(params, 'withdraw', 'platform');
1976
- if (platform !== undefined) {
1977
- request['platform'] = platform;
1978
- }
1979
2027
  const response = await this.privatePostApiV1AccountWithdraw(this.extend(request, params));
1980
2028
  //
1981
2029
  // {
@@ -2119,16 +2167,6 @@ export default class hashkey extends Exchange {
2119
2167
  'fromAccountId': fromAccount,
2120
2168
  'toAccountId': toAccount,
2121
2169
  };
2122
- let clientOrderId = undefined;
2123
- [clientOrderId, params] = this.handleOptionAndParams(params, 'transfer', 'clientOrderId');
2124
- if (clientOrderId !== undefined) {
2125
- request['clientOrderId'] = clientOrderId;
2126
- }
2127
- let remark = undefined;
2128
- [remark, params] = this.handleOptionAndParams(params, 'transfer', 'remark');
2129
- if (remark !== undefined) {
2130
- request['remark'] = remark;
2131
- }
2132
2170
  const response = await this.privatePostApiV1AccountAssetTransfer(this.extend(request, params));
2133
2171
  //
2134
2172
  // {
@@ -3031,11 +3069,6 @@ export default class hashkey extends Exchange {
3031
3069
  if (clientOrderId !== undefined) {
3032
3070
  request['origClientOrderId'] = clientOrderId;
3033
3071
  }
3034
- let accountId = undefined;
3035
- [accountId, params] = this.handleOptionAndParams(params, methodName, 'accountId');
3036
- if (accountId !== undefined) {
3037
- request['accountId'] = accountId;
3038
- }
3039
3072
  response = await this.privateGetApiV1SpotOrder(this.extend(request, params));
3040
3073
  //
3041
3074
  // {
@@ -3182,16 +3215,6 @@ export default class hashkey extends Exchange {
3182
3215
  if (limit !== undefined) {
3183
3216
  request['limit'] = limit;
3184
3217
  }
3185
- let orderId = undefined;
3186
- [orderId, params] = this.handleOptionAndParams(params, methodName, 'orderId');
3187
- if (orderId !== undefined) {
3188
- request['orderId'] = orderId;
3189
- }
3190
- let side = undefined;
3191
- [side, params] = this.handleOptionAndParams(params, methodName, 'side');
3192
- if (side !== undefined) {
3193
- request['side'] = side.toUpperCase();
3194
- }
3195
3218
  response = await this.privateGetApiV1SpotOpenOrders(this.extend(request, params));
3196
3219
  //
3197
3220
  // [
@@ -3262,11 +3285,6 @@ export default class hashkey extends Exchange {
3262
3285
  if (limit !== undefined) {
3263
3286
  request['limit'] = limit;
3264
3287
  }
3265
- let fromOrderId = undefined;
3266
- [fromOrderId, params] = this.handleOptionAndParams(params, methodName, 'fromOrderId');
3267
- if (fromOrderId !== undefined) {
3268
- request['fromOrderId'] = fromOrderId;
3269
- }
3270
3288
  let response = undefined;
3271
3289
  let accountId = undefined;
3272
3290
  [accountId, params] = this.handleOptionAndParams(params, methodName, 'accountId');
@@ -3372,16 +3390,6 @@ export default class hashkey extends Exchange {
3372
3390
  if (market !== undefined) {
3373
3391
  request['symbol'] = market['id'];
3374
3392
  }
3375
- let orderId = undefined;
3376
- [orderId, params] = this.handleOptionAndParams(params, methodName, 'orderId');
3377
- if (orderId !== undefined) {
3378
- request['orderId'] = orderId;
3379
- }
3380
- let side = undefined;
3381
- [side, params] = this.handleOptionAndParams(params, methodName, 'side');
3382
- if (side !== undefined) {
3383
- request['side'] = side.toUpperCase();
3384
- }
3385
3393
  if (accountId !== undefined) {
3386
3394
  request['accountId'] = accountId;
3387
3395
  }
@@ -3429,11 +3437,6 @@ export default class hashkey extends Exchange {
3429
3437
  else {
3430
3438
  request['type'] = 'LIMIT';
3431
3439
  }
3432
- let fromOrderId = undefined;
3433
- [fromOrderId, params] = this.handleOptionAndParams(params, methodName, 'fromOrderId');
3434
- if (fromOrderId !== undefined) {
3435
- request['fromOrderId'] = fromOrderId;
3436
- }
3437
3440
  if (accountId !== undefined) {
3438
3441
  request['subAccountId'] = accountId;
3439
3442
  response = await this.privateGetApiV1FuturesSubAccountHistoryOrders(this.extend(request, params));
@@ -3628,7 +3631,6 @@ export default class hashkey extends Exchange {
3628
3631
  if (feeCurrncyId === '') {
3629
3632
  feeCurrncyId = undefined;
3630
3633
  }
3631
- const triggerPrice = this.omitZero(this.safeString(order, 'stopPrice'));
3632
3634
  return this.safeOrder({
3633
3635
  'id': this.safeString(order, 'orderId'),
3634
3636
  'clientOrderId': this.safeString(order, 'clientOrderId'),
@@ -3646,8 +3648,7 @@ export default class hashkey extends Exchange {
3646
3648
  'amount': this.omitZero(this.safeString(order, 'origQty')),
3647
3649
  'filled': this.safeString(order, 'executedQty'),
3648
3650
  'remaining': undefined,
3649
- 'stopPrice': triggerPrice,
3650
- 'triggerPrice': triggerPrice,
3651
+ 'triggerPrice': this.omitZero(this.safeString(order, 'stopPrice')),
3651
3652
  'takeProfitPrice': undefined,
3652
3653
  'stopLossPrice': undefined,
3653
3654
  'cost': this.omitZero(this.safeString2(order, 'cumulativeQuoteQty', 'cummulativeQuoteQty')),
@@ -3893,11 +3894,6 @@ export default class hashkey extends Exchange {
3893
3894
  const request = {
3894
3895
  'symbol': market['id'],
3895
3896
  };
3896
- let side = undefined;
3897
- [side, params] = this.handleOptionAndParams(params, methodName, 'side');
3898
- if (side !== undefined) {
3899
- request['side'] = side.toUpperCase();
3900
- }
3901
3897
  const response = await this.privateGetApiV1FuturesPositions(this.extend(request, params));
3902
3898
  //
3903
3899
  // [