ccxt 4.4.41__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 (162) 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/ace.py +1 -1
  7. ccxt/alpaca.py +0 -1
  8. ccxt/ascendex.py +0 -1
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +1 -1
  11. ccxt/async_support/alpaca.py +0 -1
  12. ccxt/async_support/ascendex.py +0 -1
  13. ccxt/async_support/base/exchange.py +15 -15
  14. ccxt/async_support/bigone.py +0 -1
  15. ccxt/async_support/binance.py +3 -0
  16. ccxt/async_support/bingx.py +2 -0
  17. ccxt/async_support/bitfinex.py +122 -0
  18. ccxt/async_support/blofin.py +16 -7
  19. ccxt/async_support/cex.py +1 -1
  20. ccxt/async_support/coinbase.py +8 -9
  21. ccxt/async_support/coinbaseexchange.py +5 -6
  22. ccxt/async_support/coinbaseinternational.py +7 -8
  23. ccxt/async_support/coincatch.py +0 -1
  24. ccxt/async_support/coincheck.py +0 -1
  25. ccxt/async_support/coinex.py +91 -6
  26. ccxt/async_support/coinlist.py +3 -4
  27. ccxt/async_support/coinmate.py +1 -3
  28. ccxt/async_support/coinmetro.py +4 -5
  29. ccxt/async_support/coinone.py +0 -1
  30. ccxt/async_support/coinsph.py +7 -8
  31. ccxt/async_support/cryptocom.py +3 -0
  32. ccxt/async_support/currencycom.py +3 -4
  33. ccxt/async_support/defx.py +6 -7
  34. ccxt/async_support/deribit.py +1 -3
  35. ccxt/async_support/digifinex.py +0 -1
  36. ccxt/async_support/ellipx.py +0 -2
  37. ccxt/async_support/exmo.py +1 -2
  38. ccxt/async_support/gate.py +1 -2
  39. ccxt/async_support/gemini.py +4 -5
  40. ccxt/async_support/hashkey.py +79 -67
  41. ccxt/async_support/hitbtc.py +47 -5
  42. ccxt/async_support/hollaex.py +4 -6
  43. ccxt/async_support/htx.py +1 -3
  44. ccxt/async_support/huobijp.py +0 -1
  45. ccxt/async_support/idex.py +8 -8
  46. ccxt/async_support/independentreserve.py +0 -1
  47. ccxt/async_support/indodax.py +0 -1
  48. ccxt/async_support/kraken.py +63 -3
  49. ccxt/async_support/krakenfutures.py +75 -3
  50. ccxt/async_support/kucoin.py +1 -3
  51. ccxt/async_support/kucoinfutures.py +10 -9
  52. ccxt/async_support/kuna.py +1 -3
  53. ccxt/async_support/latoken.py +1 -3
  54. ccxt/async_support/lbank.py +0 -1
  55. ccxt/async_support/luno.py +0 -1
  56. ccxt/async_support/lykke.py +0 -1
  57. ccxt/async_support/mercado.py +0 -1
  58. ccxt/async_support/mexc.py +3 -4
  59. ccxt/async_support/ndax.py +1 -1
  60. ccxt/async_support/novadax.py +4 -6
  61. ccxt/async_support/oceanex.py +0 -1
  62. ccxt/async_support/okcoin.py +1 -3
  63. ccxt/async_support/okx.py +1 -3
  64. ccxt/async_support/onetrading.py +1 -3
  65. ccxt/async_support/p2b.py +1 -1
  66. ccxt/async_support/paradex.py +5 -7
  67. ccxt/async_support/phemex.py +8 -10
  68. ccxt/async_support/poloniex.py +1 -3
  69. ccxt/async_support/poloniexfutures.py +6 -6
  70. ccxt/async_support/probit.py +0 -1
  71. ccxt/async_support/timex.py +0 -1
  72. ccxt/async_support/tokocrypto.py +11 -14
  73. ccxt/async_support/tradeogre.py +1 -1
  74. ccxt/async_support/upbit.py +0 -1
  75. ccxt/async_support/wavesexchange.py +4 -5
  76. ccxt/async_support/whitebit.py +8 -9
  77. ccxt/async_support/woo.py +98 -12
  78. ccxt/async_support/woofipro.py +96 -15
  79. ccxt/async_support/xt.py +3 -2
  80. ccxt/async_support/yobit.py +0 -1
  81. ccxt/async_support/zaif.py +0 -1
  82. ccxt/async_support/zonda.py +1 -2
  83. ccxt/base/exchange.py +21 -17
  84. ccxt/bigone.py +0 -1
  85. ccxt/binance.py +3 -0
  86. ccxt/bingx.py +2 -0
  87. ccxt/bitfinex.py +122 -0
  88. ccxt/blofin.py +16 -7
  89. ccxt/cex.py +1 -1
  90. ccxt/coinbase.py +8 -9
  91. ccxt/coinbaseexchange.py +5 -6
  92. ccxt/coinbaseinternational.py +7 -8
  93. ccxt/coincatch.py +0 -1
  94. ccxt/coincheck.py +0 -1
  95. ccxt/coinex.py +91 -6
  96. ccxt/coinlist.py +3 -4
  97. ccxt/coinmate.py +1 -3
  98. ccxt/coinmetro.py +4 -5
  99. ccxt/coinone.py +0 -1
  100. ccxt/coinsph.py +7 -8
  101. ccxt/cryptocom.py +3 -0
  102. ccxt/currencycom.py +3 -4
  103. ccxt/defx.py +6 -7
  104. ccxt/deribit.py +1 -3
  105. ccxt/digifinex.py +0 -1
  106. ccxt/ellipx.py +0 -2
  107. ccxt/exmo.py +1 -2
  108. ccxt/gate.py +1 -2
  109. ccxt/gemini.py +4 -5
  110. ccxt/hashkey.py +79 -67
  111. ccxt/hitbtc.py +47 -5
  112. ccxt/hollaex.py +4 -6
  113. ccxt/htx.py +1 -3
  114. ccxt/huobijp.py +0 -1
  115. ccxt/idex.py +8 -8
  116. ccxt/independentreserve.py +0 -1
  117. ccxt/indodax.py +0 -1
  118. ccxt/kraken.py +63 -3
  119. ccxt/krakenfutures.py +75 -3
  120. ccxt/kucoin.py +1 -3
  121. ccxt/kucoinfutures.py +10 -9
  122. ccxt/kuna.py +1 -3
  123. ccxt/latoken.py +1 -3
  124. ccxt/lbank.py +0 -1
  125. ccxt/luno.py +0 -1
  126. ccxt/lykke.py +0 -1
  127. ccxt/mercado.py +0 -1
  128. ccxt/mexc.py +3 -4
  129. ccxt/ndax.py +1 -1
  130. ccxt/novadax.py +4 -6
  131. ccxt/oceanex.py +0 -1
  132. ccxt/okcoin.py +1 -3
  133. ccxt/okx.py +1 -3
  134. ccxt/onetrading.py +1 -3
  135. ccxt/p2b.py +1 -1
  136. ccxt/paradex.py +5 -7
  137. ccxt/phemex.py +8 -10
  138. ccxt/poloniex.py +1 -3
  139. ccxt/poloniexfutures.py +6 -6
  140. ccxt/pro/__init__.py +1 -1
  141. ccxt/probit.py +0 -1
  142. ccxt/timex.py +0 -1
  143. ccxt/tokocrypto.py +11 -14
  144. ccxt/tradeogre.py +1 -1
  145. ccxt/upbit.py +0 -1
  146. ccxt/wavesexchange.py +4 -5
  147. ccxt/whitebit.py +8 -9
  148. ccxt/woo.py +98 -12
  149. ccxt/woofipro.py +96 -15
  150. ccxt/xt.py +3 -2
  151. ccxt/yobit.py +0 -1
  152. ccxt/zaif.py +0 -1
  153. ccxt/zonda.py +1 -2
  154. {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/METADATA +5 -5
  155. {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/RECORD +158 -162
  156. ccxt/bitbay.py +0 -17
  157. ccxt/bitfinex2.py +0 -3624
  158. ccxt/hitbtc3.py +0 -16
  159. ccxt/pro/bitfinex2.py +0 -1086
  160. {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/LICENSE.txt +0 -0
  161. {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/WHEEL +0 -0
  162. {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/top_level.txt +0 -0
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
@@ -3667,7 +3667,6 @@ class okx(Exchange, ImplicitAPI):
3667
3667
  clientOrderId = None # fix empty clientOrderId string
3668
3668
  stopLossPrice = self.safe_number_2(order, 'slTriggerPx', 'slOrdPx')
3669
3669
  takeProfitPrice = self.safe_number_2(order, 'tpTriggerPx', 'tpOrdPx')
3670
- stopPrice = self.safe_number_n(order, ['triggerPx', 'moveTriggerPx'])
3671
3670
  reduceOnlyRaw = self.safe_string(order, 'reduceOnly')
3672
3671
  reduceOnly = False
3673
3672
  if reduceOnly is not None:
@@ -3688,8 +3687,7 @@ class okx(Exchange, ImplicitAPI):
3688
3687
  'price': price,
3689
3688
  'stopLossPrice': stopLossPrice,
3690
3689
  'takeProfitPrice': takeProfitPrice,
3691
- 'stopPrice': stopPrice,
3692
- 'triggerPrice': stopPrice,
3690
+ 'triggerPrice': self.safe_number_n(order, ['triggerPx', 'moveTriggerPx']),
3693
3691
  'average': average,
3694
3692
  'cost': cost,
3695
3693
  'amount': amount,
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.41'
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),
ccxt/wavesexchange.py CHANGED
@@ -1243,7 +1243,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1243
1243
  :param float amount: how much of currency you want to trade in units of base currency
1244
1244
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1245
1245
  :param dict [params]: extra parameters specific to the exchange API endpoint
1246
- :param float [params.stopPrice]: The price at which a stop order is triggered at
1246
+ :param float [params.triggerPrice]: The price at which a stop order is triggered at
1247
1247
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1248
1248
  """
1249
1249
  self.check_required_dependencies()
@@ -1254,8 +1254,8 @@ class wavesexchange(Exchange, ImplicitAPI):
1254
1254
  amountAsset = self.get_asset_id(market['baseId'])
1255
1255
  priceAsset = self.get_asset_id(market['quoteId'])
1256
1256
  isMarketOrder = (type == 'market')
1257
- stopPrice = self.safe_float_2(params, 'triggerPrice', 'stopPrice')
1258
- isStopOrder = (stopPrice is not None)
1257
+ triggerPrice = self.safe_float_2(params, 'triggerPrice', 'stopPrice')
1258
+ isStopOrder = (triggerPrice is not None)
1259
1259
  if (isMarketOrder) and (price is None):
1260
1260
  raise InvalidOrder(self.id + ' createOrder() requires a price argument for ' + type + ' orders to determine the max price for buy and the min price for sell')
1261
1261
  timestamp = self.milliseconds()
@@ -1351,7 +1351,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1351
1351
  'c': {
1352
1352
  't': 'sp',
1353
1353
  'v': {
1354
- 'p': self.to_real_symbol_price(symbol, stopPrice),
1354
+ 'p': self.to_real_symbol_price(symbol, triggerPrice),
1355
1355
  },
1356
1356
  },
1357
1357
  }
@@ -1725,7 +1725,6 @@ class wavesexchange(Exchange, ImplicitAPI):
1725
1725
  'postOnly': None,
1726
1726
  'side': side,
1727
1727
  'price': price,
1728
- 'stopPrice': triggerPrice,
1729
1728
  'triggerPrice': triggerPrice,
1730
1729
  'amount': amount,
1731
1730
  'cost': None,
ccxt/whitebit.py CHANGED
@@ -1275,8 +1275,8 @@ class whitebit(Exchange, ImplicitAPI):
1275
1275
  marketType = self.safe_string(market, 'type')
1276
1276
  isLimitOrder = type == 'limit'
1277
1277
  isMarketOrder = type == 'market'
1278
- stopPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
1279
- isStopOrder = (stopPrice is not None)
1278
+ triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
1279
+ isStopOrder = (triggerPrice is not None)
1280
1280
  postOnly = self.is_post_only(isMarketOrder, False, params)
1281
1281
  marginMode, query = self.handle_margin_mode_and_params('createOrder', params)
1282
1282
  if postOnly:
@@ -1287,7 +1287,7 @@ class whitebit(Exchange, ImplicitAPI):
1287
1287
  useCollateralEndpoint = marginMode is not None or marketType == 'swap'
1288
1288
  response = None
1289
1289
  if isStopOrder:
1290
- request['activation_price'] = self.price_to_precision(symbol, stopPrice)
1290
+ request['activation_price'] = self.price_to_precision(symbol, triggerPrice)
1291
1291
  if isLimitOrder:
1292
1292
  # stop limit order
1293
1293
  request['price'] = self.price_to_precision(symbol, price)
@@ -1347,11 +1347,11 @@ class whitebit(Exchange, ImplicitAPI):
1347
1347
  # Update clientOrderId of the order
1348
1348
  request['clientOrderId'] = clientOrderId
1349
1349
  isLimitOrder = type == 'limit'
1350
- stopPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
1351
- isStopOrder = (stopPrice is not None)
1350
+ triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'activation_price'])
1351
+ isStopOrder = (triggerPrice is not None)
1352
1352
  params = self.omit(params, ['clOrdId', 'clientOrderId', 'triggerPrice', 'stopPrice'])
1353
1353
  if isStopOrder:
1354
- request['activation_price'] = self.price_to_precision(symbol, stopPrice)
1354
+ request['activation_price'] = self.price_to_precision(symbol, triggerPrice)
1355
1355
  if isLimitOrder:
1356
1356
  # stop limit order
1357
1357
  request['amount'] = self.amount_to_precision(symbol, amount)
@@ -1714,7 +1714,7 @@ class whitebit(Exchange, ImplicitAPI):
1714
1714
  if clientOrderId == '':
1715
1715
  clientOrderId = None
1716
1716
  price = self.safe_string(order, 'price')
1717
- stopPrice = self.safe_number(order, 'activation_price')
1717
+ triggerPrice = self.safe_number(order, 'activation_price')
1718
1718
  orderId = self.safe_string_2(order, 'orderId', 'id')
1719
1719
  type = self.safe_string(order, 'type')
1720
1720
  orderType = self.parse_order_type(type)
@@ -1747,8 +1747,7 @@ class whitebit(Exchange, ImplicitAPI):
1747
1747
  'side': side,
1748
1748
  'price': price,
1749
1749
  'type': orderType,
1750
- 'stopPrice': stopPrice,
1751
- 'triggerPrice': stopPrice,
1750
+ 'triggerPrice': triggerPrice,
1752
1751
  'amount': amount,
1753
1752
  'filled': filled,
1754
1753
  'remaining': remaining,