ccxt 4.4.38__py2.py3-none-any.whl → 4.4.40__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 (140) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/digifinex.py +1 -0
  3. ccxt/abstract/mexc.py +1 -0
  4. ccxt/abstract/woo.py +2 -2
  5. ccxt/alpaca.py +74 -3
  6. ccxt/ascendex.py +9 -9
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/alpaca.py +74 -3
  9. ccxt/async_support/ascendex.py +9 -9
  10. ccxt/async_support/base/exchange.py +1 -1
  11. ccxt/async_support/base/ws/aiohttp_client.py +2 -2
  12. ccxt/async_support/binance.py +13 -17
  13. ccxt/async_support/bingx.py +1 -2
  14. ccxt/async_support/bit2c.py +0 -1
  15. ccxt/async_support/bitbank.py +0 -1
  16. ccxt/async_support/bitbns.py +0 -1
  17. ccxt/async_support/bitfinex.py +15 -16
  18. ccxt/async_support/bitfinex1.py +0 -1
  19. ccxt/async_support/bitflyer.py +0 -1
  20. ccxt/async_support/bitget.py +1 -2
  21. ccxt/async_support/bithumb.py +0 -1
  22. ccxt/async_support/bitmart.py +3 -4
  23. ccxt/async_support/bitmex.py +5 -6
  24. ccxt/async_support/bitopro.py +4 -5
  25. ccxt/async_support/bitrue.py +5 -7
  26. ccxt/async_support/bitso.py +1 -2
  27. ccxt/async_support/bitstamp.py +1 -2
  28. ccxt/async_support/bitteam.py +1 -3
  29. ccxt/async_support/bitvavo.py +2 -4
  30. ccxt/async_support/blockchaincom.py +5 -5
  31. ccxt/async_support/blofin.py +10 -10
  32. ccxt/async_support/btcalpha.py +0 -1
  33. ccxt/async_support/btcbox.py +0 -1
  34. ccxt/async_support/btcmarkets.py +1 -3
  35. ccxt/async_support/bybit.py +2 -3
  36. ccxt/async_support/cex.py +1 -1
  37. ccxt/async_support/coinbase.py +77 -1
  38. ccxt/async_support/coinbaseexchange.py +1 -1
  39. ccxt/async_support/coinbaseinternational.py +62 -0
  40. ccxt/async_support/coincatch.py +1 -1
  41. ccxt/async_support/coinex.py +9 -9
  42. ccxt/async_support/coinlist.py +1 -1
  43. ccxt/async_support/coinmetro.py +1 -1
  44. ccxt/async_support/cryptocom.py +91 -2
  45. ccxt/async_support/currencycom.py +1 -1
  46. ccxt/async_support/defx.py +1 -2
  47. ccxt/async_support/delta.py +1 -1
  48. ccxt/async_support/digifinex.py +58 -19
  49. ccxt/async_support/exmo.py +2 -2
  50. ccxt/async_support/gate.py +1 -1
  51. ccxt/async_support/hashkey.py +3 -5
  52. ccxt/async_support/htx.py +155 -33
  53. ccxt/async_support/hyperliquid.py +1 -1
  54. ccxt/async_support/kraken.py +1 -1
  55. ccxt/async_support/kucoin.py +25 -24
  56. ccxt/async_support/luno.py +1 -1
  57. ccxt/async_support/mexc.py +173 -26
  58. ccxt/async_support/ndax.py +1 -1
  59. ccxt/async_support/okcoin.py +18 -18
  60. ccxt/async_support/okx.py +22 -21
  61. ccxt/async_support/phemex.py +12 -8
  62. ccxt/async_support/poloniex.py +1 -1
  63. ccxt/async_support/poloniexfutures.py +6 -6
  64. ccxt/async_support/vertex.py +11 -11
  65. ccxt/async_support/woo.py +39 -39
  66. ccxt/async_support/woofipro.py +24 -24
  67. ccxt/async_support/xt.py +26 -26
  68. ccxt/async_support/zonda.py +1 -1
  69. ccxt/base/exchange.py +32 -25
  70. ccxt/binance.py +13 -17
  71. ccxt/bingx.py +1 -2
  72. ccxt/bit2c.py +0 -1
  73. ccxt/bitbank.py +0 -1
  74. ccxt/bitbns.py +0 -1
  75. ccxt/bitfinex.py +15 -16
  76. ccxt/bitfinex1.py +0 -1
  77. ccxt/bitflyer.py +0 -1
  78. ccxt/bitget.py +1 -2
  79. ccxt/bithumb.py +0 -1
  80. ccxt/bitmart.py +3 -4
  81. ccxt/bitmex.py +5 -6
  82. ccxt/bitopro.py +4 -5
  83. ccxt/bitrue.py +5 -7
  84. ccxt/bitso.py +1 -2
  85. ccxt/bitstamp.py +1 -2
  86. ccxt/bitteam.py +1 -3
  87. ccxt/bitvavo.py +2 -4
  88. ccxt/blockchaincom.py +5 -5
  89. ccxt/blofin.py +10 -10
  90. ccxt/btcalpha.py +0 -1
  91. ccxt/btcbox.py +0 -1
  92. ccxt/btcmarkets.py +1 -3
  93. ccxt/bybit.py +2 -3
  94. ccxt/cex.py +1 -1
  95. ccxt/coinbase.py +77 -1
  96. ccxt/coinbaseexchange.py +1 -1
  97. ccxt/coinbaseinternational.py +62 -0
  98. ccxt/coincatch.py +1 -1
  99. ccxt/coinex.py +9 -9
  100. ccxt/coinlist.py +1 -1
  101. ccxt/coinmetro.py +1 -1
  102. ccxt/cryptocom.py +91 -2
  103. ccxt/currencycom.py +1 -1
  104. ccxt/defx.py +1 -2
  105. ccxt/delta.py +1 -1
  106. ccxt/digifinex.py +58 -19
  107. ccxt/exmo.py +2 -2
  108. ccxt/gate.py +1 -1
  109. ccxt/hashkey.py +3 -5
  110. ccxt/htx.py +155 -33
  111. ccxt/hyperliquid.py +1 -1
  112. ccxt/kraken.py +1 -1
  113. ccxt/kucoin.py +25 -24
  114. ccxt/luno.py +1 -1
  115. ccxt/mexc.py +173 -26
  116. ccxt/ndax.py +1 -1
  117. ccxt/okcoin.py +18 -18
  118. ccxt/okx.py +22 -21
  119. ccxt/phemex.py +12 -8
  120. ccxt/poloniex.py +1 -1
  121. ccxt/poloniexfutures.py +6 -6
  122. ccxt/pro/__init__.py +1 -1
  123. ccxt/pro/bitget.py +1 -1
  124. ccxt/pro/bybit.py +12 -1
  125. ccxt/pro/coinex.py +2 -2
  126. ccxt/pro/gate.py +6 -6
  127. ccxt/pro/kucoin.py +3 -3
  128. ccxt/pro/okx.py +11 -11
  129. ccxt/pro/upbit.py +2 -2
  130. ccxt/pro/woo.py +1 -1
  131. ccxt/vertex.py +11 -11
  132. ccxt/woo.py +39 -39
  133. ccxt/woofipro.py +24 -24
  134. ccxt/xt.py +26 -26
  135. ccxt/zonda.py +1 -1
  136. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
  137. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/RECORD +140 -140
  138. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
  139. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
  140. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
ccxt/htx.py CHANGED
@@ -1250,6 +1250,128 @@ class htx(Exchange, ImplicitAPI):
1250
1250
  'BIFI': 'BITCOINFILE', # conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706
1251
1251
  'FUD': 'FTX Users Debt',
1252
1252
  },
1253
+ 'features': {
1254
+ 'spot': {
1255
+ 'sandbox': True,
1256
+ 'createOrder': {
1257
+ 'marginMode': True,
1258
+ 'triggerPrice': True,
1259
+ 'triggerDirection': True,
1260
+ 'triggerPriceType': None,
1261
+ 'stopLossPrice': False, # todo: add support by triggerprice
1262
+ 'takeProfitPrice': False,
1263
+ 'attachedStopLossTakeProfit': None,
1264
+ 'timeInForce': {
1265
+ 'IOC': True,
1266
+ 'FOK': True,
1267
+ 'PO': True,
1268
+ 'GTD': False,
1269
+ },
1270
+ 'hedged': False,
1271
+ 'trailing': False,
1272
+ # exchange-specific features
1273
+ 'iceberg': False,
1274
+ 'selfTradePrevention': True,
1275
+ },
1276
+ 'createOrders': {
1277
+ 'max': 10,
1278
+ },
1279
+ 'fetchMyTrades': {
1280
+ 'marginMode': False,
1281
+ 'limit': 500,
1282
+ 'daysBack': 120,
1283
+ 'untilDays': 2,
1284
+ },
1285
+ 'fetchOrder': {
1286
+ 'marginMode': False,
1287
+ 'trigger': False,
1288
+ 'trailing': False,
1289
+ },
1290
+ 'fetchOpenOrders': {
1291
+ 'marginMode': False,
1292
+ 'trigger': True,
1293
+ 'trailing': False,
1294
+ 'limit': 500,
1295
+ },
1296
+ 'fetchOrders': {
1297
+ 'marginMode': False,
1298
+ 'trigger': True,
1299
+ 'trailing': False,
1300
+ 'limit': 500,
1301
+ 'untilDays': 2,
1302
+ 'daysBack': 180,
1303
+ },
1304
+ 'fetchClosedOrders': {
1305
+ 'marginMode': False,
1306
+ 'trigger': True,
1307
+ 'trailing': False,
1308
+ 'untilDays': 2,
1309
+ 'limit': 500,
1310
+ 'daysBackClosed': 180,
1311
+ 'daysBackCanceled': 1 / 12,
1312
+ },
1313
+ 'fetchOHLCV': {
1314
+ 'limit': 1000, # 2000 for non-historical
1315
+ },
1316
+ },
1317
+ 'forDerivatives': {
1318
+ 'extends': 'spot',
1319
+ 'createOrder': {
1320
+ 'stopLossPrice': True,
1321
+ 'takeProfitPrice': True,
1322
+ 'trailing': True,
1323
+ 'hedged': True,
1324
+ # 'leverage': True, # todo
1325
+ },
1326
+ 'createOrders': {
1327
+ 'max': 25,
1328
+ },
1329
+ 'fetchOrder': {
1330
+ 'marginMode': True,
1331
+ },
1332
+ 'fetchOpenOrders': {
1333
+ 'marginMode': True,
1334
+ 'trigger': False,
1335
+ 'trailing': False,
1336
+ 'limit': 50,
1337
+ },
1338
+ 'fetchOrders': {
1339
+ 'marginMode': True,
1340
+ 'trigger': False,
1341
+ 'trailing': False,
1342
+ 'limit': 50,
1343
+ 'daysBack': 90,
1344
+ },
1345
+ 'fetchClosedOrders': {
1346
+ 'marginMode': True,
1347
+ 'trigger': False,
1348
+ 'trailing': False,
1349
+ 'untilDays': 2,
1350
+ 'limit': 50,
1351
+ 'daysBackClosed': 90,
1352
+ 'daysBackCanceled': 1 / 12,
1353
+ },
1354
+ 'fetchOHLCV': {
1355
+ 'limit': 2000,
1356
+ },
1357
+ },
1358
+ 'swap': {
1359
+ 'linear': {
1360
+ 'extends': 'forDerivatives',
1361
+ },
1362
+ 'inverse': {
1363
+ 'extends': 'forDerivatives',
1364
+ },
1365
+ },
1366
+ 'future': {
1367
+ 'linear': {
1368
+ 'extends': 'forDerivatives',
1369
+ },
1370
+ 'inverse': {
1371
+ 'extends': 'forDerivatives',
1372
+ },
1373
+ },
1374
+ },
1253
1375
  })
1254
1376
 
1255
1377
  def fetch_status(self, params={}):
@@ -3864,11 +3986,11 @@ class htx(Exchange, ImplicitAPI):
3864
3986
  'status': '0', # support multiple query seperated by ',',such as '3,4,5', 0: all. 3. Have sumbmitted the orders; 4. Orders partially matched; 5. Orders cancelled with partially matched; 6. Orders fully matched; 7. Orders cancelled
3865
3987
  }
3866
3988
  response = None
3867
- stop = self.safe_bool_2(params, 'stop', 'trigger')
3989
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
3868
3990
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
3869
3991
  trailing = self.safe_bool(params, 'trailing', False)
3870
3992
  params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
3871
- if stop or stopLossTakeProfit or trailing:
3993
+ if trigger or stopLossTakeProfit or trailing:
3872
3994
  if limit is not None:
3873
3995
  request['page_size'] = limit
3874
3996
  request['contract_code'] = market['id']
@@ -3885,7 +4007,7 @@ class htx(Exchange, ImplicitAPI):
3885
4007
  marginMode, params = self.handle_margin_mode_and_params('fetchContractOrders', params)
3886
4008
  marginMode = 'cross' if (marginMode is None) else marginMode
3887
4009
  if marginMode == 'isolated':
3888
- if stop:
4010
+ if trigger:
3889
4011
  response = self.contractPrivatePostLinearSwapApiV1SwapTriggerHisorders(self.extend(request, params))
3890
4012
  elif stopLossTakeProfit:
3891
4013
  response = self.contractPrivatePostLinearSwapApiV1SwapTpslHisorders(self.extend(request, params))
@@ -3894,7 +4016,7 @@ class htx(Exchange, ImplicitAPI):
3894
4016
  else:
3895
4017
  response = self.contractPrivatePostLinearSwapApiV3SwapHisorders(self.extend(request, params))
3896
4018
  elif marginMode == 'cross':
3897
- if stop:
4019
+ if trigger:
3898
4020
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerHisorders(self.extend(request, params))
3899
4021
  elif stopLossTakeProfit:
3900
4022
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTpslHisorders(self.extend(request, params))
@@ -3904,7 +4026,7 @@ class htx(Exchange, ImplicitAPI):
3904
4026
  response = self.contractPrivatePostLinearSwapApiV3SwapCrossHisorders(self.extend(request, params))
3905
4027
  elif market['inverse']:
3906
4028
  if market['swap']:
3907
- if stop:
4029
+ if trigger:
3908
4030
  response = self.contractPrivatePostSwapApiV1SwapTriggerHisorders(self.extend(request, params))
3909
4031
  elif stopLossTakeProfit:
3910
4032
  response = self.contractPrivatePostSwapApiV1SwapTpslHisorders(self.extend(request, params))
@@ -3914,7 +4036,7 @@ class htx(Exchange, ImplicitAPI):
3914
4036
  response = self.contractPrivatePostSwapApiV3SwapHisorders(self.extend(request, params))
3915
4037
  elif market['future']:
3916
4038
  request['symbol'] = market['settleId']
3917
- if stop:
4039
+ if trigger:
3918
4040
  response = self.contractPrivatePostApiV1ContractTriggerHisorders(self.extend(request, params))
3919
4041
  elif stopLossTakeProfit:
3920
4042
  response = self.contractPrivatePostApiV1ContractTpslHisorders(self.extend(request, params))
@@ -4090,7 +4212,7 @@ class htx(Exchange, ImplicitAPI):
4090
4212
  :param int [since]: the earliest time in ms to fetch orders for
4091
4213
  :param int [limit]: the maximum number of order structures to retrieve
4092
4214
  :param dict [params]: extra parameters specific to the exchange API endpoint
4093
- :param bool [params.stop]: *contract only* if the orders are stop trigger orders or not
4215
+ :param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
4094
4216
  :param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
4095
4217
  :param int [params.until]: the latest time in ms to fetch entries for
4096
4218
  :param boolean [params.trailing]: *contract only* set to True if you want to fetch trailing stop orders
@@ -4156,7 +4278,7 @@ class htx(Exchange, ImplicitAPI):
4156
4278
  :param int [since]: the earliest time in ms to fetch open orders for
4157
4279
  :param int [limit]: the maximum number of open order structures to retrieve
4158
4280
  :param dict [params]: extra parameters specific to the exchange API endpoint
4159
- :param bool [params.stop]: *contract only* if the orders are stop trigger orders or not
4281
+ :param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
4160
4282
  :param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
4161
4283
  :param boolean [params.trailing]: *contract only* set to True if you want to fetch trailing stop orders
4162
4284
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -4194,7 +4316,7 @@ class htx(Exchange, ImplicitAPI):
4194
4316
  if limit is not None:
4195
4317
  request['page_size'] = limit
4196
4318
  request['contract_code'] = market['id']
4197
- stop = self.safe_bool_2(params, 'stop', 'trigger')
4319
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
4198
4320
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
4199
4321
  trailing = self.safe_bool(params, 'trailing', False)
4200
4322
  params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
@@ -4203,7 +4325,7 @@ class htx(Exchange, ImplicitAPI):
4203
4325
  marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
4204
4326
  marginMode = 'cross' if (marginMode is None) else marginMode
4205
4327
  if marginMode == 'isolated':
4206
- if stop:
4328
+ if trigger:
4207
4329
  response = self.contractPrivatePostLinearSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
4208
4330
  elif stopLossTakeProfit:
4209
4331
  response = self.contractPrivatePostLinearSwapApiV1SwapTpslOpenorders(self.extend(request, params))
@@ -4212,7 +4334,7 @@ class htx(Exchange, ImplicitAPI):
4212
4334
  else:
4213
4335
  response = self.contractPrivatePostLinearSwapApiV1SwapOpenorders(self.extend(request, params))
4214
4336
  elif marginMode == 'cross':
4215
- if stop:
4337
+ if trigger:
4216
4338
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerOpenorders(self.extend(request, params))
4217
4339
  elif stopLossTakeProfit:
4218
4340
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTpslOpenorders(self.extend(request, params))
@@ -4222,7 +4344,7 @@ class htx(Exchange, ImplicitAPI):
4222
4344
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossOpenorders(self.extend(request, params))
4223
4345
  elif market['inverse']:
4224
4346
  if market['swap']:
4225
- if stop:
4347
+ if trigger:
4226
4348
  response = self.contractPrivatePostSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
4227
4349
  elif stopLossTakeProfit:
4228
4350
  response = self.contractPrivatePostSwapApiV1SwapTpslOpenorders(self.extend(request, params))
@@ -4232,7 +4354,7 @@ class htx(Exchange, ImplicitAPI):
4232
4354
  response = self.contractPrivatePostSwapApiV1SwapOpenorders(self.extend(request, params))
4233
4355
  elif market['future']:
4234
4356
  request['symbol'] = market['settleId']
4235
- if stop:
4357
+ if trigger:
4236
4358
  response = self.contractPrivatePostApiV1ContractTriggerOpenorders(self.extend(request, params))
4237
4359
  elif stopLossTakeProfit:
4238
4360
  response = self.contractPrivatePostApiV1ContractTpslOpenorders(self.extend(request, params))
@@ -4958,7 +5080,7 @@ class htx(Exchange, ImplicitAPI):
4958
5080
  if triggerPrice is None:
4959
5081
  stopOrderTypes = self.safe_value(options, 'stopOrderTypes', {})
4960
5082
  if orderType in stopOrderTypes:
4961
- raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice for a stop order')
5083
+ raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice for a trigger order')
4962
5084
  else:
4963
5085
  defaultOperator = 'lte' if (side == 'sell') else 'gte'
4964
5086
  stopOperator = self.safe_string(params, 'operator', defaultOperator)
@@ -5394,7 +5516,7 @@ class htx(Exchange, ImplicitAPI):
5394
5516
  :param str id: order id
5395
5517
  :param str symbol: unified symbol of the market the order was made in
5396
5518
  :param dict [params]: extra parameters specific to the exchange API endpoint
5397
- :param boolean [params.stop]: *contract only* if the order is a stop trigger order or not
5519
+ :param boolean [params.trigger]: *contract only* if the order is a trigger trigger order or not
5398
5520
  :param boolean [params.stopLossTakeProfit]: *contract only* if the order is a stop-loss or take-profit order
5399
5521
  :param boolean [params.trailing]: *contract only* set to True if you want to cancel a trailing order
5400
5522
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -5440,7 +5562,7 @@ class htx(Exchange, ImplicitAPI):
5440
5562
  request['symbol'] = market['settleId']
5441
5563
  else:
5442
5564
  request['contract_code'] = market['id']
5443
- stop = self.safe_bool_2(params, 'stop', 'trigger')
5565
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
5444
5566
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5445
5567
  trailing = self.safe_bool(params, 'trailing', False)
5446
5568
  params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
@@ -5449,7 +5571,7 @@ class htx(Exchange, ImplicitAPI):
5449
5571
  marginMode, params = self.handle_margin_mode_and_params('cancelOrder', params)
5450
5572
  marginMode = 'cross' if (marginMode is None) else marginMode
5451
5573
  if marginMode == 'isolated':
5452
- if stop:
5574
+ if trigger:
5453
5575
  response = self.contractPrivatePostLinearSwapApiV1SwapTriggerCancel(self.extend(request, params))
5454
5576
  elif stopLossTakeProfit:
5455
5577
  response = self.contractPrivatePostLinearSwapApiV1SwapTpslCancel(self.extend(request, params))
@@ -5458,7 +5580,7 @@ class htx(Exchange, ImplicitAPI):
5458
5580
  else:
5459
5581
  response = self.contractPrivatePostLinearSwapApiV1SwapCancel(self.extend(request, params))
5460
5582
  elif marginMode == 'cross':
5461
- if stop:
5583
+ if trigger:
5462
5584
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancel(self.extend(request, params))
5463
5585
  elif stopLossTakeProfit:
5464
5586
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancel(self.extend(request, params))
@@ -5468,7 +5590,7 @@ class htx(Exchange, ImplicitAPI):
5468
5590
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossCancel(self.extend(request, params))
5469
5591
  elif market['inverse']:
5470
5592
  if market['swap']:
5471
- if stop:
5593
+ if trigger:
5472
5594
  response = self.contractPrivatePostSwapApiV1SwapTriggerCancel(self.extend(request, params))
5473
5595
  elif stopLossTakeProfit:
5474
5596
  response = self.contractPrivatePostSwapApiV1SwapTpslCancel(self.extend(request, params))
@@ -5477,7 +5599,7 @@ class htx(Exchange, ImplicitAPI):
5477
5599
  else:
5478
5600
  response = self.contractPrivatePostSwapApiV1SwapCancel(self.extend(request, params))
5479
5601
  elif market['future']:
5480
- if stop:
5602
+ if trigger:
5481
5603
  response = self.contractPrivatePostApiV1ContractTriggerCancel(self.extend(request, params))
5482
5604
  elif stopLossTakeProfit:
5483
5605
  response = self.contractPrivatePostApiV1ContractTpslCancel(self.extend(request, params))
@@ -5517,7 +5639,7 @@ class htx(Exchange, ImplicitAPI):
5517
5639
  :param str[] ids: order ids
5518
5640
  :param str symbol: unified market symbol, default is None
5519
5641
  :param dict [params]: extra parameters specific to the exchange API endpoint
5520
- :param bool [params.stop]: *contract only* if the orders are stop trigger orders or not
5642
+ :param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
5521
5643
  :param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
5522
5644
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
5523
5645
  """
@@ -5567,7 +5689,7 @@ class htx(Exchange, ImplicitAPI):
5567
5689
  request['symbol'] = market['settleId']
5568
5690
  else:
5569
5691
  request['contract_code'] = market['id']
5570
- stop = self.safe_bool_2(params, 'stop', 'trigger')
5692
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
5571
5693
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5572
5694
  params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trigger'])
5573
5695
  if market['linear']:
@@ -5575,14 +5697,14 @@ class htx(Exchange, ImplicitAPI):
5575
5697
  marginMode, params = self.handle_margin_mode_and_params('cancelOrders', params)
5576
5698
  marginMode = 'cross' if (marginMode is None) else marginMode
5577
5699
  if marginMode == 'isolated':
5578
- if stop:
5700
+ if trigger:
5579
5701
  response = self.contractPrivatePostLinearSwapApiV1SwapTriggerCancel(self.extend(request, params))
5580
5702
  elif stopLossTakeProfit:
5581
5703
  response = self.contractPrivatePostLinearSwapApiV1SwapTpslCancel(self.extend(request, params))
5582
5704
  else:
5583
5705
  response = self.contractPrivatePostLinearSwapApiV1SwapCancel(self.extend(request, params))
5584
5706
  elif marginMode == 'cross':
5585
- if stop:
5707
+ if trigger:
5586
5708
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancel(self.extend(request, params))
5587
5709
  elif stopLossTakeProfit:
5588
5710
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancel(self.extend(request, params))
@@ -5590,14 +5712,14 @@ class htx(Exchange, ImplicitAPI):
5590
5712
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossCancel(self.extend(request, params))
5591
5713
  elif market['inverse']:
5592
5714
  if market['swap']:
5593
- if stop:
5715
+ if trigger:
5594
5716
  response = self.contractPrivatePostSwapApiV1SwapTriggerCancel(self.extend(request, params))
5595
5717
  elif stopLossTakeProfit:
5596
5718
  response = self.contractPrivatePostSwapApiV1SwapTpslCancel(self.extend(request, params))
5597
5719
  else:
5598
5720
  response = self.contractPrivatePostSwapApiV1SwapCancel(self.extend(request, params))
5599
5721
  elif market['future']:
5600
- if stop:
5722
+ if trigger:
5601
5723
  response = self.contractPrivatePostApiV1ContractTriggerCancel(self.extend(request, params))
5602
5724
  elif stopLossTakeProfit:
5603
5725
  response = self.contractPrivatePostApiV1ContractTpslCancel(self.extend(request, params))
@@ -5718,7 +5840,7 @@ class htx(Exchange, ImplicitAPI):
5718
5840
  cancel all open orders
5719
5841
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
5720
5842
  :param dict [params]: extra parameters specific to the exchange API endpoint
5721
- :param boolean [params.stop]: *contract only* if the orders are stop trigger orders or not
5843
+ :param boolean [params.trigger]: *contract only* if the orders are trigger trigger orders or not
5722
5844
  :param boolean [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
5723
5845
  :param boolean [params.trailing]: *contract only* set to True if you want to cancel all trailing orders
5724
5846
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -5770,7 +5892,7 @@ class htx(Exchange, ImplicitAPI):
5770
5892
  if market['future']:
5771
5893
  request['symbol'] = market['settleId']
5772
5894
  request['contract_code'] = market['id']
5773
- stop = self.safe_bool_2(params, 'stop', 'trigger')
5895
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
5774
5896
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5775
5897
  trailing = self.safe_bool(params, 'trailing', False)
5776
5898
  params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
@@ -5779,7 +5901,7 @@ class htx(Exchange, ImplicitAPI):
5779
5901
  marginMode, params = self.handle_margin_mode_and_params('cancelAllOrders', params)
5780
5902
  marginMode = 'cross' if (marginMode is None) else marginMode
5781
5903
  if marginMode == 'isolated':
5782
- if stop:
5904
+ if trigger:
5783
5905
  response = self.contractPrivatePostLinearSwapApiV1SwapTriggerCancelall(self.extend(request, params))
5784
5906
  elif stopLossTakeProfit:
5785
5907
  response = self.contractPrivatePostLinearSwapApiV1SwapTpslCancelall(self.extend(request, params))
@@ -5788,7 +5910,7 @@ class htx(Exchange, ImplicitAPI):
5788
5910
  else:
5789
5911
  response = self.contractPrivatePostLinearSwapApiV1SwapCancelall(self.extend(request, params))
5790
5912
  elif marginMode == 'cross':
5791
- if stop:
5913
+ if trigger:
5792
5914
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancelall(self.extend(request, params))
5793
5915
  elif stopLossTakeProfit:
5794
5916
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancelall(self.extend(request, params))
@@ -5798,7 +5920,7 @@ class htx(Exchange, ImplicitAPI):
5798
5920
  response = self.contractPrivatePostLinearSwapApiV1SwapCrossCancelall(self.extend(request, params))
5799
5921
  elif market['inverse']:
5800
5922
  if market['swap']:
5801
- if stop:
5923
+ if trigger:
5802
5924
  response = self.contractPrivatePostSwapApiV1SwapTriggerCancelall(self.extend(request, params))
5803
5925
  elif stopLossTakeProfit:
5804
5926
  response = self.contractPrivatePostSwapApiV1SwapTpslCancelall(self.extend(request, params))
@@ -5807,7 +5929,7 @@ class htx(Exchange, ImplicitAPI):
5807
5929
  else:
5808
5930
  response = self.contractPrivatePostSwapApiV1SwapCancelall(self.extend(request, params))
5809
5931
  elif market['future']:
5810
- if stop:
5932
+ if trigger:
5811
5933
  response = self.contractPrivatePostApiV1ContractTriggerCancelall(self.extend(request, params))
5812
5934
  elif stopLossTakeProfit:
5813
5935
  response = self.contractPrivatePostApiV1ContractTpslCancelall(self.extend(request, params))
@@ -7641,7 +7763,7 @@ class htx(Exchange, ImplicitAPI):
7641
7763
  :param dict [params]: extra parameters specific to the exchange API endpoint
7642
7764
  :param int [params.until]: the latest time in ms to fetch entries for
7643
7765
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
7644
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
7766
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
7645
7767
  """
7646
7768
  self.load_markets()
7647
7769
  paginate = False
ccxt/hyperliquid.py CHANGED
@@ -2970,7 +2970,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2970
2970
  :param int [limit]: max number of ledger entries to return
2971
2971
  :param dict [params]: extra parameters specific to the exchange API endpoint
2972
2972
  :param int [params.until]: timestamp in ms of the latest ledger entry
2973
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2973
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2974
2974
  """
2975
2975
  self.load_markets()
2976
2976
  userAddress = None
ccxt/kraken.py CHANGED
@@ -1129,7 +1129,7 @@ class kraken(Exchange, ImplicitAPI):
1129
1129
  :param dict [params]: extra parameters specific to the exchange API endpoint
1130
1130
  :param int [params.until]: timestamp in ms of the latest ledger entry
1131
1131
  :param int [params.end]: timestamp in seconds of the latest ledger entry
1132
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1132
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1133
1133
  """
1134
1134
  # https://www.kraken.com/features/api#get-ledgers-info
1135
1135
  self.load_markets()
ccxt/kucoin.py CHANGED
@@ -576,6 +576,7 @@ class kucoin(Exchange, ImplicitAPI):
576
576
  '400008': NotSupported,
577
577
  '400100': InsufficientFunds, # {"msg":"account.available.amount","code":"400100"} or {"msg":"Withdrawal amount is below the minimum requirement.","code":"400100"}
578
578
  '400200': InvalidOrder, # {"code":"400200","msg":"Forbidden to place an order"}
579
+ '400330': InvalidOrder, # {"msg":"Order price can't deviate from NAV by 50%","code":"400330"}
579
580
  '400350': InvalidOrder, # {"code":"400350","msg":"Upper limit for holding: 10,000USDT, you can still buy 10,000USDT worth of coin."}
580
581
  '400370': InvalidOrder, # {"code":"400370","msg":"Max. price: 0.02500000000000000000"}
581
582
  '400400': BadRequest, # Parameter error
@@ -2212,7 +2213,7 @@ class kucoin(Exchange, ImplicitAPI):
2212
2213
  market orders --------------------------------------------------
2213
2214
  :param str [params.funds]: # Amount of quote currency to use
2214
2215
  stop orders ----------------------------------------------------
2215
- :param str [params.stop]: Either loss or entry, the default is loss. Requires stopPrice to be defined
2216
+ :param str [params.stop]: Either loss or entry, the default is loss. Requires triggerPrice to be defined
2216
2217
  margin orders --------------------------------------------------
2217
2218
  :param float [params.leverage]: Leverage size of the order
2218
2219
  :param str [params.stp]: '', # self trade prevention, CN, CO, CB or DC
@@ -2517,7 +2518,7 @@ class kucoin(Exchange, ImplicitAPI):
2517
2518
  :param str id: order id
2518
2519
  :param str symbol: unified symbol of the market the order was made in
2519
2520
  :param dict [params]: extra parameters specific to the exchange API endpoint
2520
- :param bool [params.stop]: True if cancelling a stop order
2521
+ :param bool [params.trigger]: True if cancelling a stop order
2521
2522
  :param bool [params.hf]: False, # True for hf order
2522
2523
  :param bool [params.sync]: False, # True to use the hf sync call
2523
2524
  :returns: Response from the exchange
@@ -2525,7 +2526,7 @@ class kucoin(Exchange, ImplicitAPI):
2525
2526
  self.load_markets()
2526
2527
  request: dict = {}
2527
2528
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
2528
- stop = self.safe_bool_2(params, 'stop', 'trigger', False)
2529
+ trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
2529
2530
  hf = None
2530
2531
  hf, params = self.handle_hf_and_params(params)
2531
2532
  useSync = False
@@ -2539,7 +2540,7 @@ class kucoin(Exchange, ImplicitAPI):
2539
2540
  params = self.omit(params, ['clientOid', 'clientOrderId', 'stop', 'trigger'])
2540
2541
  if clientOrderId is not None:
2541
2542
  request['clientOid'] = clientOrderId
2542
- if stop:
2543
+ if trigger:
2543
2544
  response = self.privateDeleteStopOrderCancelOrderByClientOid(self.extend(request, params))
2544
2545
  #
2545
2546
  # {
@@ -2578,7 +2579,7 @@ class kucoin(Exchange, ImplicitAPI):
2578
2579
  return self.parse_order(response)
2579
2580
  else:
2580
2581
  request['orderId'] = id
2581
- if stop:
2582
+ if trigger:
2582
2583
  response = self.privateDeleteStopOrderOrderId(self.extend(request, params))
2583
2584
  #
2584
2585
  # {
@@ -2626,7 +2627,7 @@ class kucoin(Exchange, ImplicitAPI):
2626
2627
 
2627
2628
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
2628
2629
  :param dict [params]: extra parameters specific to the exchange API endpoint
2629
- :param bool [params.stop]: *invalid for isolated margin* True if cancelling all stop orders
2630
+ :param bool [params.trigger]: *invalid for isolated margin* True if cancelling all stop orders
2630
2631
  :param str [params.marginMode]: 'cross' or 'isolated'
2631
2632
  :param str [params.orderIds]: *stop orders only* Comma seperated order IDs
2632
2633
  :param bool [params.hf]: False, # True for hf order
@@ -2634,7 +2635,7 @@ class kucoin(Exchange, ImplicitAPI):
2634
2635
  """
2635
2636
  self.load_markets()
2636
2637
  request: dict = {}
2637
- stop = self.safe_bool(params, 'stop', False)
2638
+ trigger = self.safe_bool(params, 'stop', False)
2638
2639
  hf = None
2639
2640
  hf, params = self.handle_hf_and_params(params)
2640
2641
  params = self.omit(params, 'stop')
@@ -2643,10 +2644,10 @@ class kucoin(Exchange, ImplicitAPI):
2643
2644
  request['symbol'] = self.market_id(symbol)
2644
2645
  if marginMode is not None:
2645
2646
  request['tradeType'] = self.options['marginModes'][marginMode]
2646
- if marginMode == 'isolated' and stop:
2647
+ if marginMode == 'isolated' and trigger:
2647
2648
  raise BadRequest(self.id + ' cancelAllOrders does not support isolated margin for stop orders')
2648
2649
  response = None
2649
- if stop:
2650
+ if trigger:
2650
2651
  response = self.privateDeleteStopOrderCancel(self.extend(request, query))
2651
2652
  elif hf:
2652
2653
  if symbol is None:
@@ -2675,9 +2676,9 @@ class kucoin(Exchange, ImplicitAPI):
2675
2676
  :param str [params.side]: buy or sell
2676
2677
  :param str [params.type]: limit, market, limit_stop or market_stop
2677
2678
  :param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
2678
- :param int [params.currentPage]: *stop orders only* current page
2679
- :param str [params.orderIds]: *stop orders only* comma seperated order ID list
2680
- :param bool [params.stop]: True if fetching a stop order
2679
+ :param int [params.currentPage]: *trigger orders only* current page
2680
+ :param str [params.orderIds]: *trigger orders only* comma seperated order ID list
2681
+ :param bool [params.trigger]: True if fetching a trigger order
2681
2682
  :param bool [params.hf]: False, # True for hf order
2682
2683
  :returns: An `array of order structures <https://docs.ccxt.com/#/?id=order-structure>`
2683
2684
  """
@@ -2786,7 +2787,7 @@ class kucoin(Exchange, ImplicitAPI):
2786
2787
  :param str [params.side]: buy or sell
2787
2788
  :param str [params.type]: limit, market, limit_stop or market_stop
2788
2789
  :param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
2789
- :param bool [params.stop]: True if fetching a stop order
2790
+ :param bool [params.trigger]: True if fetching a trigger order
2790
2791
  :param bool [params.hf]: False, # True for hf order
2791
2792
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2792
2793
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2812,12 +2813,12 @@ class kucoin(Exchange, ImplicitAPI):
2812
2813
  :param int [limit]: the maximum number of open orders structures to retrieve
2813
2814
  :param dict [params]: extra parameters specific to the exchange API endpoint
2814
2815
  :param int [params.until]: end time in ms
2815
- :param bool [params.stop]: True if fetching stop orders
2816
+ :param bool [params.trigger]: True if fetching trigger orders
2816
2817
  :param str [params.side]: buy or sell
2817
2818
  :param str [params.type]: limit, market, limit_stop or market_stop
2818
2819
  :param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
2819
- :param int [params.currentPage]: *stop orders only* current page
2820
- :param str [params.orderIds]: *stop orders only* comma seperated order ID list
2820
+ :param int [params.currentPage]: *trigger orders only* current page
2821
+ :param str [params.orderIds]: *trigger orders only* comma seperated order ID list
2821
2822
  :param bool [params.hf]: False, # True for hf order
2822
2823
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2823
2824
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2841,9 +2842,9 @@ class kucoin(Exchange, ImplicitAPI):
2841
2842
  https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
2842
2843
 
2843
2844
  :param str id: Order id
2844
- :param str symbol: not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter
2845
+ :param str symbol: not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
2845
2846
  :param dict [params]: exchange specific parameters
2846
- :param bool [params.stop]: True if fetching a stop order
2847
+ :param bool [params.trigger]: True if fetching a trigger order
2847
2848
  :param bool [params.hf]: False, # True for hf order
2848
2849
  :param bool [params.clientOid]: unique order id created by users to identify their orders
2849
2850
  :returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2851,7 +2852,7 @@ class kucoin(Exchange, ImplicitAPI):
2851
2852
  self.load_markets()
2852
2853
  request: dict = {}
2853
2854
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
2854
- stop = self.safe_bool_2(params, 'stop', 'trigger', False)
2855
+ trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
2855
2856
  hf = None
2856
2857
  hf, params = self.handle_hf_and_params(params)
2857
2858
  market = None
@@ -2865,7 +2866,7 @@ class kucoin(Exchange, ImplicitAPI):
2865
2866
  response = None
2866
2867
  if clientOrderId is not None:
2867
2868
  request['clientOid'] = clientOrderId
2868
- if stop:
2869
+ if trigger:
2869
2870
  if symbol is not None:
2870
2871
  request['symbol'] = market['id']
2871
2872
  response = self.privateGetStopOrderQueryOrderByClientOid(self.extend(request, params))
@@ -2880,7 +2881,7 @@ class kucoin(Exchange, ImplicitAPI):
2880
2881
  if id is None:
2881
2882
  raise InvalidOrder(self.id + ' fetchOrder() requires an order id')
2882
2883
  request['orderId'] = id
2883
- if stop:
2884
+ if trigger:
2884
2885
  response = self.privateGetStopOrderOrderId(self.extend(request, params))
2885
2886
  elif hf:
2886
2887
  response = self.privateGetHfOrdersOrderId(self.extend(request, params))
@@ -3018,7 +3019,7 @@ class kucoin(Exchange, ImplicitAPI):
3018
3019
  feeCurrencyId = self.safe_string(order, 'feeCurrency')
3019
3020
  cancelExist = self.safe_bool(order, 'cancelExist', False)
3020
3021
  responseStop = self.safe_string(order, 'stop')
3021
- stop = responseStop is not None
3022
+ trigger = responseStop is not None
3022
3023
  stopTriggered = self.safe_bool(order, 'stopTriggered', False)
3023
3024
  isActive = self.safe_bool_2(order, 'isActive', 'active')
3024
3025
  responseStatus = self.safe_string(order, 'status')
@@ -3028,7 +3029,7 @@ class kucoin(Exchange, ImplicitAPI):
3028
3029
  status = 'open'
3029
3030
  else:
3030
3031
  status = 'closed'
3031
- if stop:
3032
+ if trigger:
3032
3033
  if responseStatus == 'NEW':
3033
3034
  status = 'open'
3034
3035
  elif not isActive and not stopTriggered:
@@ -4181,7 +4182,7 @@ class kucoin(Exchange, ImplicitAPI):
4181
4182
  :param boolean [params.hf]: default False, when True will fetch ledger entries for the high frequency trading account
4182
4183
  :param int [params.until]: the latest time in ms to fetch entries for
4183
4184
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4184
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
4185
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
4185
4186
  """
4186
4187
  self.load_markets()
4187
4188
  self.load_accounts()
ccxt/luno.py CHANGED
@@ -963,7 +963,7 @@ class luno(Exchange, ImplicitAPI):
963
963
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
964
964
  :param int [limit]: max number of ledger entries to return, default is None
965
965
  :param dict [params]: extra parameters specific to the exchange API endpoint
966
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
966
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
967
967
  """
968
968
  self.load_markets()
969
969
  self.load_accounts()