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
@@ -1061,7 +1061,7 @@ class coinbaseexchange extends coinbaseexchange$1 {
1061
1061
  const side = this.safeString(order, 'side');
1062
1062
  const timeInForce = this.safeString(order, 'time_in_force');
1063
1063
  const postOnly = this.safeValue(order, 'post_only');
1064
- const stopPrice = this.safeNumber(order, 'stop_price');
1064
+ const triggerPrice = this.safeNumber(order, 'stop_price');
1065
1065
  const clientOrderId = this.safeString(order, 'client_oid');
1066
1066
  return this.safeOrder({
1067
1067
  'id': id,
@@ -1077,8 +1077,7 @@ class coinbaseexchange extends coinbaseexchange$1 {
1077
1077
  'postOnly': postOnly,
1078
1078
  'side': side,
1079
1079
  'price': price,
1080
- 'stopPrice': stopPrice,
1081
- 'triggerPrice': stopPrice,
1080
+ 'triggerPrice': triggerPrice,
1082
1081
  'cost': cost,
1083
1082
  'amount': amount,
1084
1083
  'filled': filled,
@@ -1254,9 +1253,9 @@ class coinbaseexchange extends coinbaseexchange$1 {
1254
1253
  if (clientOrderId !== undefined) {
1255
1254
  request['client_oid'] = clientOrderId;
1256
1255
  }
1257
- const stopPrice = this.safeNumberN(params, ['stopPrice', 'stop_price', 'triggerPrice']);
1258
- if (stopPrice !== undefined) {
1259
- request['stop_price'] = this.priceToPrecision(symbol, stopPrice);
1256
+ const triggerPrice = this.safeNumberN(params, ['stopPrice', 'stop_price', 'triggerPrice']);
1257
+ if (triggerPrice !== undefined) {
1258
+ request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
1260
1259
  }
1261
1260
  const timeInForce = this.safeString2(params, 'timeInForce', 'time_in_force');
1262
1261
  if (timeInForce !== undefined) {
@@ -1678,7 +1678,7 @@ class coinbaseinternational extends coinbaseinternational$1 {
1678
1678
  * @param {float} amount how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
1679
1679
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
1680
1680
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1681
- * @param {float} [params.stopPrice] price to trigger stop orders
1681
+ * @param {float} [params.stopPrice] alias for triggerPrice
1682
1682
  * @param {float} [params.triggerPrice] price to trigger stop orders
1683
1683
  * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
1684
1684
  * @param {bool} [params.postOnly] true or false
@@ -1691,7 +1691,7 @@ class coinbaseinternational extends coinbaseinternational$1 {
1691
1691
  await this.loadMarkets();
1692
1692
  const market = this.market(symbol);
1693
1693
  let typeId = type.toUpperCase();
1694
- const stopPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
1694
+ const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
1695
1695
  const clientOrderIdprefix = this.safeString(this.options, 'brokerId', 'nfqkvdjp');
1696
1696
  let clientOrderId = clientOrderIdprefix + '-' + this.uuid();
1697
1697
  clientOrderId = clientOrderId.slice(0, 17);
@@ -1701,14 +1701,14 @@ class coinbaseinternational extends coinbaseinternational$1 {
1701
1701
  'instrument': market['id'],
1702
1702
  'size': this.amountToPrecision(market['symbol'], amount),
1703
1703
  };
1704
- if (stopPrice !== undefined) {
1704
+ if (triggerPrice !== undefined) {
1705
1705
  if (type === 'limit') {
1706
1706
  typeId = 'STOP_LIMIT';
1707
1707
  }
1708
1708
  else {
1709
1709
  typeId = 'STOP';
1710
1710
  }
1711
- request['stop_price'] = stopPrice;
1711
+ request['stop_price'] = triggerPrice;
1712
1712
  }
1713
1713
  request['type'] = typeId;
1714
1714
  if (type === 'limit') {
@@ -1811,7 +1811,6 @@ class coinbaseinternational extends coinbaseinternational$1 {
1811
1811
  'postOnly': undefined,
1812
1812
  'side': this.safeStringLower(order, 'side'),
1813
1813
  'price': this.safeString(order, 'price'),
1814
- 'stopPrice': this.safeString(order, 'stop_price'),
1815
1814
  'triggerPrice': this.safeString(order, 'stop_price'),
1816
1815
  'amount': this.safeString(order, 'size'),
1817
1816
  'filled': this.safeString(order, 'exec_qty'),
@@ -1953,9 +1952,9 @@ class coinbaseinternational extends coinbaseinternational$1 {
1953
1952
  if (price !== undefined) {
1954
1953
  request['price'] = this.priceToPrecision(symbol, price);
1955
1954
  }
1956
- const stopPrice = this.safeNumberN(params, ['stopPrice', 'stop_price', 'triggerPrice']);
1957
- if (stopPrice !== undefined) {
1958
- request['stop_price'] = stopPrice;
1955
+ const triggerPrice = this.safeNumberN(params, ['stopPrice', 'stop_price', 'triggerPrice']);
1956
+ if (triggerPrice !== undefined) {
1957
+ request['stop_price'] = triggerPrice;
1959
1958
  }
1960
1959
  const clientOrderId = this.safeString2(params, 'client_order_id', 'clientOrderId');
1961
1960
  if (clientOrderId === undefined) {
@@ -4149,7 +4149,6 @@ class coincatch extends coincatch$1 {
4149
4149
  'amount': amount,
4150
4150
  'filled': this.safeString2(order, 'fillQuantity', 'filledQty'),
4151
4151
  'remaining': undefined,
4152
- 'stopPrice': undefined,
4153
4152
  'triggerPrice': triggerPrice,
4154
4153
  'takeProfitPrice': takeProfitPrice,
4155
4154
  'stopLossPrice': stopLossPrice,
@@ -267,7 +267,6 @@ class coincheck extends coincheck$1 {
267
267
  'status': status,
268
268
  'symbol': symbol,
269
269
  'price': price,
270
- 'stopPrice': undefined,
271
270
  'triggerPrice': undefined,
272
271
  'cost': undefined,
273
272
  'fee': undefined,
@@ -500,6 +500,92 @@ class coinex extends coinex$1 {
500
500
  // CSC, AE, BASE, AIPG, AKASH, POLKADOTASSETHUB ?, ALEO, STX, ALGO, ALPH, BLAST, AR, ARCH, ARDR, ARK, ARRR, MANTA, NTRN, LUNA, AURORA, AVAIL, ASC20, AVA, AYA, AZERO, BAN, BAND, BB, RUNES, BEAM, BELLSCOIN, BITCI, NEAR, AGORIC, BLOCX, BNC, BOBA, BRISE, KRC20, CANTO, CAPS, CCD, CELO, CFX, CHI, CKB, CLORE, CLV, CORE, CSPR, CTXC, DAG, DCR, DERO, DESO, DEFI, DGB, DNX, DOCK, DOGECHAIN, DYDX, DYMENSION, EGLD, ELA, ELF, ENJIN, EOSIO, ERG, ETN_SC, EVMOS, EWC, SGB, FACT, FB, FET, FIO, FIRO, NEO3, FLOW, FLARE, FLUX, LINEA, FREN, FSN, FB_BRC20, GLMR, GRIN, GRS, HACASH, HBAR, HERB, HIVE, MAPO, HMND, HNS, ZKSYNC, HTR, HUAHUA, MERLIN, ICP, ICX, INJ, IOST, IOTA, IOTX, IRIS, IRON, ONE, JOYSTREAM, KAI, KAR, KAS, KAVA, KCN, KDA, KLAY, KLY, KMD, KSM, KUB, KUJIRA, LAT, LBC, LUNC, LUKSO, MARS, METIS, MINA, MANTLE, MOB, MODE, MONA, MOVR, MTL, NEOX, NEXA, NIBI, NIMIQ, NMC, ONOMY, NRG, WAVES, NULS, OAS, OCTA, OLT, ONT, OORT, ORAI, OSMO, P3D, COMPOSABLE, PIVX, RON, POKT, POLYMESH, PRE_MARKET, PYI, QKC, QTUM, QUBIC, RSK, ROSE, ROUTE, RTM, THORCHAIN, RVN, RADIANT, SAGA, SALVIUM, SATOX, SC, SCP, _NULL, SCRT, SDN, RGBPP, SELF, SMH, SPACE, STARGAZE, STC, STEEM, STRATISEVM, STRD, STARKNET, SXP, SYS, TAIKO, TAO, TARA, TENET, THETA, TT, VENOM, VECHAIN, TOMO, VITE, VLX, VSYS, VTC, WAN, WAXP, WEMIX, XCH, XDC, XEC, XELIS, NEM, XHV, XLM, XNA, NANO, XPLA, XPR, XPRT, XRD, XTZ, XVG, XYM, ZANO, ZEC, ZEN, ZEPH, ZETA
501
501
  },
502
502
  },
503
+ 'features': {
504
+ 'spot': {
505
+ 'sandbox': false,
506
+ 'createOrder': {
507
+ 'marginMode': true,
508
+ 'triggerPrice': true,
509
+ 'triggerPriceType': undefined,
510
+ 'triggerDirection': false,
511
+ 'stopLossPrice': false,
512
+ 'takeProfitPrice': false,
513
+ 'attachedStopLossTakeProfit': undefined,
514
+ 'timeInForce': {
515
+ 'IOC': true,
516
+ 'FOK': true,
517
+ 'PO': true,
518
+ 'GTD': false,
519
+ },
520
+ 'hedged': false,
521
+ 'trailing': false,
522
+ // exchange-supported features
523
+ // 'marketBuyRequiresPrice': true,
524
+ // 'marketBuyByCost': true,
525
+ // 'selfTradePrevention': true,
526
+ // 'iceberg': true,
527
+ },
528
+ 'createOrders': {
529
+ 'max': 5,
530
+ },
531
+ 'fetchMyTrades': {
532
+ 'marginMode': true,
533
+ 'limit': 1000,
534
+ 'daysBack': undefined,
535
+ 'untilDays': 100000,
536
+ },
537
+ 'fetchOrder': {
538
+ 'marginMode': false,
539
+ 'trigger': false,
540
+ 'trailing': false,
541
+ },
542
+ 'fetchOpenOrders': {
543
+ 'marginMode': true,
544
+ 'limit': 1000,
545
+ 'trigger': true,
546
+ 'trailing': false,
547
+ },
548
+ 'fetchOrders': undefined,
549
+ 'fetchClosedOrders': {
550
+ 'marginMode': true,
551
+ 'limit': 1000,
552
+ 'daysBackClosed': undefined,
553
+ 'daysBackCanceled': undefined,
554
+ 'untilDays': undefined,
555
+ 'trigger': true,
556
+ 'trailing': false,
557
+ },
558
+ 'fetchOHLCV': {
559
+ 'limit': 1000,
560
+ },
561
+ },
562
+ 'forDerivatives': {
563
+ 'extends': 'spot',
564
+ 'createOrder': {
565
+ 'marginMode': true,
566
+ 'stopLossPrice': true,
567
+ 'takeProfitPrice': true,
568
+ },
569
+ 'fetchOpenOrders': {
570
+ 'marginMode': false,
571
+ },
572
+ 'fetchClosedOrders': {
573
+ 'marginMode': false,
574
+ },
575
+ },
576
+ 'swap': {
577
+ 'linear': {
578
+ 'extends': 'forDerivatives',
579
+ },
580
+ 'inverse': {
581
+ 'extends': 'forDerivatives',
582
+ },
583
+ },
584
+ 'future': {
585
+ 'linear': undefined,
586
+ 'inverse': undefined,
587
+ },
588
+ },
503
589
  'commonCurrencies': {
504
590
  'ACM': 'Actinium',
505
591
  },
@@ -2004,7 +2090,6 @@ class coinex extends coinex$1 {
2004
2090
  'reduceOnly': undefined,
2005
2091
  'side': side,
2006
2092
  'price': this.safeString(order, 'price'),
2007
- 'stopPrice': this.safeString(order, 'trigger_price'),
2008
2093
  'triggerPrice': this.safeString(order, 'trigger_price'),
2009
2094
  'takeProfitPrice': this.safeNumber(order, 'take_profit_price'),
2010
2095
  'stopLossPrice': this.safeNumber(order, 'stop_loss_price'),
@@ -2045,7 +2130,7 @@ class coinex extends coinex$1 {
2045
2130
  const market = this.market(symbol);
2046
2131
  const swap = market['swap'];
2047
2132
  const clientOrderId = this.safeString2(params, 'client_id', 'clientOrderId');
2048
- const stopPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
2133
+ const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
2049
2134
  const stopLossPrice = this.safeString(params, 'stopLossPrice');
2050
2135
  const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
2051
2136
  const option = this.safeString(params, 'option');
@@ -2104,8 +2189,8 @@ class coinex extends coinex$1 {
2104
2189
  }
2105
2190
  else {
2106
2191
  request['amount'] = this.amountToPrecision(symbol, amount);
2107
- if (stopPrice !== undefined) {
2108
- request['trigger_price'] = this.priceToPrecision(symbol, stopPrice);
2192
+ if (triggerPrice !== undefined) {
2193
+ request['trigger_price'] = this.priceToPrecision(symbol, triggerPrice);
2109
2194
  request['trigger_price_type'] = this.safeString(params, 'stop_type', 'latest_price');
2110
2195
  }
2111
2196
  }
@@ -2143,8 +2228,8 @@ class coinex extends coinex$1 {
2143
2228
  else {
2144
2229
  request['amount'] = this.amountToPrecision(symbol, amount);
2145
2230
  }
2146
- if (stopPrice !== undefined) {
2147
- request['trigger_price'] = this.priceToPrecision(symbol, stopPrice);
2231
+ if (triggerPrice !== undefined) {
2232
+ request['trigger_price'] = this.priceToPrecision(symbol, triggerPrice);
2148
2233
  }
2149
2234
  }
2150
2235
  params = this.omit(params, ['reduceOnly', 'timeInForce', 'postOnly', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice']);
@@ -1528,7 +1528,7 @@ class coinlist extends coinlist$1 {
1528
1528
  }
1529
1529
  }
1530
1530
  else if ((type === 'stop_market') || (type === 'stop_limit') || (type === 'take_market') || (type === 'take_limit')) {
1531
- throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a stopPrice parameter for stop-loss and take-profit orders');
1531
+ throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice parameter for stop-loss and take-profit orders');
1532
1532
  }
1533
1533
  const clientOrderId = this.safeString2(params, 'clientOrderId', 'client_id');
1534
1534
  if (clientOrderId !== undefined) {
@@ -1672,7 +1672,7 @@ class coinlist extends coinlist$1 {
1672
1672
  const type = this.parseOrderType(this.safeString(order, 'type'));
1673
1673
  const side = this.safeString(order, 'side');
1674
1674
  const price = this.safeString(order, 'price');
1675
- const stopPrice = this.safeString(order, 'stop_price');
1675
+ const triggerPrice = this.safeString(order, 'stop_price');
1676
1676
  const average = this.safeString(order, 'average_fill_price'); // from documentation
1677
1677
  const amount = this.safeString(order, 'size');
1678
1678
  const filled = this.safeString(order, 'size_filled');
@@ -1698,8 +1698,7 @@ class coinlist extends coinlist$1 {
1698
1698
  'timeInForce': 'GTC',
1699
1699
  'side': side,
1700
1700
  'price': price,
1701
- 'stopPrice': stopPrice,
1702
- 'triggerPrice': stopPrice,
1701
+ 'triggerPrice': triggerPrice,
1703
1702
  'average': average,
1704
1703
  'amount': amount,
1705
1704
  'cost': undefined,
@@ -945,7 +945,6 @@ class coinmate extends coinmate$1 {
945
945
  const marketId = this.safeString(order, 'currencyPair');
946
946
  const symbol = this.safeSymbol(marketId, market, '_');
947
947
  const clientOrderId = this.safeString(order, 'clientOrderId');
948
- const stopPrice = this.safeNumber(order, 'stopPrice');
949
948
  return this.safeOrder({
950
949
  'id': id,
951
950
  'clientOrderId': clientOrderId,
@@ -958,8 +957,7 @@ class coinmate extends coinmate$1 {
958
957
  'postOnly': undefined,
959
958
  'side': side,
960
959
  'price': priceString,
961
- 'stopPrice': stopPrice,
962
- 'triggerPrice': stopPrice,
960
+ 'triggerPrice': this.safeNumber(order, 'stopPrice'),
963
961
  'amount': amountString,
964
962
  'cost': undefined,
965
963
  'average': averageString,
@@ -1235,10 +1235,10 @@ class coinmetro extends coinmetro$1 {
1235
1235
  params = this.omit(params, 'timeInForce');
1236
1236
  request['timeInForce'] = this.encodeOrderTimeInForce(timeInForce);
1237
1237
  }
1238
- const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1239
- if (stopPrice !== undefined) {
1238
+ const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1239
+ if (triggerPrice !== undefined) {
1240
1240
  params = this.omit(params, ['triggerPrice']);
1241
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1241
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1242
1242
  }
1243
1243
  const userData = this.safeValue(params, 'userData', {});
1244
1244
  const comment = this.safeString2(params, 'clientOrderId', 'comment');
@@ -1764,7 +1764,6 @@ class coinmetro extends coinmetro$1 {
1764
1764
  }
1765
1765
  const trades = this.safeValue(order, 'fills', []);
1766
1766
  const userData = this.safeValue(order, 'userData', {});
1767
- const triggerPrice = this.safeString(order, 'stopPrice');
1768
1767
  const clientOrderId = this.safeString(userData, 'comment');
1769
1768
  const takeProfitPrice = this.safeString(userData, 'takeProfit');
1770
1769
  const stopLossPrice = this.safeString(userData, 'stopLoss');
@@ -1780,7 +1779,7 @@ class coinmetro extends coinmetro$1 {
1780
1779
  'timeInForce': this.parseOrderTimeInForce(this.safeInteger(order, 'timeInForce')),
1781
1780
  'side': side,
1782
1781
  'price': price,
1783
- 'triggerPrice': triggerPrice,
1782
+ 'triggerPrice': this.safeString(order, 'stopPrice'),
1784
1783
  'takeProfitPrice': takeProfitPrice,
1785
1784
  'stopLossPrice': stopLossPrice,
1786
1785
  'average': undefined,
@@ -930,7 +930,6 @@ class coinone extends coinone$1 {
930
930
  'postOnly': undefined,
931
931
  'side': side,
932
932
  'price': this.safeString(order, 'price'),
933
- 'stopPrice': undefined,
934
933
  'triggerPrice': undefined,
935
934
  'cost': undefined,
936
935
  'average': this.safeString(order, 'averageExecutedPrice'),
@@ -1173,11 +1173,11 @@ class coinsph extends coinsph$1 {
1173
1173
  }
1174
1174
  }
1175
1175
  if (orderType === 'STOP_LOSS' || orderType === 'STOP_LOSS_LIMIT' || orderType === 'TAKE_PROFIT' || orderType === 'TAKE_PROFIT_LIMIT') {
1176
- const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1177
- if (stopPrice === undefined) {
1176
+ const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
1177
+ if (triggerPrice === undefined) {
1178
1178
  throw new errors.InvalidOrder(this.id + ' createOrder () requires a triggerPrice or stopPrice param for stop_loss, take_profit, stop_loss_limit, and take_profit_limit orders');
1179
1179
  }
1180
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1180
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1181
1181
  }
1182
1182
  request['newOrderRespType'] = newOrderRespType;
1183
1183
  params = this.omit(params, 'price', 'stopPrice', 'triggerPrice', 'quantity', 'quoteOrderQty');
@@ -1415,9 +1415,9 @@ class coinsph extends coinsph$1 {
1415
1415
  market = this.safeMarket(marketId, market);
1416
1416
  const timestamp = this.safeInteger2(order, 'time', 'transactTime');
1417
1417
  const trades = this.safeValue(order, 'fills', undefined);
1418
- let stopPrice = this.safeString(order, 'stopPrice');
1419
- if (Precise["default"].stringEq(stopPrice, '0')) {
1420
- stopPrice = undefined;
1418
+ let triggerPrice = this.safeString(order, 'stopPrice');
1419
+ if (Precise["default"].stringEq(triggerPrice, '0')) {
1420
+ triggerPrice = undefined;
1421
1421
  }
1422
1422
  return this.safeOrder({
1423
1423
  'id': id,
@@ -1431,8 +1431,7 @@ class coinsph extends coinsph$1 {
1431
1431
  'timeInForce': this.parseOrderTimeInForce(this.safeString(order, 'timeInForce')),
1432
1432
  'side': this.parseOrderSide(this.safeString(order, 'side')),
1433
1433
  'price': this.safeString(order, 'price'),
1434
- 'stopPrice': stopPrice,
1435
- 'triggerPrice': stopPrice,
1434
+ 'triggerPrice': triggerPrice,
1436
1435
  'average': undefined,
1437
1436
  'amount': this.safeString(order, 'origQty'),
1438
1437
  'cost': this.safeString(order, 'cummulativeQuoteQty'),
@@ -489,6 +489,9 @@ class cryptocom extends cryptocom$1 {
489
489
  '40801': errors.RequestTimeout,
490
490
  '42901': errors.RateLimitExceeded,
491
491
  '43005': errors.InvalidOrder,
492
+ '43003': errors.InvalidOrder,
493
+ '43004': errors.InvalidOrder,
494
+ '43012': errors.BadRequest,
492
495
  '50001': errors.ExchangeError,
493
496
  '9010001': errors.OnMaintenance, // {"code":9010001,"message":"SYSTEM_MAINTENANCE","details":"Crypto.com Exchange is currently under maintenance. Please refer to https://status.crypto.com for more details."}
494
497
  },
@@ -1206,7 +1206,6 @@ class currencycom extends currencycom$1 {
1206
1206
  'timeInForce': timeInForce,
1207
1207
  'side': side,
1208
1208
  'price': price,
1209
- 'stopPrice': undefined,
1210
1209
  'triggerPrice': undefined,
1211
1210
  'amount': amount,
1212
1211
  'cost': undefined,
@@ -1308,11 +1307,11 @@ class currencycom extends currencycom$1 {
1308
1307
  request['price'] = this.priceToPrecision(symbol, price);
1309
1308
  }
1310
1309
  else if (type === 'market') {
1311
- const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1310
+ const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
1312
1311
  params = this.omit(params, ['triggerPrice', 'stopPrice']);
1313
- if (stopPrice !== undefined) {
1312
+ if (triggerPrice !== undefined) {
1314
1313
  request['type'] = 'STOP';
1315
- request['price'] = this.priceToPrecision(symbol, stopPrice);
1314
+ request['price'] = this.priceToPrecision(symbol, triggerPrice);
1316
1315
  }
1317
1316
  }
1318
1317
  }
@@ -1170,7 +1170,7 @@ class defx extends defx$1 {
1170
1170
  'type': orderType,
1171
1171
  };
1172
1172
  const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
1173
- const stopPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
1173
+ const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
1174
1174
  const isMarket = orderType === 'MARKET';
1175
1175
  const isLimit = orderType === 'LIMIT';
1176
1176
  const timeInForce = this.safeStringUpper(params, 'timeInForce');
@@ -1190,7 +1190,7 @@ class defx extends defx$1 {
1190
1190
  if (clientOrderId !== undefined) {
1191
1191
  request['newClientOrderId'] = clientOrderId;
1192
1192
  }
1193
- if (stopPrice !== undefined || takeProfitPrice !== undefined) {
1193
+ if (triggerPrice !== undefined || takeProfitPrice !== undefined) {
1194
1194
  request['workingType'] = 'MARK_PRICE';
1195
1195
  if (takeProfitPrice !== undefined) {
1196
1196
  request['stopPrice'] = this.priceToPrecision(symbol, takeProfitPrice);
@@ -1202,7 +1202,7 @@ class defx extends defx$1 {
1202
1202
  }
1203
1203
  }
1204
1204
  else {
1205
- request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
1205
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
1206
1206
  if (isMarket) {
1207
1207
  request['type'] = 'STOP_MARKET';
1208
1208
  }
@@ -1295,13 +1295,13 @@ class defx extends defx$1 {
1295
1295
  const average = this.omitZero(this.safeString(order, 'avgPrice'));
1296
1296
  const timeInForce = this.safeStringLower(order, 'timeInForce');
1297
1297
  let takeProfitPrice = undefined;
1298
- let stopPrice = undefined;
1298
+ let triggerPrice = undefined;
1299
1299
  if (orderType !== undefined) {
1300
1300
  if (orderType.indexOf('take_profit') >= 0) {
1301
1301
  takeProfitPrice = this.safeString(order, 'stopPrice');
1302
1302
  }
1303
1303
  else {
1304
- stopPrice = this.safeString(order, 'stopPrice');
1304
+ triggerPrice = this.safeString(order, 'stopPrice');
1305
1305
  }
1306
1306
  }
1307
1307
  const timestamp = this.parse8601(this.safeString(order, 'createdAt'));
@@ -1321,8 +1321,7 @@ class defx extends defx$1 {
1321
1321
  'reduceOnly': this.safeBool(order, 'reduceOnly'),
1322
1322
  'side': side,
1323
1323
  'price': price,
1324
- 'stopPrice': stopPrice,
1325
- 'triggerPrice': stopPrice,
1324
+ 'triggerPrice': triggerPrice,
1326
1325
  'takeProfitPrice': takeProfitPrice,
1327
1326
  'stopLossPrice': undefined,
1328
1327
  'average': average,
@@ -1812,7 +1812,6 @@ class deribit extends deribit$1 {
1812
1812
  // injected in createOrder
1813
1813
  const trades = this.safeValue(order, 'trades');
1814
1814
  const timeInForce = this.parseTimeInForce(this.safeString(order, 'time_in_force'));
1815
- const stopPrice = this.safeValue(order, 'stop_price');
1816
1815
  const postOnly = this.safeValue(order, 'post_only');
1817
1816
  return this.safeOrder({
1818
1817
  'info': order,
@@ -1827,8 +1826,7 @@ class deribit extends deribit$1 {
1827
1826
  'postOnly': postOnly,
1828
1827
  'side': side,
1829
1828
  'price': priceString,
1830
- 'stopPrice': stopPrice,
1831
- 'triggerPrice': stopPrice,
1829
+ 'triggerPrice': this.safeValue(order, 'stop_price'),
1832
1830
  'amount': amount,
1833
1831
  'cost': cost,
1834
1832
  'average': averageString,
@@ -2149,7 +2149,6 @@ class digifinex extends digifinex$1 {
2149
2149
  'postOnly': undefined,
2150
2150
  'side': side,
2151
2151
  'price': this.safeNumber(order, 'price'),
2152
- 'stopPrice': undefined,
2153
2152
  'triggerPrice': undefined,
2154
2153
  'amount': this.safeNumber2(order, 'amount', 'size'),
2155
2154
  'filled': this.safeNumber2(order, 'executed_amount', 'filled_qty'),
@@ -1296,7 +1296,6 @@ class ellipx extends ellipx$1 {
1296
1296
  'postOnly': postOnly,
1297
1297
  'side': side,
1298
1298
  'price': price,
1299
- 'stopPrice': undefined,
1300
1299
  'triggerPrice': undefined,
1301
1300
  'average': undefined,
1302
1301
  'cost': cost,
@@ -1356,7 +1355,6 @@ class ellipx extends ellipx$1 {
1356
1355
  'postOnly': undefined,
1357
1356
  'side': undefined,
1358
1357
  'price': undefined,
1359
- 'stopPrice': undefined,
1360
1358
  'triggerPrice': undefined,
1361
1359
  'average': undefined,
1362
1360
  'cost': undefined,
@@ -1468,7 +1468,7 @@ class exmo extends exmo$1 {
1468
1468
  * @param {float} amount how much of currency you want to trade in units of base currency
1469
1469
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1470
1470
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1471
- * @param {float} [params.stopPrice] the price at which a trigger order is triggered at
1471
+ * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
1472
1472
  * @param {string} [params.timeInForce] *spot only* 'fok', 'ioc' or 'post_only'
1473
1473
  * @param {boolean} [params.postOnly] *spot only* true for post only orders
1474
1474
  * @param {float} [params.cost] *spot only* *market orders only* the cost of the order in the quote currency for market orders
@@ -2005,7 +2005,6 @@ class exmo extends exmo$1 {
2005
2005
  'postOnly': undefined,
2006
2006
  'side': side,
2007
2007
  'price': price,
2008
- 'stopPrice': triggerPrice,
2009
2008
  'triggerPrice': triggerPrice,
2010
2009
  'cost': cost,
2011
2010
  'amount': amount,
@@ -4082,7 +4082,7 @@ class gate extends gate$1 {
4082
4082
  * @param {float} amount the amount of currency to trade
4083
4083
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4084
4084
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4085
- * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
4085
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
4086
4086
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
4087
4087
  * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
4088
4088
  * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
@@ -4922,7 +4922,6 @@ class gate extends gate$1 {
4922
4922
  'reduceOnly': this.safeValue(order, 'is_reduce_only'),
4923
4923
  'side': side,
4924
4924
  'price': price,
4925
- 'stopPrice': triggerPrice,
4926
4925
  'triggerPrice': triggerPrice,
4927
4926
  'average': average,
4928
4927
  'amount': Precise["default"].stringAbs(amount),
@@ -296,6 +296,64 @@ class gemini extends gemini$1 {
296
296
  },
297
297
  },
298
298
  },
299
+ 'features': {
300
+ 'default': {
301
+ 'sandbox': true,
302
+ 'createOrder': {
303
+ 'marginMode': false,
304
+ 'triggerPrice': true,
305
+ 'triggerPriceType': undefined,
306
+ 'triggerDirection': false,
307
+ 'stopLossPrice': false,
308
+ 'takeProfitPrice': false,
309
+ 'attachedStopLossTakeProfit': undefined,
310
+ 'timeInForce': {
311
+ 'IOC': true,
312
+ 'FOK': true,
313
+ 'PO': true,
314
+ 'GTD': false,
315
+ },
316
+ 'hedged': false,
317
+ 'trailing': false,
318
+ },
319
+ 'createOrders': undefined,
320
+ 'fetchMyTrades': {
321
+ 'marginMode': false,
322
+ 'limit': 500,
323
+ 'daysBack': undefined,
324
+ 'untilDays': undefined,
325
+ },
326
+ 'fetchOrder': {
327
+ 'marginMode': false,
328
+ 'trigger': false,
329
+ 'trailing': false,
330
+ },
331
+ 'fetchOpenOrders': {
332
+ 'marginMode': false,
333
+ 'limit': undefined,
334
+ 'trigger': false,
335
+ 'trailing': false,
336
+ },
337
+ 'fetchOrders': undefined,
338
+ 'fetchClosedOrders': undefined,
339
+ 'fetchOHLCV': {
340
+ 'limit': undefined,
341
+ },
342
+ },
343
+ 'spot': {
344
+ 'extends': 'default',
345
+ },
346
+ 'swap': {
347
+ 'linear': {
348
+ 'extends': 'default',
349
+ },
350
+ 'inverse': undefined,
351
+ },
352
+ 'future': {
353
+ 'linear': undefined,
354
+ 'inverse': undefined,
355
+ },
356
+ },
299
357
  });
300
358
  }
301
359
  /**
@@ -1344,7 +1402,6 @@ class gemini extends gemini$1 {
1344
1402
  'postOnly': postOnly,
1345
1403
  'side': side,
1346
1404
  'price': price,
1347
- 'stopPrice': undefined,
1348
1405
  'triggerPrice': undefined,
1349
1406
  'average': average,
1350
1407
  'cost': undefined,
@@ -1478,13 +1535,13 @@ class gemini extends gemini$1 {
1478
1535
  };
1479
1536
  type = this.safeString(params, 'type', type);
1480
1537
  params = this.omit(params, 'type');
1481
- const rawStopPrice = this.safeString2(params, 'stop_price', 'stopPrice');
1482
- params = this.omit(params, ['stop_price', 'stopPrice', 'type']);
1538
+ const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stop_price', 'stopPrice']);
1539
+ params = this.omit(params, ['triggerPrice', 'stop_price', 'stopPrice', 'type']);
1483
1540
  if (type === 'stopLimit') {
1484
- throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a stopPrice parameter or a stop_price parameter for ' + type + ' orders');
1541
+ throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice parameter or a stop_price parameter for ' + type + ' orders');
1485
1542
  }
1486
- if (rawStopPrice !== undefined) {
1487
- request['stop_price'] = this.priceToPrecision(symbol, rawStopPrice);
1543
+ if (triggerPrice !== undefined) {
1544
+ request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
1488
1545
  request['type'] = 'exchange stop limit';
1489
1546
  }
1490
1547
  else {