ccxt 4.4.40__py2.py3-none-any.whl → 4.4.42__py2.py3-none-any.whl

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 (173) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +3 -0
  3. ccxt/abstract/binancecoinm.py +3 -0
  4. ccxt/abstract/binanceus.py +3 -0
  5. ccxt/abstract/binanceusdm.py +3 -0
  6. ccxt/abstract/bitmart.py +2 -0
  7. ccxt/abstract/okx.py +5 -0
  8. ccxt/ace.py +1 -1
  9. ccxt/alpaca.py +0 -1
  10. ccxt/ascendex.py +0 -1
  11. ccxt/async_support/__init__.py +1 -1
  12. ccxt/async_support/ace.py +1 -1
  13. ccxt/async_support/alpaca.py +0 -1
  14. ccxt/async_support/ascendex.py +0 -1
  15. ccxt/async_support/base/exchange.py +24 -17
  16. ccxt/async_support/bigone.py +0 -1
  17. ccxt/async_support/binance.py +27 -24
  18. ccxt/async_support/bingx.py +5 -1
  19. ccxt/async_support/bitfinex.py +123 -1
  20. ccxt/async_support/bitget.py +1 -0
  21. ccxt/async_support/bitmart.py +243 -2
  22. ccxt/async_support/blofin.py +16 -7
  23. ccxt/async_support/bybit.py +8 -8
  24. ccxt/async_support/cex.py +1 -1
  25. ccxt/async_support/coinbase.py +8 -9
  26. ccxt/async_support/coinbaseexchange.py +5 -6
  27. ccxt/async_support/coinbaseinternational.py +7 -8
  28. ccxt/async_support/coincatch.py +0 -1
  29. ccxt/async_support/coincheck.py +0 -1
  30. ccxt/async_support/coinex.py +91 -6
  31. ccxt/async_support/coinlist.py +3 -4
  32. ccxt/async_support/coinmate.py +1 -3
  33. ccxt/async_support/coinmetro.py +4 -5
  34. ccxt/async_support/coinone.py +0 -1
  35. ccxt/async_support/coinsph.py +7 -8
  36. ccxt/async_support/cryptocom.py +3 -0
  37. ccxt/async_support/currencycom.py +3 -4
  38. ccxt/async_support/defx.py +6 -7
  39. ccxt/async_support/deribit.py +1 -3
  40. ccxt/async_support/digifinex.py +0 -1
  41. ccxt/async_support/ellipx.py +0 -2
  42. ccxt/async_support/exmo.py +61 -6
  43. ccxt/async_support/gate.py +2 -3
  44. ccxt/async_support/gemini.py +4 -5
  45. ccxt/async_support/hashkey.py +79 -67
  46. ccxt/async_support/hitbtc.py +47 -5
  47. ccxt/async_support/hollaex.py +4 -6
  48. ccxt/async_support/htx.py +2 -4
  49. ccxt/async_support/huobijp.py +0 -1
  50. ccxt/async_support/hyperliquid.py +60 -1
  51. ccxt/async_support/idex.py +8 -8
  52. ccxt/async_support/independentreserve.py +0 -1
  53. ccxt/async_support/indodax.py +0 -1
  54. ccxt/async_support/kraken.py +186 -28
  55. ccxt/async_support/krakenfutures.py +75 -3
  56. ccxt/async_support/kucoin.py +6 -4
  57. ccxt/async_support/kucoinfutures.py +10 -9
  58. ccxt/async_support/kuna.py +1 -3
  59. ccxt/async_support/latoken.py +1 -3
  60. ccxt/async_support/lbank.py +0 -1
  61. ccxt/async_support/luno.py +0 -1
  62. ccxt/async_support/lykke.py +0 -1
  63. ccxt/async_support/mercado.py +0 -1
  64. ccxt/async_support/mexc.py +6 -7
  65. ccxt/async_support/ndax.py +1 -1
  66. ccxt/async_support/novadax.py +4 -6
  67. ccxt/async_support/oceanex.py +0 -1
  68. ccxt/async_support/okcoin.py +1 -3
  69. ccxt/async_support/okx.py +7 -4
  70. ccxt/async_support/onetrading.py +1 -3
  71. ccxt/async_support/p2b.py +1 -1
  72. ccxt/async_support/paradex.py +5 -7
  73. ccxt/async_support/phemex.py +8 -10
  74. ccxt/async_support/poloniex.py +1 -3
  75. ccxt/async_support/poloniexfutures.py +6 -6
  76. ccxt/async_support/probit.py +0 -1
  77. ccxt/async_support/timex.py +0 -1
  78. ccxt/async_support/tokocrypto.py +11 -14
  79. ccxt/async_support/tradeogre.py +1 -1
  80. ccxt/async_support/upbit.py +0 -1
  81. ccxt/async_support/wavesexchange.py +4 -5
  82. ccxt/async_support/whitebit.py +8 -9
  83. ccxt/async_support/woo.py +98 -12
  84. ccxt/async_support/woofipro.py +96 -15
  85. ccxt/async_support/xt.py +6 -3
  86. ccxt/async_support/yobit.py +0 -1
  87. ccxt/async_support/zaif.py +0 -1
  88. ccxt/async_support/zonda.py +1 -2
  89. ccxt/base/exchange.py +39 -20
  90. ccxt/base/types.py +10 -0
  91. ccxt/bigone.py +0 -1
  92. ccxt/binance.py +27 -24
  93. ccxt/bingx.py +5 -1
  94. ccxt/bitfinex.py +123 -1
  95. ccxt/bitget.py +1 -0
  96. ccxt/bitmart.py +243 -2
  97. ccxt/blofin.py +16 -7
  98. ccxt/bybit.py +8 -8
  99. ccxt/cex.py +1 -1
  100. ccxt/coinbase.py +8 -9
  101. ccxt/coinbaseexchange.py +5 -6
  102. ccxt/coinbaseinternational.py +7 -8
  103. ccxt/coincatch.py +0 -1
  104. ccxt/coincheck.py +0 -1
  105. ccxt/coinex.py +91 -6
  106. ccxt/coinlist.py +3 -4
  107. ccxt/coinmate.py +1 -3
  108. ccxt/coinmetro.py +4 -5
  109. ccxt/coinone.py +0 -1
  110. ccxt/coinsph.py +7 -8
  111. ccxt/cryptocom.py +3 -0
  112. ccxt/currencycom.py +3 -4
  113. ccxt/defx.py +6 -7
  114. ccxt/deribit.py +1 -3
  115. ccxt/digifinex.py +0 -1
  116. ccxt/ellipx.py +0 -2
  117. ccxt/exmo.py +61 -6
  118. ccxt/gate.py +2 -3
  119. ccxt/gemini.py +4 -5
  120. ccxt/hashkey.py +79 -67
  121. ccxt/hitbtc.py +47 -5
  122. ccxt/hollaex.py +4 -6
  123. ccxt/htx.py +2 -4
  124. ccxt/huobijp.py +0 -1
  125. ccxt/hyperliquid.py +60 -1
  126. ccxt/idex.py +8 -8
  127. ccxt/independentreserve.py +0 -1
  128. ccxt/indodax.py +0 -1
  129. ccxt/kraken.py +186 -28
  130. ccxt/krakenfutures.py +75 -3
  131. ccxt/kucoin.py +6 -4
  132. ccxt/kucoinfutures.py +10 -9
  133. ccxt/kuna.py +1 -3
  134. ccxt/latoken.py +1 -3
  135. ccxt/lbank.py +0 -1
  136. ccxt/luno.py +0 -1
  137. ccxt/lykke.py +0 -1
  138. ccxt/mercado.py +0 -1
  139. ccxt/mexc.py +6 -7
  140. ccxt/ndax.py +1 -1
  141. ccxt/novadax.py +4 -6
  142. ccxt/oceanex.py +0 -1
  143. ccxt/okcoin.py +1 -3
  144. ccxt/okx.py +7 -4
  145. ccxt/onetrading.py +1 -3
  146. ccxt/p2b.py +1 -1
  147. ccxt/paradex.py +5 -7
  148. ccxt/phemex.py +8 -10
  149. ccxt/poloniex.py +1 -3
  150. ccxt/poloniexfutures.py +6 -6
  151. ccxt/pro/__init__.py +1 -1
  152. ccxt/probit.py +0 -1
  153. ccxt/timex.py +0 -1
  154. ccxt/tokocrypto.py +11 -14
  155. ccxt/tradeogre.py +1 -1
  156. ccxt/upbit.py +0 -1
  157. ccxt/wavesexchange.py +4 -5
  158. ccxt/whitebit.py +8 -9
  159. ccxt/woo.py +98 -12
  160. ccxt/woofipro.py +96 -15
  161. ccxt/xt.py +6 -3
  162. ccxt/yobit.py +0 -1
  163. ccxt/zaif.py +0 -1
  164. ccxt/zonda.py +1 -2
  165. {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/METADATA +5 -5
  166. {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/RECORD +169 -173
  167. ccxt/bitbay.py +0 -17
  168. ccxt/bitfinex2.py +0 -3624
  169. ccxt/hitbtc3.py +0 -16
  170. ccxt/pro/bitfinex2.py +0 -1086
  171. {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/LICENSE.txt +0 -0
  172. {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/WHEEL +0 -0
  173. {ccxt-4.4.40.dist-info → ccxt-4.4.42.dist-info}/top_level.txt +0 -0
ccxt/kucoinfutures.py CHANGED
@@ -1498,8 +1498,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
1498
1498
  :param float amount: the amount of currency to trade
1499
1499
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1500
1500
  :param dict [params]: extra parameters specific to the exchange API endpoint
1501
- :param dict [params.takeProfit]: *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
1502
- :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
1501
+ :param dict [params.takeProfit]: *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
1502
+ :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
1503
1503
  :param float [params.triggerPrice]: The price a trigger order is triggered at
1504
1504
  :param float [params.stopLossPrice]: price to trigger stop-loss orders
1505
1505
  :param float [params.takeProfitPrice]: price to trigger take-profit orders
@@ -1511,8 +1511,9 @@ class kucoinfutures(kucoin, ImplicitAPI):
1511
1511
  :param float [params.leverage]: Leverage size of the order(mandatory param in request, default is 1)
1512
1512
  :param str [params.clientOid]: client order id, defaults to uuid if not passed
1513
1513
  :param str [params.remark]: remark for the order, length cannot exceed 100 utf8 characters
1514
- :param str [params.stop]: 'up' or 'down', the direction the stopPrice is triggered from, requires stopPrice. down: Triggers when the price reaches or goes below the stopPrice. up: Triggers when the price reaches or goes above the stopPrice.
1515
- :param str [params.stopPriceType]: TP, IP or MP, defaults to MP: Mark Price
1514
+ :param str [params.stop]: 'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice.
1515
+ :param str [params.triggerPriceType]: "last", "mark", "index" - defaults to "mark"
1516
+ :param str [params.stopPriceType]: exchange-specific alternative for triggerPriceType: TP, IP or MP
1516
1517
  :param bool [params.closeOrder]: set to True to close position
1517
1518
  :param bool [params.test]: set to True to use the test order endpoint(does not submit order, use to validate params)
1518
1519
  :param bool [params.forceHold]: A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to False by default.
@@ -1632,11 +1633,13 @@ class kucoinfutures(kucoin, ImplicitAPI):
1632
1633
  if stopLoss is not None:
1633
1634
  slPrice = self.safe_string_2(stopLoss, 'triggerPrice', 'stopPrice')
1634
1635
  request['triggerStopDownPrice'] = self.price_to_precision(symbol, slPrice)
1635
- priceType = self.safe_string(stopLoss, 'triggerPriceType', triggerPriceTypeValue)
1636
+ priceType = self.safe_string(stopLoss, 'triggerPriceType', 'mark')
1637
+ priceType = self.safe_string(triggerPriceTypes, priceType, priceType)
1636
1638
  if takeProfit is not None:
1637
1639
  tpPrice = self.safe_string_2(takeProfit, 'triggerPrice', 'takeProfitPrice')
1638
1640
  request['triggerStopUpPrice'] = self.price_to_precision(symbol, tpPrice)
1639
- priceType = self.safe_string(stopLoss, 'triggerPriceType', triggerPriceTypeValue)
1641
+ priceType = self.safe_string(takeProfit, 'triggerPriceType', 'mark')
1642
+ priceType = self.safe_string(triggerPriceTypes, priceType, priceType)
1640
1643
  request['stopPriceType'] = priceType
1641
1644
  elif stopLossPrice or takeProfitPrice:
1642
1645
  if stopLossPrice:
@@ -2266,7 +2269,6 @@ class kucoinfutures(kucoin, ImplicitAPI):
2266
2269
  }
2267
2270
  clientOrderId = self.safe_string(order, 'clientOid')
2268
2271
  timeInForce = self.safe_string(order, 'timeInForce')
2269
- stopPrice = self.safe_number(order, 'stopPrice')
2270
2272
  postOnly = self.safe_value(order, 'postOnly')
2271
2273
  reduceOnly = self.safe_value(order, 'reduceOnly')
2272
2274
  lastUpdateTimestamp = self.safe_integer(order, 'updatedAt')
@@ -2281,8 +2283,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
2281
2283
  'side': side,
2282
2284
  'amount': amount,
2283
2285
  'price': price,
2284
- 'stopPrice': stopPrice,
2285
- 'triggerPrice': stopPrice,
2286
+ 'triggerPrice': self.safe_number(order, 'stopPrice'),
2286
2287
  'cost': cost,
2287
2288
  'filled': filled,
2288
2289
  'remaining': None,
ccxt/kuna.py CHANGED
@@ -1091,7 +1091,6 @@ class kuna(Exchange, ImplicitAPI):
1091
1091
  #
1092
1092
  marketId = self.safe_string(order, 'pair')
1093
1093
  datetime = self.safe_string(order, 'createdAt')
1094
- triggerPrice = self.safe_string(order, 'stopPrice')
1095
1094
  side = self.safe_string(order, 'side')
1096
1095
  if side == 'Bid':
1097
1096
  side = 'buy'
@@ -1112,8 +1111,7 @@ class kuna(Exchange, ImplicitAPI):
1112
1111
  'postOnly': None,
1113
1112
  'side': side,
1114
1113
  'price': self.safe_string(order, 'price'),
1115
- 'stopPrice': triggerPrice,
1116
- 'triggerPrice': triggerPrice,
1114
+ 'triggerPrice': self.safe_string(order, 'stopPrice'),
1117
1115
  'amount': self.safe_string(order, 'quantity'),
1118
1116
  'filled': self.safe_string(order, 'executedQuantity'),
1119
1117
  'remaining': None,
ccxt/latoken.py CHANGED
@@ -1055,7 +1055,6 @@ class latoken(Exchange, ImplicitAPI):
1055
1055
  status = 'open'
1056
1056
  clientOrderId = self.safe_string(order, 'clientOrderId')
1057
1057
  timeInForce = self.parse_time_in_force(self.safe_string(order, 'condition'))
1058
- triggerPrice = self.safe_string(order, 'stopPrice')
1059
1058
  return self.safe_order({
1060
1059
  'id': id,
1061
1060
  'clientOrderId': clientOrderId,
@@ -1070,8 +1069,7 @@ class latoken(Exchange, ImplicitAPI):
1070
1069
  'postOnly': None,
1071
1070
  'side': side,
1072
1071
  'price': price,
1073
- 'stopPrice': triggerPrice,
1074
- 'triggerPrice': triggerPrice,
1072
+ 'triggerPrice': self.safe_string(order, 'stopPrice'),
1075
1073
  'cost': cost,
1076
1074
  'amount': amount,
1077
1075
  'filled': filled,
ccxt/lbank.py CHANGED
@@ -1609,7 +1609,6 @@ class lbank(Exchange, ImplicitAPI):
1609
1609
  'postOnly': postOnly,
1610
1610
  'side': side,
1611
1611
  'price': price,
1612
- 'stopPrice': None,
1613
1612
  'triggerPrice': None,
1614
1613
  'cost': costString,
1615
1614
  'amount': amountString,
ccxt/luno.py CHANGED
@@ -441,7 +441,6 @@ class luno(Exchange, ImplicitAPI):
441
441
  'postOnly': None,
442
442
  'side': side,
443
443
  'price': price,
444
- 'stopPrice': None,
445
444
  'triggerPrice': None,
446
445
  'amount': amount,
447
446
  'filled': filled,
ccxt/lykke.py CHANGED
@@ -772,7 +772,6 @@ class lykke(Exchange, ImplicitAPI):
772
772
  'postOnly': None,
773
773
  'side': side,
774
774
  'price': price,
775
- 'stopPrice': None,
776
775
  'triggerPrice': None,
777
776
  'amount': amount,
778
777
  'cost': cost,
ccxt/mercado.py CHANGED
@@ -569,7 +569,6 @@ class mercado(Exchange, ImplicitAPI):
569
569
  'postOnly': None,
570
570
  'side': side,
571
571
  'price': price,
572
- 'stopPrice': None,
573
572
  'triggerPrice': None,
574
573
  'cost': None,
575
574
  'average': average,
ccxt/mexc.py CHANGED
@@ -689,7 +689,7 @@ class mexc(Exchange, ImplicitAPI):
689
689
  'broker': 'CCXT',
690
690
  },
691
691
  'features': {
692
- 'def': {
692
+ 'default': {
693
693
  'sandbox': False,
694
694
  'createOrder': {
695
695
  'marginMode': True,
@@ -757,10 +757,10 @@ class mexc(Exchange, ImplicitAPI):
757
757
  },
758
758
  },
759
759
  'spot': {
760
- 'extends': 'def',
760
+ 'extends': 'default',
761
761
  },
762
762
  'forDerivs': {
763
- 'extends': 'def',
763
+ 'extends': 'default',
764
764
  'createOrder': {
765
765
  'triggerPrice': True,
766
766
  'triggerPriceType': {
@@ -2441,11 +2441,11 @@ class mexc(Exchange, ImplicitAPI):
2441
2441
  clientOrderId = self.safe_string_2(params, 'clientOrderId', 'externalOid')
2442
2442
  if clientOrderId is not None:
2443
2443
  request['externalOid'] = clientOrderId
2444
- stopPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
2444
+ triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
2445
2445
  params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice', 'hedged'])
2446
2446
  response = None
2447
- if stopPrice:
2448
- request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
2447
+ if triggerPrice:
2448
+ request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
2449
2449
  request['triggerType'] = self.safe_integer(params, 'triggerType', 1)
2450
2450
  request['executeCycle'] = self.safe_integer(params, 'executeCycle', 1)
2451
2451
  request['trend'] = self.safe_integer(params, 'trend', 1)
@@ -3426,7 +3426,6 @@ class mexc(Exchange, ImplicitAPI):
3426
3426
  'timeInForce': self.parse_order_time_in_force(self.safe_string(order, 'timeInForce')),
3427
3427
  'side': self.parse_order_side(self.safe_string(order, 'side')),
3428
3428
  'price': self.safe_number(order, 'price'),
3429
- 'stopPrice': self.safe_number_2(order, 'stopPrice', 'triggerPrice'),
3430
3429
  'triggerPrice': self.safe_number_2(order, 'stopPrice', 'triggerPrice'),
3431
3430
  'average': self.safe_number(order, 'dealAvgPrice'),
3432
3431
  'amount': self.safe_number_2(order, 'origQty', 'vol'),
ccxt/ndax.py CHANGED
@@ -1327,7 +1327,7 @@ class ndax(Exchange, ImplicitAPI):
1327
1327
  'postOnly': None,
1328
1328
  'side': self.safe_string_lower(order, 'Side'),
1329
1329
  'price': self.safe_string(order, 'Price'),
1330
- 'stopPrice': self.parse_number(self.omit_zero(self.safe_string(order, 'StopPrice'))),
1330
+ 'triggerPrice': self.parse_number(self.omit_zero(self.safe_string(order, 'StopPrice'))),
1331
1331
  'cost': self.safe_string(order, 'GrossValueExecuted'),
1332
1332
  'amount': self.safe_string(order, 'OrigQuantity'),
1333
1333
  'filled': self.safe_string(order, 'QuantityExecuted'),
ccxt/novadax.py CHANGED
@@ -763,8 +763,8 @@ class novadax(Exchange, ImplicitAPI):
763
763
  # "stopPrice": self.price_to_precision(symbol, stopPrice),
764
764
  # "accountId": "...", # subaccount id, optional
765
765
  }
766
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
767
- if stopPrice is None:
766
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
767
+ if triggerPrice is None:
768
768
  if (uppercaseType == 'STOP_LIMIT') or (uppercaseType == 'STOP_MARKET'):
769
769
  raise ArgumentsRequired(self.id + ' createOrder() requires a stopPrice parameter for ' + uppercaseType + ' orders')
770
770
  else:
@@ -774,7 +774,7 @@ class novadax(Exchange, ImplicitAPI):
774
774
  uppercaseType = 'STOP_MARKET'
775
775
  defaultOperator = 'LTE' if (uppercaseSide == 'BUY') else 'GTE'
776
776
  request['operator'] = self.safe_string(params, 'operator', defaultOperator)
777
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
777
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
778
778
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
779
779
  if (uppercaseType == 'LIMIT') or (uppercaseType == 'STOP_LIMIT'):
780
780
  request['price'] = self.price_to_precision(symbol, price)
@@ -1092,7 +1092,6 @@ class novadax(Exchange, ImplicitAPI):
1092
1092
  }
1093
1093
  marketId = self.safe_string(order, 'symbol')
1094
1094
  symbol = self.safe_symbol(marketId, market, '_')
1095
- stopPrice = self.safe_number(order, 'stopPrice')
1096
1095
  return self.safe_order({
1097
1096
  'id': id,
1098
1097
  'clientOrderId': None,
@@ -1106,8 +1105,7 @@ class novadax(Exchange, ImplicitAPI):
1106
1105
  'postOnly': None,
1107
1106
  'side': side,
1108
1107
  'price': price,
1109
- 'stopPrice': stopPrice,
1110
- 'triggerPrice': stopPrice,
1108
+ 'triggerPrice': self.safe_number(order, 'stopPrice'),
1111
1109
  'amount': amount,
1112
1110
  'cost': cost,
1113
1111
  'average': average,
ccxt/oceanex.py CHANGED
@@ -835,7 +835,6 @@ class oceanex(Exchange, ImplicitAPI):
835
835
  'postOnly': None,
836
836
  'side': self.safe_value(order, 'side'),
837
837
  'price': price,
838
- 'stopPrice': None,
839
838
  'triggerPrice': None,
840
839
  'average': average,
841
840
  'amount': amount,
ccxt/okcoin.py CHANGED
@@ -1845,7 +1845,6 @@ class okcoin(Exchange, ImplicitAPI):
1845
1845
  clientOrderId = None # fix empty clientOrderId string
1846
1846
  stopLossPrice = self.safe_number_2(order, 'slTriggerPx', 'slOrdPx')
1847
1847
  takeProfitPrice = self.safe_number_2(order, 'tpTriggerPx', 'tpOrdPx')
1848
- stopPrice = self.safe_number_n(order, ['triggerPx', 'moveTriggerPx'])
1849
1848
  reduceOnlyRaw = self.safe_string(order, 'reduceOnly')
1850
1849
  reduceOnly = False
1851
1850
  if reduceOnly is not None:
@@ -1866,8 +1865,7 @@ class okcoin(Exchange, ImplicitAPI):
1866
1865
  'price': price,
1867
1866
  'stopLossPrice': stopLossPrice,
1868
1867
  'takeProfitPrice': takeProfitPrice,
1869
- 'stopPrice': stopPrice,
1870
- 'triggerPrice': stopPrice,
1868
+ 'triggerPrice': self.safe_number_n(order, ['triggerPx', 'moveTriggerPx']),
1871
1869
  'average': average,
1872
1870
  'cost': cost,
1873
1871
  'amount': amount,
ccxt/okx.py CHANGED
@@ -285,6 +285,7 @@ class okx(Exchange, ImplicitAPI):
285
285
  'tradingBot/public/rsi-back-testing': 1,
286
286
  'asset/exchange-list': 5 / 3,
287
287
  'finance/staking-defi/eth/apy-history': 5 / 3,
288
+ 'finance/staking-defi/sol/apy-history': 5 / 3,
288
289
  'finance/savings/lending-rate-summary': 5 / 3,
289
290
  'finance/savings/lending-rate-history': 5 / 3,
290
291
  'finance/fixed-loan/lending-offers': 10 / 3,
@@ -423,6 +424,8 @@ class okx(Exchange, ImplicitAPI):
423
424
  'finance/staking-defi/eth/balance': 5 / 3,
424
425
  'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
425
426
  'finance/staking-defi/eth/product-info': 3,
427
+ 'finance/staking-defi/sol/balance': 5 / 3,
428
+ 'finance/staking-defi/sol/purchase-redeem-history': 5 / 3,
426
429
  # copytrading
427
430
  'copytrading/current-subpositions': 1,
428
431
  'copytrading/subpositions-history': 1,
@@ -557,6 +560,8 @@ class okx(Exchange, ImplicitAPI):
557
560
  # eth staking
558
561
  'finance/staking-defi/eth/purchase': 5,
559
562
  'finance/staking-defi/eth/redeem': 5,
563
+ 'finance/staking-defi/sol/purchase': 5,
564
+ 'finance/staking-defi/sol/redeem': 5,
560
565
  # copytrading
561
566
  'copytrading/algo-order': 1,
562
567
  'copytrading/close-subposition': 1,
@@ -3662,7 +3667,6 @@ class okx(Exchange, ImplicitAPI):
3662
3667
  clientOrderId = None # fix empty clientOrderId string
3663
3668
  stopLossPrice = self.safe_number_2(order, 'slTriggerPx', 'slOrdPx')
3664
3669
  takeProfitPrice = self.safe_number_2(order, 'tpTriggerPx', 'tpOrdPx')
3665
- stopPrice = self.safe_number_n(order, ['triggerPx', 'moveTriggerPx'])
3666
3670
  reduceOnlyRaw = self.safe_string(order, 'reduceOnly')
3667
3671
  reduceOnly = False
3668
3672
  if reduceOnly is not None:
@@ -3683,8 +3687,7 @@ class okx(Exchange, ImplicitAPI):
3683
3687
  'price': price,
3684
3688
  'stopLossPrice': stopLossPrice,
3685
3689
  'takeProfitPrice': takeProfitPrice,
3686
- 'stopPrice': stopPrice,
3687
- 'triggerPrice': stopPrice,
3690
+ 'triggerPrice': self.safe_number_n(order, ['triggerPx', 'moveTriggerPx']),
3688
3691
  'average': average,
3689
3692
  'cost': cost,
3690
3693
  'amount': amount,
@@ -7033,7 +7036,7 @@ class okx(Exchange, ImplicitAPI):
7033
7036
  # }
7034
7037
  #
7035
7038
  data = self.safe_list(response, 'data', [])
7036
- return self.parse_open_interests(data, None, since, limit)
7039
+ return self.parse_open_interests_history(data, None, since, limit)
7037
7040
 
7038
7041
  def parse_open_interest(self, interest, market: Market = None):
7039
7042
  #
ccxt/onetrading.py CHANGED
@@ -1083,7 +1083,6 @@ class onetrading(Exchange, ImplicitAPI):
1083
1083
  side = self.safe_string_lower(rawOrder, 'side')
1084
1084
  type = self.safe_string_lower(rawOrder, 'type')
1085
1085
  timeInForce = self.parse_time_in_force(self.safe_string(rawOrder, 'time_in_force'))
1086
- stopPrice = self.safe_number(rawOrder, 'trigger_price')
1087
1086
  postOnly = self.safe_value(rawOrder, 'is_post_only')
1088
1087
  rawTrades = self.safe_value(order, 'trades', [])
1089
1088
  return self.safe_order({
@@ -1099,8 +1098,7 @@ class onetrading(Exchange, ImplicitAPI):
1099
1098
  'postOnly': postOnly,
1100
1099
  'side': side,
1101
1100
  'price': price,
1102
- 'stopPrice': stopPrice,
1103
- 'triggerPrice': stopPrice,
1101
+ 'triggerPrice': self.safe_number(rawOrder, 'trigger_price'),
1104
1102
  'amount': amount,
1105
1103
  'cost': None,
1106
1104
  'average': None,
ccxt/p2b.py CHANGED
@@ -1174,7 +1174,7 @@ class p2b(Exchange, ImplicitAPI):
1174
1174
  'postOnly': None,
1175
1175
  'side': self.safe_string(order, 'side'),
1176
1176
  'price': self.safe_string(order, 'price'),
1177
- 'stopPrice': None,
1177
+ 'triggerPrice': None,
1178
1178
  'amount': self.safe_string(order, 'amount'),
1179
1179
  'cost': None,
1180
1180
  'average': None,
ccxt/paradex.py CHANGED
@@ -1093,7 +1093,6 @@ class paradex(Exchange, ImplicitAPI):
1093
1093
  side = self.safe_string_lower(order, 'side')
1094
1094
  average = self.omit_zero(self.safe_string(order, 'avg_fill_price'))
1095
1095
  remaining = self.omit_zero(self.safe_string(order, 'remaining_size'))
1096
- stopPrice = self.safe_string(order, 'trigger_price')
1097
1096
  lastUpdateTimestamp = self.safe_integer(order, 'last_updated_at')
1098
1097
  return self.safe_order({
1099
1098
  'id': orderId,
@@ -1110,8 +1109,7 @@ class paradex(Exchange, ImplicitAPI):
1110
1109
  'reduceOnly': None,
1111
1110
  'side': side,
1112
1111
  'price': price,
1113
- 'stopPrice': stopPrice,
1114
- 'triggerPrice': stopPrice,
1112
+ 'triggerPrice': self.safe_string(order, 'trigger_price'),
1115
1113
  'takeProfitPrice': None,
1116
1114
  'stopLossPrice': None,
1117
1115
  'average': average,
@@ -1174,7 +1172,7 @@ class paradex(Exchange, ImplicitAPI):
1174
1172
  :param float amount: how much of currency you want to trade in units of base currency
1175
1173
  :param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1176
1174
  :param dict [params]: extra parameters specific to the exchange API endpoint
1177
- :param float [params.stopPrice]: The price a trigger order is triggered at
1175
+ :param float [params.stopPrice]: alias for triggerPrice
1178
1176
  :param float [params.triggerPrice]: The price a trigger order is triggered at
1179
1177
  :param str [params.timeInForce]: "GTC", "IOC", or "POST_ONLY"
1180
1178
  :param bool [params.postOnly]: True or False
@@ -1194,7 +1192,7 @@ class paradex(Exchange, ImplicitAPI):
1194
1192
  'type': orderType, # LIMIT/MARKET/STOP_LIMIT/STOP_MARKET
1195
1193
  'size': self.amount_to_precision(symbol, amount),
1196
1194
  }
1197
- stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1195
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1198
1196
  isMarket = orderType == 'MARKET'
1199
1197
  timeInForce = self.safe_string_upper(params, 'timeInForce')
1200
1198
  postOnly = self.is_post_only(isMarket, None, params)
@@ -1212,12 +1210,12 @@ class paradex(Exchange, ImplicitAPI):
1212
1210
  clientOrderId = self.safe_string_n(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
1213
1211
  if clientOrderId is not None:
1214
1212
  request['client_id'] = clientOrderId
1215
- if stopPrice is not None:
1213
+ if triggerPrice is not None:
1216
1214
  if isMarket:
1217
1215
  request['type'] = 'STOP_MARKET'
1218
1216
  else:
1219
1217
  request['type'] = 'STOP_LIMIT'
1220
- request['trigger_price'] = self.price_to_precision(symbol, stopPrice)
1218
+ request['trigger_price'] = self.price_to_precision(symbol, triggerPrice)
1221
1219
  params = self.omit(params, ['reduceOnly', 'reduce_only', 'clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice'])
1222
1220
  account = self.retrieve_account()
1223
1221
  now = self.nonce()
ccxt/phemex.py CHANGED
@@ -2198,7 +2198,7 @@ class phemex(Exchange, ImplicitAPI):
2198
2198
  'currency': self.safe_currency_code(self.safe_string(order, 'feeCurrency')),
2199
2199
  }
2200
2200
  timeInForce = self.parse_time_in_force(self.safe_string(order, 'timeInForce'))
2201
- stopPrice = self.parse_number(self.omit_zero(self.from_ep(self.safe_string(order, 'stopPxEp'))))
2201
+ triggerPrice = self.parse_number(self.omit_zero(self.from_ep(self.safe_string(order, 'stopPxEp'))))
2202
2202
  postOnly = (timeInForce == 'PO')
2203
2203
  return self.safe_order({
2204
2204
  'info': order,
@@ -2213,8 +2213,7 @@ class phemex(Exchange, ImplicitAPI):
2213
2213
  'postOnly': postOnly,
2214
2214
  'side': side,
2215
2215
  'price': price,
2216
- 'stopPrice': stopPrice,
2217
- 'triggerPrice': stopPrice,
2216
+ 'triggerPrice': triggerPrice,
2218
2217
  'amount': amount,
2219
2218
  'cost': cost,
2220
2219
  'average': average,
@@ -2358,7 +2357,7 @@ class phemex(Exchange, ImplicitAPI):
2358
2357
  if lastTradeTimestamp == 0:
2359
2358
  lastTradeTimestamp = None
2360
2359
  timeInForce = self.parse_time_in_force(self.safe_string(order, 'timeInForce'))
2361
- stopPrice = self.omit_zero(self.safe_string_2(order, 'stopPx', 'stopPxRp'))
2360
+ triggerPrice = self.omit_zero(self.safe_string_2(order, 'stopPx', 'stopPxRp'))
2362
2361
  postOnly = (timeInForce == 'PO')
2363
2362
  reduceOnly = self.safe_value(order, 'reduceOnly')
2364
2363
  execInst = self.safe_string(order, 'execInst')
@@ -2393,8 +2392,7 @@ class phemex(Exchange, ImplicitAPI):
2393
2392
  'reduceOnly': reduceOnly,
2394
2393
  'side': side,
2395
2394
  'price': price,
2396
- 'stopPrice': stopPrice,
2397
- 'triggerPrice': stopPrice,
2395
+ 'triggerPrice': triggerPrice,
2398
2396
  'takeProfitPrice': takeProfit,
2399
2397
  'stopLossPrice': stopLoss,
2400
2398
  'amount': amount,
@@ -2732,12 +2730,12 @@ class phemex(Exchange, ImplicitAPI):
2732
2730
  request['orderQtyRq'] = self.amount_to_precision(market['symbol'], amount)
2733
2731
  else:
2734
2732
  request['baseQtyEV'] = self.to_ev(amount, market)
2735
- stopPrice = self.safe_string_n(params, ['triggerPrice', 'stopPx', 'stopPrice'])
2736
- if stopPrice is not None:
2733
+ triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stopPx', 'stopPrice'])
2734
+ if triggerPrice is not None:
2737
2735
  if isUSDTSettled:
2738
- request['stopPxRp'] = self.price_to_precision(symbol, stopPrice)
2736
+ request['stopPxRp'] = self.price_to_precision(symbol, triggerPrice)
2739
2737
  else:
2740
- request['stopPxEp'] = self.to_ep(stopPrice, market)
2738
+ request['stopPxEp'] = self.to_ep(triggerPrice, market)
2741
2739
  params = self.omit(params, ['triggerPrice', 'stopPx', 'stopPrice'])
2742
2740
  response = None
2743
2741
  if isUSDTSettled:
ccxt/poloniex.py CHANGED
@@ -1143,7 +1143,6 @@ class poloniex(Exchange, ImplicitAPI):
1143
1143
  'currency': feeCurrencyCode,
1144
1144
  }
1145
1145
  clientOrderId = self.safe_string(order, 'clientOrderId')
1146
- triggerPrice = self.safe_string_2(order, 'triggerPrice', 'stopPrice')
1147
1146
  return self.safe_order({
1148
1147
  'info': order,
1149
1148
  'id': id,
@@ -1158,8 +1157,7 @@ class poloniex(Exchange, ImplicitAPI):
1158
1157
  'postOnly': None,
1159
1158
  'side': side,
1160
1159
  'price': price,
1161
- 'stopPrice': triggerPrice,
1162
- 'triggerPrice': triggerPrice,
1160
+ 'triggerPrice': self.safe_string_2(order, 'triggerPrice', 'stopPrice'),
1163
1161
  'cost': None,
1164
1162
  'average': self.safe_string(order, 'avgPrice'),
1165
1163
  'amount': amount,
ccxt/poloniexfutures.py CHANGED
@@ -857,12 +857,12 @@ class poloniexfutures(Exchange, ImplicitAPI):
857
857
  'size': preciseAmount,
858
858
  'leverage': 1,
859
859
  }
860
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
861
- if stopPrice:
860
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
861
+ if triggerPrice:
862
862
  request['stop'] = 'up' if (side == 'buy') else 'down'
863
863
  stopPriceType = self.safe_string(params, 'stopPriceType', 'TP')
864
864
  request['stopPriceType'] = stopPriceType
865
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
865
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
866
866
  timeInForce = self.safe_string_upper(params, 'timeInForce')
867
867
  if type == 'limit':
868
868
  if price is None:
@@ -911,7 +911,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
911
911
  'trades': None,
912
912
  'timeInForce': None,
913
913
  'postOnly': None,
914
- 'stopPrice': None,
914
+ 'triggerPrice': None,
915
915
  'info': response,
916
916
  }, market)
917
917
 
@@ -1230,7 +1230,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1230
1230
  'trades': None,
1231
1231
  'timeInForce': None,
1232
1232
  'postOnly': None,
1233
- 'stopPrice': None,
1233
+ 'triggerPrice': None,
1234
1234
  'info': response,
1235
1235
  }))
1236
1236
  return result
@@ -1549,7 +1549,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1549
1549
  'side': self.safe_string(order, 'side'),
1550
1550
  'amount': self.safe_string(order, 'size'),
1551
1551
  'price': self.safe_string(order, 'price'),
1552
- 'stopPrice': self.safe_string(order, 'stopPrice'),
1552
+ 'triggerPrice': self.safe_string(order, 'stopPrice'),
1553
1553
  'cost': self.safe_string(order, 'dealValue'),
1554
1554
  'filled': filled,
1555
1555
  'remaining': None,
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.40'
7
+ __version__ = '4.4.42'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/probit.py CHANGED
@@ -1140,7 +1140,6 @@ class probit(Exchange, ImplicitAPI):
1140
1140
  'side': side,
1141
1141
  'status': status,
1142
1142
  'price': price,
1143
- 'stopPrice': None,
1144
1143
  'triggerPrice': None,
1145
1144
  'amount': amount,
1146
1145
  'filled': filled,
ccxt/timex.py CHANGED
@@ -1535,7 +1535,6 @@ class timex(Exchange, ImplicitAPI):
1535
1535
  'postOnly': None,
1536
1536
  'side': side,
1537
1537
  'price': price,
1538
- 'stopPrice': None,
1539
1538
  'triggerPrice': None,
1540
1539
  'amount': amount,
1541
1540
  'cost': None,
ccxt/tokocrypto.py CHANGED
@@ -1536,8 +1536,6 @@ class tokocrypto(Exchange, ImplicitAPI):
1536
1536
  # GTX means "Good Till Crossing" and is an equivalent way of saying Post Only
1537
1537
  timeInForce = 'PO'
1538
1538
  postOnly = (type == 'limit_maker') or (timeInForce == 'PO')
1539
- stopPriceString = self.safe_string(order, 'stopPrice')
1540
- stopPrice = self.parse_number(self.omit_zero(stopPriceString))
1541
1539
  return self.safe_order({
1542
1540
  'info': order,
1543
1541
  'id': id,
@@ -1552,8 +1550,7 @@ class tokocrypto(Exchange, ImplicitAPI):
1552
1550
  'reduceOnly': self.safe_value(order, 'reduceOnly'),
1553
1551
  'side': side,
1554
1552
  'price': price,
1555
- 'stopPrice': stopPrice,
1556
- 'triggerPrice': stopPrice,
1553
+ 'triggerPrice': self.parse_number(self.omit_zero(self.safe_string(order, 'stopPrice'))),
1557
1554
  'amount': amount,
1558
1555
  'cost': cost,
1559
1556
  'average': average,
@@ -1600,8 +1597,8 @@ class tokocrypto(Exchange, ImplicitAPI):
1600
1597
  params = self.omit(params, ['clientId', 'clientOrderId'])
1601
1598
  initialUppercaseType = type.upper()
1602
1599
  uppercaseType = initialUppercaseType
1603
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1604
- if stopPrice is not None:
1600
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1601
+ if triggerPrice is not None:
1605
1602
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1606
1603
  if uppercaseType == 'MARKET':
1607
1604
  uppercaseType = 'STOP_LOSS'
@@ -1610,7 +1607,7 @@ class tokocrypto(Exchange, ImplicitAPI):
1610
1607
  validOrderTypes = self.safe_value(market['info'], 'orderTypes')
1611
1608
  if not self.in_array(uppercaseType, validOrderTypes):
1612
1609
  if initialUppercaseType != uppercaseType:
1613
- raise InvalidOrder(self.id + ' stopPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders')
1610
+ raise InvalidOrder(self.id + ' triggerPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders')
1614
1611
  else:
1615
1612
  raise InvalidOrder(self.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market')
1616
1613
  reverseOrderTypeMapping: dict = {
@@ -1640,7 +1637,7 @@ class tokocrypto(Exchange, ImplicitAPI):
1640
1637
  request['clientId'] = clientOrderId
1641
1638
  # additional required fields depending on the order type
1642
1639
  priceIsRequired = False
1643
- stopPriceIsRequired = False
1640
+ triggerPriceIsRequired = False
1644
1641
  quantityIsRequired = False
1645
1642
  #
1646
1643
  # spot/margin
@@ -1679,13 +1676,13 @@ class tokocrypto(Exchange, ImplicitAPI):
1679
1676
  priceIsRequired = True
1680
1677
  quantityIsRequired = True
1681
1678
  elif (uppercaseType == 'STOP_LOSS') or (uppercaseType == 'TAKE_PROFIT'):
1682
- stopPriceIsRequired = True
1679
+ triggerPriceIsRequired = True
1683
1680
  quantityIsRequired = True
1684
1681
  if market['linear'] or market['inverse']:
1685
1682
  priceIsRequired = True
1686
1683
  elif (uppercaseType == 'STOP_LOSS_LIMIT') or (uppercaseType == 'TAKE_PROFIT_LIMIT'):
1687
1684
  quantityIsRequired = True
1688
- stopPriceIsRequired = True
1685
+ triggerPriceIsRequired = True
1689
1686
  priceIsRequired = True
1690
1687
  elif uppercaseType == 'LIMIT_MAKER':
1691
1688
  priceIsRequired = True
@@ -1696,11 +1693,11 @@ class tokocrypto(Exchange, ImplicitAPI):
1696
1693
  if price is None:
1697
1694
  raise InvalidOrder(self.id + ' createOrder() requires a price argument for a ' + type + ' order')
1698
1695
  request['price'] = self.price_to_precision(symbol, price)
1699
- if stopPriceIsRequired:
1700
- if stopPrice is None:
1701
- raise InvalidOrder(self.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order')
1696
+ if triggerPriceIsRequired:
1697
+ if triggerPrice is None:
1698
+ raise InvalidOrder(self.id + ' createOrder() requires a triggerPrice extra param for a ' + type + ' order')
1702
1699
  else:
1703
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1700
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1704
1701
  response = self.privatePostOpenV1Orders(self.extend(request, params))
1705
1702
  #
1706
1703
  # {
ccxt/tradeogre.py CHANGED
@@ -561,7 +561,7 @@ class tradeogre(Exchange, ImplicitAPI):
561
561
  'postOnly': None,
562
562
  'side': self.safe_string(order, 'type'),
563
563
  'price': self.safe_string(order, 'price'),
564
- 'stopPrice': None,
564
+ 'triggerPrice': None,
565
565
  'amount': self.safe_string(order, 'quantity'),
566
566
  'cost': None,
567
567
  'average': None,
ccxt/upbit.py CHANGED
@@ -1513,7 +1513,6 @@ class upbit(Exchange, ImplicitAPI):
1513
1513
  'postOnly': None,
1514
1514
  'side': side,
1515
1515
  'price': price,
1516
- 'stopPrice': None,
1517
1516
  'triggerPrice': None,
1518
1517
  'cost': self.parse_number(cost),
1519
1518
  'average': self.parse_number(average),