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/coinlist.py CHANGED
@@ -1504,7 +1504,7 @@ class coinlist(Exchange, ImplicitAPI):
1504
1504
  elif type == 'limit':
1505
1505
  request['type'] = 'stop_limit'
1506
1506
  elif (type == 'stop_market') or (type == 'stop_limit') or (type == 'take_market') or (type == 'take_limit'):
1507
- raise ArgumentsRequired(self.id + ' createOrder() requires a stopPrice parameter for stop-loss and take-profit orders')
1507
+ raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice parameter for stop-loss and take-profit orders')
1508
1508
  clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_id')
1509
1509
  if clientOrderId is not None:
1510
1510
  request['client_id'] = clientOrderId
@@ -1643,7 +1643,7 @@ class coinlist(Exchange, ImplicitAPI):
1643
1643
  type = self.parse_order_type(self.safe_string(order, 'type'))
1644
1644
  side = self.safe_string(order, 'side')
1645
1645
  price = self.safe_string(order, 'price')
1646
- stopPrice = self.safe_string(order, 'stop_price')
1646
+ triggerPrice = self.safe_string(order, 'stop_price')
1647
1647
  average = self.safe_string(order, 'average_fill_price') # from documentation
1648
1648
  amount = self.safe_string(order, 'size')
1649
1649
  filled = self.safe_string(order, 'size_filled')
@@ -1668,8 +1668,7 @@ class coinlist(Exchange, ImplicitAPI):
1668
1668
  'timeInForce': 'GTC',
1669
1669
  'side': side,
1670
1670
  'price': price,
1671
- 'stopPrice': stopPrice,
1672
- 'triggerPrice': stopPrice,
1671
+ 'triggerPrice': triggerPrice,
1673
1672
  'average': average,
1674
1673
  'amount': amount,
1675
1674
  'cost': None,
ccxt/coinmate.py CHANGED
@@ -938,7 +938,6 @@ class coinmate(Exchange, ImplicitAPI):
938
938
  marketId = self.safe_string(order, 'currencyPair')
939
939
  symbol = self.safe_symbol(marketId, market, '_')
940
940
  clientOrderId = self.safe_string(order, 'clientOrderId')
941
- stopPrice = self.safe_number(order, 'stopPrice')
942
941
  return self.safe_order({
943
942
  'id': id,
944
943
  'clientOrderId': clientOrderId,
@@ -951,8 +950,7 @@ class coinmate(Exchange, ImplicitAPI):
951
950
  'postOnly': None,
952
951
  'side': side,
953
952
  'price': priceString,
954
- 'stopPrice': stopPrice,
955
- 'triggerPrice': stopPrice,
953
+ 'triggerPrice': self.safe_number(order, 'stopPrice'),
956
954
  'amount': amountString,
957
955
  'cost': None,
958
956
  'average': averageString,
ccxt/coinmetro.py CHANGED
@@ -1202,10 +1202,10 @@ class coinmetro(Exchange, ImplicitAPI):
1202
1202
  if timeInForce is not None:
1203
1203
  params = self.omit(params, 'timeInForce')
1204
1204
  request['timeInForce'] = self.encode_order_time_in_force(timeInForce)
1205
- stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1206
- if stopPrice is not None:
1205
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1206
+ if triggerPrice is not None:
1207
1207
  params = self.omit(params, ['triggerPrice'])
1208
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1208
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1209
1209
  userData = self.safe_value(params, 'userData', {})
1210
1210
  comment = self.safe_string_2(params, 'clientOrderId', 'comment')
1211
1211
  if comment is not None:
@@ -1706,7 +1706,6 @@ class coinmetro(Exchange, ImplicitAPI):
1706
1706
  }
1707
1707
  trades = self.safe_value(order, 'fills', [])
1708
1708
  userData = self.safe_value(order, 'userData', {})
1709
- triggerPrice = self.safe_string(order, 'stopPrice')
1710
1709
  clientOrderId = self.safe_string(userData, 'comment')
1711
1710
  takeProfitPrice = self.safe_string(userData, 'takeProfit')
1712
1711
  stopLossPrice = self.safe_string(userData, 'stopLoss')
@@ -1722,7 +1721,7 @@ class coinmetro(Exchange, ImplicitAPI):
1722
1721
  'timeInForce': self.parse_order_time_in_force(self.safe_integer(order, 'timeInForce')),
1723
1722
  'side': side,
1724
1723
  'price': price,
1725
- 'triggerPrice': triggerPrice,
1724
+ 'triggerPrice': self.safe_string(order, 'stopPrice'),
1726
1725
  'takeProfitPrice': takeProfitPrice,
1727
1726
  'stopLossPrice': stopLossPrice,
1728
1727
  'average': None,
ccxt/coinone.py CHANGED
@@ -915,7 +915,6 @@ class coinone(Exchange, ImplicitAPI):
915
915
  'postOnly': None,
916
916
  'side': side,
917
917
  'price': self.safe_string(order, 'price'),
918
- 'stopPrice': None,
919
918
  'triggerPrice': None,
920
919
  'cost': None,
921
920
  'average': self.safe_string(order, 'averageExecutedPrice'),
ccxt/coinsph.py CHANGED
@@ -1146,10 +1146,10 @@ class coinsph(Exchange, ImplicitAPI):
1146
1146
  quoteAmount = self.cost_to_precision(symbol, amount)
1147
1147
  request['quoteOrderQty'] = quoteAmount
1148
1148
  if orderType == 'STOP_LOSS' or orderType == 'STOP_LOSS_LIMIT' or orderType == 'TAKE_PROFIT' or orderType == 'TAKE_PROFIT_LIMIT':
1149
- stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1150
- if stopPrice is None:
1149
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1150
+ if triggerPrice is None:
1151
1151
  raise InvalidOrder(self.id + ' createOrder() requires a triggerPrice or stopPrice param for stop_loss, take_profit, stop_loss_limit, and take_profit_limit orders')
1152
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1152
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1153
1153
  request['newOrderRespType'] = newOrderRespType
1154
1154
  params = self.omit(params, 'price', 'stopPrice', 'triggerPrice', 'quantity', 'quoteOrderQty')
1155
1155
  response = None
@@ -1374,9 +1374,9 @@ class coinsph(Exchange, ImplicitAPI):
1374
1374
  market = self.safe_market(marketId, market)
1375
1375
  timestamp = self.safe_integer_2(order, 'time', 'transactTime')
1376
1376
  trades = self.safe_value(order, 'fills', None)
1377
- stopPrice = self.safe_string(order, 'stopPrice')
1378
- if Precise.string_eq(stopPrice, '0'):
1379
- stopPrice = None
1377
+ triggerPrice = self.safe_string(order, 'stopPrice')
1378
+ if Precise.string_eq(triggerPrice, '0'):
1379
+ triggerPrice = None
1380
1380
  return self.safe_order({
1381
1381
  'id': id,
1382
1382
  'clientOrderId': self.safe_string(order, 'clientOrderId'),
@@ -1389,8 +1389,7 @@ class coinsph(Exchange, ImplicitAPI):
1389
1389
  'timeInForce': self.parse_order_time_in_force(self.safe_string(order, 'timeInForce')),
1390
1390
  'side': self.parse_order_side(self.safe_string(order, 'side')),
1391
1391
  'price': self.safe_string(order, 'price'),
1392
- 'stopPrice': stopPrice,
1393
- 'triggerPrice': stopPrice,
1392
+ 'triggerPrice': triggerPrice,
1394
1393
  'average': None,
1395
1394
  'amount': self.safe_string(order, 'origQty'),
1396
1395
  'cost': self.safe_string(order, 'cummulativeQuoteQty'),
ccxt/cryptocom.py CHANGED
@@ -507,6 +507,9 @@ class cryptocom(Exchange, ImplicitAPI):
507
507
  '40801': RequestTimeout,
508
508
  '42901': RateLimitExceeded,
509
509
  '43005': InvalidOrder, # Rejected POST_ONLY create-order request(normally happened when exec_inst contains POST_ONLY but time_in_force is NOT GOOD_TILL_CANCEL)
510
+ '43003': InvalidOrder, # FOK order has not been filled and cancelled
511
+ '43004': InvalidOrder, # IOC order has not been filled and cancelled
512
+ '43012': BadRequest, # Canceled due to Self Trade Prevention
510
513
  '50001': ExchangeError,
511
514
  '9010001': OnMaintenance, # {"code":9010001,"message":"SYSTEM_MAINTENANCE","details":"Crypto.com Exchange is currently under maintenance. Please refer to https://status.crypto.com for more details."}
512
515
  },
ccxt/currencycom.py CHANGED
@@ -1198,7 +1198,6 @@ class currencycom(Exchange, ImplicitAPI):
1198
1198
  'timeInForce': timeInForce,
1199
1199
  'side': side,
1200
1200
  'price': price,
1201
- 'stopPrice': None,
1202
1201
  'triggerPrice': None,
1203
1202
  'amount': amount,
1204
1203
  'cost': None,
@@ -1296,11 +1295,11 @@ class currencycom(Exchange, ImplicitAPI):
1296
1295
  request['type'] = 'STOP'
1297
1296
  request['price'] = self.price_to_precision(symbol, price)
1298
1297
  elif type == 'market':
1299
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1298
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1300
1299
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1301
- if stopPrice is not None:
1300
+ if triggerPrice is not None:
1302
1301
  request['type'] = 'STOP'
1303
- request['price'] = self.price_to_precision(symbol, stopPrice)
1302
+ request['price'] = self.price_to_precision(symbol, triggerPrice)
1304
1303
  response = self.privatePostV2Order(self.extend(request, params))
1305
1304
  #
1306
1305
  # limit
ccxt/defx.py CHANGED
@@ -1156,7 +1156,7 @@ class defx(Exchange, ImplicitAPI):
1156
1156
  'type': orderType,
1157
1157
  }
1158
1158
  takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
1159
- stopPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
1159
+ triggerPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
1160
1160
  isMarket = orderType == 'MARKET'
1161
1161
  isLimit = orderType == 'LIMIT'
1162
1162
  timeInForce = self.safe_string_upper(params, 'timeInForce')
@@ -1171,7 +1171,7 @@ class defx(Exchange, ImplicitAPI):
1171
1171
  clientOrderId = self.safe_string(params, 'clientOrderId')
1172
1172
  if clientOrderId is not None:
1173
1173
  request['newClientOrderId'] = clientOrderId
1174
- if stopPrice is not None or takeProfitPrice is not None:
1174
+ if triggerPrice is not None or takeProfitPrice is not None:
1175
1175
  request['workingType'] = 'MARK_PRICE'
1176
1176
  if takeProfitPrice is not None:
1177
1177
  request['stopPrice'] = self.price_to_precision(symbol, takeProfitPrice)
@@ -1180,7 +1180,7 @@ class defx(Exchange, ImplicitAPI):
1180
1180
  else:
1181
1181
  request['type'] = 'TAKE_PROFIT_LIMIT'
1182
1182
  else:
1183
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1183
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1184
1184
  if isMarket:
1185
1185
  request['type'] = 'STOP_MARKET'
1186
1186
  else:
@@ -1267,12 +1267,12 @@ class defx(Exchange, ImplicitAPI):
1267
1267
  average = self.omit_zero(self.safe_string(order, 'avgPrice'))
1268
1268
  timeInForce = self.safe_string_lower(order, 'timeInForce')
1269
1269
  takeProfitPrice: Str = None
1270
- stopPrice: Str = None
1270
+ triggerPrice: Str = None
1271
1271
  if orderType is not None:
1272
1272
  if orderType.find('take_profit') >= 0:
1273
1273
  takeProfitPrice = self.safe_string(order, 'stopPrice')
1274
1274
  else:
1275
- stopPrice = self.safe_string(order, 'stopPrice')
1275
+ triggerPrice = self.safe_string(order, 'stopPrice')
1276
1276
  timestamp = self.parse8601(self.safe_string(order, 'createdAt'))
1277
1277
  lastTradeTimestamp = self.parse8601(self.safe_string(order, 'updatedAt'))
1278
1278
  return self.safe_order({
@@ -1290,8 +1290,7 @@ class defx(Exchange, ImplicitAPI):
1290
1290
  'reduceOnly': self.safe_bool(order, 'reduceOnly'),
1291
1291
  'side': side,
1292
1292
  'price': price,
1293
- 'stopPrice': stopPrice,
1294
- 'triggerPrice': stopPrice,
1293
+ 'triggerPrice': triggerPrice,
1295
1294
  'takeProfitPrice': takeProfitPrice,
1296
1295
  'stopLossPrice': None,
1297
1296
  'average': average,
ccxt/deribit.py CHANGED
@@ -1767,7 +1767,6 @@ class deribit(Exchange, ImplicitAPI):
1767
1767
  # injected in createOrder
1768
1768
  trades = self.safe_value(order, 'trades')
1769
1769
  timeInForce = self.parse_time_in_force(self.safe_string(order, 'time_in_force'))
1770
- stopPrice = self.safe_value(order, 'stop_price')
1771
1770
  postOnly = self.safe_value(order, 'post_only')
1772
1771
  return self.safe_order({
1773
1772
  'info': order,
@@ -1782,8 +1781,7 @@ class deribit(Exchange, ImplicitAPI):
1782
1781
  'postOnly': postOnly,
1783
1782
  'side': side,
1784
1783
  'price': priceString,
1785
- 'stopPrice': stopPrice,
1786
- 'triggerPrice': stopPrice,
1784
+ 'triggerPrice': self.safe_value(order, 'stop_price'),
1787
1785
  'amount': amount,
1788
1786
  'cost': cost,
1789
1787
  'average': averageString,
ccxt/digifinex.py CHANGED
@@ -2024,7 +2024,6 @@ class digifinex(Exchange, ImplicitAPI):
2024
2024
  'postOnly': None,
2025
2025
  'side': side,
2026
2026
  'price': self.safe_number(order, 'price'),
2027
- 'stopPrice': None,
2028
2027
  'triggerPrice': None,
2029
2028
  'amount': self.safe_number_2(order, 'amount', 'size'),
2030
2029
  'filled': self.safe_number_2(order, 'executed_amount', 'filled_qty'),
ccxt/ellipx.py CHANGED
@@ -1264,7 +1264,6 @@ class ellipx(Exchange, ImplicitAPI):
1264
1264
  'postOnly': postOnly,
1265
1265
  'side': side,
1266
1266
  'price': price,
1267
- 'stopPrice': None,
1268
1267
  'triggerPrice': None,
1269
1268
  'average': None,
1270
1269
  'cost': cost,
@@ -1323,7 +1322,6 @@ class ellipx(Exchange, ImplicitAPI):
1323
1322
  'postOnly': None,
1324
1323
  'side': None,
1325
1324
  'price': None,
1326
- 'stopPrice': None,
1327
1325
  'triggerPrice': None,
1328
1326
  'average': None,
1329
1327
  'cost': None,
ccxt/exmo.py CHANGED
@@ -1415,7 +1415,7 @@ class exmo(Exchange, ImplicitAPI):
1415
1415
  :param float amount: how much of currency you want to trade in units of base currency
1416
1416
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1417
1417
  :param dict [params]: extra parameters specific to the exchange API endpoint
1418
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1418
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1419
1419
  :param str [params.timeInForce]: *spot only* 'fok', 'ioc' or 'post_only'
1420
1420
  :param boolean [params.postOnly]: *spot only* True for post only orders
1421
1421
  :param float [params.cost]: *spot only* *market orders only* the cost of the order in the quote currency for market orders
@@ -1904,7 +1904,6 @@ class exmo(Exchange, ImplicitAPI):
1904
1904
  'postOnly': None,
1905
1905
  'side': side,
1906
1906
  'price': price,
1907
- 'stopPrice': triggerPrice,
1908
1907
  'triggerPrice': triggerPrice,
1909
1908
  'cost': cost,
1910
1909
  'amount': amount,
ccxt/gate.py CHANGED
@@ -3915,7 +3915,7 @@ class gate(Exchange, ImplicitAPI):
3915
3915
  :param float amount: the amount of currency to trade
3916
3916
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3917
3917
  :param dict [params]: extra parameters specific to the exchange API endpoint
3918
- :param float [params.stopPrice]: The price at which a trigger order is triggered at
3918
+ :param float [params.triggerPrice]: The price at which a trigger order is triggered at
3919
3919
  :param str [params.timeInForce]: "GTC", "IOC", or "PO"
3920
3920
  :param float [params.stopLossPrice]: The price at which a stop loss order is triggered at
3921
3921
  :param float [params.takeProfitPrice]: The price at which a take profit order is triggered at
@@ -4663,7 +4663,6 @@ class gate(Exchange, ImplicitAPI):
4663
4663
  'reduceOnly': self.safe_value(order, 'is_reduce_only'),
4664
4664
  'side': side,
4665
4665
  'price': price,
4666
- 'stopPrice': triggerPrice,
4667
4666
  'triggerPrice': triggerPrice,
4668
4667
  'average': average,
4669
4668
  'amount': Precise.string_abs(amount),
ccxt/gemini.py CHANGED
@@ -1300,7 +1300,6 @@ class gemini(Exchange, ImplicitAPI):
1300
1300
  'postOnly': postOnly,
1301
1301
  'side': side,
1302
1302
  'price': price,
1303
- 'stopPrice': None,
1304
1303
  'triggerPrice': None,
1305
1304
  'average': average,
1306
1305
  'cost': None,
@@ -1431,12 +1430,12 @@ class gemini(Exchange, ImplicitAPI):
1431
1430
  }
1432
1431
  type = self.safe_string(params, 'type', type)
1433
1432
  params = self.omit(params, 'type')
1434
- rawStopPrice = self.safe_string_2(params, 'stop_price', 'stopPrice')
1433
+ triggerPrice = self.safe_string_n(params, ['stop_price', 'stopPrice'])
1435
1434
  params = self.omit(params, ['stop_price', 'stopPrice', 'type'])
1436
1435
  if type == 'stopLimit':
1437
- raise ArgumentsRequired(self.id + ' createOrder() requires a stopPrice parameter or a stop_price parameter for ' + type + ' orders')
1438
- if rawStopPrice is not None:
1439
- request['stop_price'] = self.price_to_precision(symbol, rawStopPrice)
1436
+ raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice parameter or a stop_price parameter for ' + type + ' orders')
1437
+ if triggerPrice is not None:
1438
+ request['stop_price'] = self.price_to_precision(symbol, triggerPrice)
1440
1439
  request['type'] = 'exchange stop limit'
1441
1440
  else:
1442
1441
  # No options can be applied to stop-limit orders at self time.
ccxt/hashkey.py CHANGED
@@ -361,6 +361,84 @@ class hashkey(Exchange, ImplicitAPI):
361
361
  },
362
362
  'defaultNetwork': 'ERC20',
363
363
  },
364
+ 'features': {
365
+ 'default': {
366
+ 'sandbox': True,
367
+ 'createOrder': {
368
+ 'marginMode': False,
369
+ 'triggerPrice': False,
370
+ 'triggerPriceType': None,
371
+ 'triggerDirection': False,
372
+ 'stopLossPrice': False,
373
+ 'takeProfitPrice': False,
374
+ 'attachedStopLossTakeProfit': None,
375
+ 'timeInForce': {
376
+ 'IOC': True,
377
+ 'FOK': True,
378
+ 'PO': True,
379
+ 'GTD': False,
380
+ },
381
+ 'hedged': False,
382
+ 'trailing': False,
383
+ # exchange-supported features
384
+ # 'marketBuyRequiresPrice': False,
385
+ # 'marketBuyByCost': False,
386
+ # 'selfTradePrevention': True,
387
+ # 'twap': False,
388
+ # 'iceberg': False,
389
+ # 'oco': False,
390
+ },
391
+ 'createOrders': {
392
+ 'max': 20,
393
+ },
394
+ 'fetchMyTrades': {
395
+ 'marginMode': False,
396
+ 'limit': 1000,
397
+ 'daysBack': 30,
398
+ 'untilDays': 30,
399
+ },
400
+ 'fetchOrder': {
401
+ 'marginMode': False,
402
+ 'trigger': False,
403
+ 'trailing': False,
404
+ },
405
+ 'fetchOpenOrders': {
406
+ 'marginMode': False,
407
+ 'limit': 1000,
408
+ 'trigger': False,
409
+ 'trailing': False,
410
+ },
411
+ 'fetchOrders': None,
412
+ 'fetchClosedOrders': None, # todo
413
+ 'fetchOHLCV': {
414
+ 'limit': 1000,
415
+ },
416
+ },
417
+ 'spot': {
418
+ 'extends': 'default',
419
+ },
420
+ 'forDerivatives': {
421
+ 'extends': 'default',
422
+ 'createOrder': {
423
+ 'triggerPrice': True,
424
+ 'selfTradePrevention': True,
425
+ },
426
+ 'fetchOpenOrders': {
427
+ 'trigger': True,
428
+ 'limit': 500,
429
+ },
430
+ },
431
+ 'swap': {
432
+ 'linear': {
433
+ 'extends': 'forDerivatives',
434
+ },
435
+ 'inverse': None,
436
+ },
437
+ 'future': {
438
+ 'linear': None,
439
+ 'inverse': None,
440
+ },
441
+ },
364
442
  'commonCurrencies': {},
365
443
  'exceptions': {
366
444
  'exact': {
@@ -582,11 +660,7 @@ class hashkey(Exchange, ImplicitAPI):
582
660
  :param str [params.symbol]: the id of the market to fetch
583
661
  :returns dict[]: an array of objects representing market data
584
662
  """
585
- symbol: Str = None
586
663
  request: dict = {}
587
- symbol, params = self.handle_option_and_params(params, 'fetchMarkets', 'symbol')
588
- if symbol is not None:
589
- request['symbol'] = symbol
590
664
  response = self.publicGetApiV1ExchangeInfo(self.extend(request, params))
591
665
  #
592
666
  # {
@@ -1254,10 +1328,6 @@ class hashkey(Exchange, ImplicitAPI):
1254
1328
  if marketType == 'spot':
1255
1329
  if market is not None:
1256
1330
  request['symbol'] = market['id']
1257
- clientOrderId: Str = None
1258
- clientOrderId, params = self.handle_option_and_params(params, methodName, 'clientOrderId')
1259
- if clientOrderId is not None:
1260
- request['clientOrderId'] = clientOrderId
1261
1331
  if accountId is not None:
1262
1332
  request['accountId'] = accountId
1263
1333
  response = self.privateGetApiV1AccountTrades(self.extend(request, params))
@@ -1601,10 +1671,6 @@ class hashkey(Exchange, ImplicitAPI):
1601
1671
  self.load_markets()
1602
1672
  symbols = self.market_symbols(symbols)
1603
1673
  request: dict = {}
1604
- symbol: Str = None
1605
- symbol, params = self.handle_option_and_params(params, 'fetchLastPrices', 'symbol')
1606
- if symbol is not None:
1607
- request['symbol'] = symbol
1608
1674
  response = self.publicGetQuoteV1TickerPrice(self.extend(request, params))
1609
1675
  #
1610
1676
  # [
@@ -1662,10 +1728,6 @@ class hashkey(Exchange, ImplicitAPI):
1662
1728
  balance = self.safe_dict(response, 0, {})
1663
1729
  return self.parse_swap_balance(balance)
1664
1730
  elif marketType == 'spot':
1665
- accountId: Str = None
1666
- accountId, params = self.handle_option_and_params(params, methodName, 'accountId')
1667
- if accountId is not None:
1668
- request['accountId'] = accountId
1669
1731
  response = self.privateGetApiV1Account(self.extend(request, params))
1670
1732
  #
1671
1733
  # {
@@ -1931,18 +1993,10 @@ class hashkey(Exchange, ImplicitAPI):
1931
1993
  }
1932
1994
  if tag is not None:
1933
1995
  request['addressExt'] = tag
1934
- clientOrderId: Str = None
1935
- clientOrderId, params = self.handle_option_and_params(params, 'withdraw', 'clientOrderId')
1936
- if clientOrderId is not None:
1937
- request['clientOrderId'] = clientOrderId
1938
1996
  networkCode: Str = None
1939
1997
  networkCode, params = self.handle_network_code_and_params(params)
1940
1998
  if networkCode is not None:
1941
1999
  request['chainType'] = self.network_code_to_id(networkCode)
1942
- platform: Str = None
1943
- platform, params = self.handle_option_and_params(params, 'withdraw', 'platform')
1944
- if platform is not None:
1945
- request['platform'] = platform
1946
2000
  response = self.privatePostApiV1AccountWithdraw(self.extend(request, params))
1947
2001
  #
1948
2002
  # {
@@ -2081,14 +2135,6 @@ class hashkey(Exchange, ImplicitAPI):
2081
2135
  'fromAccountId': fromAccount,
2082
2136
  'toAccountId': toAccount,
2083
2137
  }
2084
- clientOrderId: Str = None
2085
- clientOrderId, params = self.handle_option_and_params(params, 'transfer', 'clientOrderId')
2086
- if clientOrderId is not None:
2087
- request['clientOrderId'] = clientOrderId
2088
- remark: Str = None
2089
- remark, params = self.handle_option_and_params(params, 'transfer', 'remark')
2090
- if remark is not None:
2091
- request['remark'] = remark
2092
2138
  response = self.privatePostApiV1AccountAssetTransfer(self.extend(request, params))
2093
2139
  #
2094
2140
  # {
@@ -2926,10 +2972,6 @@ class hashkey(Exchange, ImplicitAPI):
2926
2972
  if marketType == 'spot':
2927
2973
  if clientOrderId is not None:
2928
2974
  request['origClientOrderId'] = clientOrderId
2929
- accountId: Str = None
2930
- accountId, params = self.handle_option_and_params(params, methodName, 'accountId')
2931
- if accountId is not None:
2932
- request['accountId'] = accountId
2933
2975
  response = self.privateGetApiV1SpotOrder(self.extend(request, params))
2934
2976
  #
2935
2977
  # {
@@ -3065,14 +3107,6 @@ class hashkey(Exchange, ImplicitAPI):
3065
3107
  request['symbol'] = market['id']
3066
3108
  if limit is not None:
3067
3109
  request['limit'] = limit
3068
- orderId: Str = None
3069
- orderId, params = self.handle_option_and_params(params, methodName, 'orderId')
3070
- if orderId is not None:
3071
- request['orderId'] = orderId
3072
- side: Str = None
3073
- side, params = self.handle_option_and_params(params, methodName, 'side')
3074
- if side is not None:
3075
- request['side'] = side.upper()
3076
3110
  response = self.privateGetApiV1SpotOpenOrders(self.extend(request, params))
3077
3111
  #
3078
3112
  # [
@@ -3138,10 +3172,6 @@ class hashkey(Exchange, ImplicitAPI):
3138
3172
  request['type'] = 'LIMIT'
3139
3173
  if limit is not None:
3140
3174
  request['limit'] = limit
3141
- fromOrderId: Str = None
3142
- fromOrderId, params = self.handle_option_and_params(params, methodName, 'fromOrderId')
3143
- if fromOrderId is not None:
3144
- request['fromOrderId'] = fromOrderId
3145
3175
  response = None
3146
3176
  accountId: Str = None
3147
3177
  accountId, params = self.handle_option_and_params(params, methodName, 'accountId')
@@ -3240,14 +3270,6 @@ class hashkey(Exchange, ImplicitAPI):
3240
3270
  if marketType == 'spot':
3241
3271
  if market is not None:
3242
3272
  request['symbol'] = market['id']
3243
- orderId: Str = None
3244
- orderId, params = self.handle_option_and_params(params, methodName, 'orderId')
3245
- if orderId is not None:
3246
- request['orderId'] = orderId
3247
- side: Str = None
3248
- side, params = self.handle_option_and_params(params, methodName, 'side')
3249
- if side is not None:
3250
- request['side'] = side.upper()
3251
3273
  if accountId is not None:
3252
3274
  request['accountId'] = accountId
3253
3275
  response = self.privateGetApiV1SpotTradeOrders(self.extend(request, params))
@@ -3290,10 +3312,6 @@ class hashkey(Exchange, ImplicitAPI):
3290
3312
  request['type'] = 'STOP'
3291
3313
  else:
3292
3314
  request['type'] = 'LIMIT'
3293
- fromOrderId: Str = None
3294
- fromOrderId, params = self.handle_option_and_params(params, methodName, 'fromOrderId')
3295
- if fromOrderId is not None:
3296
- request['fromOrderId'] = fromOrderId
3297
3315
  if accountId is not None:
3298
3316
  request['subAccountId'] = accountId
3299
3317
  response = self.privateGetApiV1FuturesSubAccountHistoryOrders(self.extend(request, params))
@@ -3477,7 +3495,6 @@ class hashkey(Exchange, ImplicitAPI):
3477
3495
  feeCurrncyId = self.safe_string(order, 'feeCoin')
3478
3496
  if feeCurrncyId == '':
3479
3497
  feeCurrncyId = None
3480
- triggerPrice = self.omit_zero(self.safe_string(order, 'stopPrice'))
3481
3498
  return self.safe_order({
3482
3499
  'id': self.safe_string(order, 'orderId'),
3483
3500
  'clientOrderId': self.safe_string(order, 'clientOrderId'),
@@ -3495,8 +3512,7 @@ class hashkey(Exchange, ImplicitAPI):
3495
3512
  'amount': self.omit_zero(self.safe_string(order, 'origQty')),
3496
3513
  'filled': self.safe_string(order, 'executedQty'),
3497
3514
  'remaining': None,
3498
- 'stopPrice': triggerPrice,
3499
- 'triggerPrice': triggerPrice,
3515
+ 'triggerPrice': self.omit_zero(self.safe_string(order, 'stopPrice')),
3500
3516
  'takeProfitPrice': None,
3501
3517
  'stopLossPrice': None,
3502
3518
  'cost': self.omit_zero(self.safe_string_2(order, 'cumulativeQuoteQty', 'cummulativeQuoteQty')),
@@ -3730,10 +3746,6 @@ class hashkey(Exchange, ImplicitAPI):
3730
3746
  request: dict = {
3731
3747
  'symbol': market['id'],
3732
3748
  }
3733
- side: Str = None
3734
- side, params = self.handle_option_and_params(params, methodName, 'side')
3735
- if side is not None:
3736
- request['side'] = side.upper()
3737
3749
  response = self.privateGetApiV1FuturesPositions(self.extend(request, params))
3738
3750
  #
3739
3751
  # [