ccxt 4.4.39__py2.py3-none-any.whl → 4.4.41__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 (137) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bitmart.py +2 -0
  3. ccxt/abstract/okx.py +5 -0
  4. ccxt/ascendex.py +9 -9
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ascendex.py +9 -9
  7. ccxt/async_support/base/exchange.py +10 -3
  8. ccxt/async_support/base/ws/aiohttp_client.py +2 -2
  9. ccxt/async_support/binance.py +37 -41
  10. ccxt/async_support/bingx.py +4 -3
  11. ccxt/async_support/bit2c.py +0 -1
  12. ccxt/async_support/bitbank.py +0 -1
  13. ccxt/async_support/bitbns.py +0 -1
  14. ccxt/async_support/bitfinex.py +16 -17
  15. ccxt/async_support/bitfinex1.py +0 -1
  16. ccxt/async_support/bitflyer.py +0 -1
  17. ccxt/async_support/bitget.py +2 -2
  18. ccxt/async_support/bithumb.py +0 -1
  19. ccxt/async_support/bitmart.py +246 -6
  20. ccxt/async_support/bitmex.py +5 -6
  21. ccxt/async_support/bitopro.py +4 -5
  22. ccxt/async_support/bitrue.py +5 -7
  23. ccxt/async_support/bitso.py +1 -2
  24. ccxt/async_support/bitstamp.py +1 -2
  25. ccxt/async_support/bitteam.py +1 -3
  26. ccxt/async_support/bitvavo.py +2 -4
  27. ccxt/async_support/blockchaincom.py +5 -5
  28. ccxt/async_support/blofin.py +10 -10
  29. ccxt/async_support/btcalpha.py +0 -1
  30. ccxt/async_support/btcbox.py +0 -1
  31. ccxt/async_support/btcmarkets.py +1 -3
  32. ccxt/async_support/bybit.py +10 -11
  33. ccxt/async_support/cex.py +1 -1
  34. ccxt/async_support/coinbase.py +77 -1
  35. ccxt/async_support/coinbaseexchange.py +1 -1
  36. ccxt/async_support/coinbaseinternational.py +62 -0
  37. ccxt/async_support/coincatch.py +1 -1
  38. ccxt/async_support/coinex.py +9 -9
  39. ccxt/async_support/coinlist.py +1 -1
  40. ccxt/async_support/coinmetro.py +1 -1
  41. ccxt/async_support/cryptocom.py +91 -2
  42. ccxt/async_support/currencycom.py +1 -1
  43. ccxt/async_support/defx.py +1 -2
  44. ccxt/async_support/delta.py +1 -1
  45. ccxt/async_support/digifinex.py +1 -1
  46. ccxt/async_support/exmo.py +62 -6
  47. ccxt/async_support/gate.py +2 -2
  48. ccxt/async_support/hashkey.py +3 -5
  49. ccxt/async_support/htx.py +2 -2
  50. ccxt/async_support/hyperliquid.py +61 -2
  51. ccxt/async_support/kraken.py +124 -26
  52. ccxt/async_support/kucoin.py +29 -25
  53. ccxt/async_support/luno.py +1 -1
  54. ccxt/async_support/mexc.py +137 -1
  55. ccxt/async_support/ndax.py +1 -1
  56. ccxt/async_support/okcoin.py +18 -18
  57. ccxt/async_support/okx.py +27 -22
  58. ccxt/async_support/phemex.py +12 -8
  59. ccxt/async_support/poloniex.py +1 -1
  60. ccxt/async_support/poloniexfutures.py +6 -6
  61. ccxt/async_support/vertex.py +11 -11
  62. ccxt/async_support/woo.py +33 -33
  63. ccxt/async_support/woofipro.py +24 -24
  64. ccxt/async_support/xt.py +29 -27
  65. ccxt/async_support/zonda.py +1 -1
  66. ccxt/base/exchange.py +31 -19
  67. ccxt/base/types.py +10 -0
  68. ccxt/binance.py +37 -41
  69. ccxt/bingx.py +4 -3
  70. ccxt/bit2c.py +0 -1
  71. ccxt/bitbank.py +0 -1
  72. ccxt/bitbns.py +0 -1
  73. ccxt/bitfinex.py +16 -17
  74. ccxt/bitfinex1.py +0 -1
  75. ccxt/bitflyer.py +0 -1
  76. ccxt/bitget.py +2 -2
  77. ccxt/bithumb.py +0 -1
  78. ccxt/bitmart.py +246 -6
  79. ccxt/bitmex.py +5 -6
  80. ccxt/bitopro.py +4 -5
  81. ccxt/bitrue.py +5 -7
  82. ccxt/bitso.py +1 -2
  83. ccxt/bitstamp.py +1 -2
  84. ccxt/bitteam.py +1 -3
  85. ccxt/bitvavo.py +2 -4
  86. ccxt/blockchaincom.py +5 -5
  87. ccxt/blofin.py +10 -10
  88. ccxt/btcalpha.py +0 -1
  89. ccxt/btcbox.py +0 -1
  90. ccxt/btcmarkets.py +1 -3
  91. ccxt/bybit.py +10 -11
  92. ccxt/cex.py +1 -1
  93. ccxt/coinbase.py +77 -1
  94. ccxt/coinbaseexchange.py +1 -1
  95. ccxt/coinbaseinternational.py +62 -0
  96. ccxt/coincatch.py +1 -1
  97. ccxt/coinex.py +9 -9
  98. ccxt/coinlist.py +1 -1
  99. ccxt/coinmetro.py +1 -1
  100. ccxt/cryptocom.py +91 -2
  101. ccxt/currencycom.py +1 -1
  102. ccxt/defx.py +1 -2
  103. ccxt/delta.py +1 -1
  104. ccxt/digifinex.py +1 -1
  105. ccxt/exmo.py +62 -6
  106. ccxt/gate.py +2 -2
  107. ccxt/hashkey.py +3 -5
  108. ccxt/htx.py +2 -2
  109. ccxt/hyperliquid.py +61 -2
  110. ccxt/kraken.py +124 -26
  111. ccxt/kucoin.py +29 -25
  112. ccxt/luno.py +1 -1
  113. ccxt/mexc.py +137 -1
  114. ccxt/ndax.py +1 -1
  115. ccxt/okcoin.py +18 -18
  116. ccxt/okx.py +27 -22
  117. ccxt/phemex.py +12 -8
  118. ccxt/poloniex.py +1 -1
  119. ccxt/poloniexfutures.py +6 -6
  120. ccxt/pro/__init__.py +1 -1
  121. ccxt/pro/bitget.py +1 -1
  122. ccxt/pro/bybit.py +12 -1
  123. ccxt/pro/coinex.py +2 -2
  124. ccxt/pro/gate.py +6 -6
  125. ccxt/pro/kucoin.py +3 -3
  126. ccxt/pro/okx.py +11 -11
  127. ccxt/pro/upbit.py +2 -2
  128. ccxt/vertex.py +11 -11
  129. ccxt/woo.py +33 -33
  130. ccxt/woofipro.py +24 -24
  131. ccxt/xt.py +29 -27
  132. ccxt/zonda.py +1 -1
  133. {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/METADATA +4 -4
  134. {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/RECORD +137 -137
  135. {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/LICENSE.txt +0 -0
  136. {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/WHEEL +0 -0
  137. {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/top_level.txt +0 -0
ccxt/async_support/woo.py CHANGED
@@ -975,17 +975,17 @@ class woo(Exchange, ImplicitAPI):
975
975
  isTrailingAmountOrder = trailingAmount is not None
976
976
  isTrailingPercentOrder = trailingPercent is not None
977
977
  isTrailing = isTrailingAmountOrder or isTrailingPercentOrder
978
- isStop = isTrailing or stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
978
+ isConditional = isTrailing or stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
979
979
  isMarket = orderType == 'MARKET'
980
980
  timeInForce = self.safe_string_lower(params, 'timeInForce')
981
981
  postOnly = self.is_post_only(isMarket, None, params)
982
- reduceOnlyKey = 'reduceOnly' if isStop else 'reduce_only'
983
- clientOrderIdKey = 'clientOrderId' if isStop else 'client_order_id'
984
- orderQtyKey = 'quantity' if isStop else 'order_quantity'
985
- priceKey = 'price' if isStop else 'order_price'
986
- typeKey = 'type' if isStop else 'order_type'
982
+ reduceOnlyKey = 'reduceOnly' if isConditional else 'reduce_only'
983
+ clientOrderIdKey = 'clientOrderId' if isConditional else 'client_order_id'
984
+ orderQtyKey = 'quantity' if isConditional else 'order_quantity'
985
+ priceKey = 'price' if isConditional else 'order_price'
986
+ typeKey = 'type' if isConditional else 'order_type'
987
987
  request[typeKey] = orderType # LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
988
- if not isStop:
988
+ if not isConditional:
989
989
  if postOnly:
990
990
  request['order_type'] = 'POST_ONLY'
991
991
  elif timeInForce == 'fok':
@@ -996,7 +996,7 @@ class woo(Exchange, ImplicitAPI):
996
996
  request[reduceOnlyKey] = reduceOnly
997
997
  if not isMarket and price is not None:
998
998
  request[priceKey] = self.price_to_precision(symbol, price)
999
- if isMarket and not isStop:
999
+ if isMarket and not isConditional:
1000
1000
  # for market buy it requires the amount of quote currency to spend
1001
1001
  cost = self.safe_string_2(params, 'cost', 'order_amount')
1002
1002
  params = self.omit(params, ['cost', 'order_amount'])
@@ -1064,7 +1064,7 @@ class woo(Exchange, ImplicitAPI):
1064
1064
  request['childOrders'] = [outterOrder]
1065
1065
  params = self.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice', 'stopLoss', 'takeProfit', 'trailingPercent', 'trailingAmount', 'trailingTriggerPrice'])
1066
1066
  response = None
1067
- if isStop:
1067
+ if isConditional:
1068
1068
  response = await self.v3PrivatePostAlgoOrder(self.extend(request, params))
1069
1069
  else:
1070
1070
  response = await self.v1PrivatePostOrder(self.extend(request, params))
@@ -1163,17 +1163,17 @@ class woo(Exchange, ImplicitAPI):
1163
1163
  convertedTrailingPercent = Precise.string_div(trailingPercent, '100')
1164
1164
  request['callbackRate'] = convertedTrailingPercent
1165
1165
  params = self.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent'])
1166
- isStop = isTrailing or (stopPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
1166
+ isConditional = isTrailing or (stopPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
1167
1167
  response = None
1168
1168
  if isByClientOrder:
1169
1169
  request['client_order_id'] = clientOrderIdExchangeSpecific
1170
- if isStop:
1170
+ if isConditional:
1171
1171
  response = await self.v3PrivatePutAlgoOrderClientClientOrderId(self.extend(request, params))
1172
1172
  else:
1173
1173
  response = await self.v3PrivatePutOrderClientClientOrderId(self.extend(request, params))
1174
1174
  else:
1175
1175
  request['oid'] = id
1176
- if isStop:
1176
+ if isConditional:
1177
1177
  response = await self.v3PrivatePutAlgoOrderOid(self.extend(request, params))
1178
1178
  else:
1179
1179
  response = await self.v3PrivatePutOrderOid(self.extend(request, params))
@@ -1203,12 +1203,12 @@ class woo(Exchange, ImplicitAPI):
1203
1203
  :param str id: order id
1204
1204
  :param str symbol: unified symbol of the market the order was made in
1205
1205
  :param dict [params]: extra parameters specific to the exchange API endpoint
1206
- :param boolean [params.stop]: whether the order is a stop/algo order
1206
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1207
1207
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1208
1208
  """
1209
- stop = self.safe_bool(params, 'stop', False)
1210
- params = self.omit(params, 'stop')
1211
- if not stop and (symbol is None):
1209
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop', False)
1210
+ params = self.omit(params, ['trigger', 'stop'])
1211
+ if not isTrigger and (symbol is None):
1212
1212
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
1213
1213
  await self.load_markets()
1214
1214
  market: Market = None
@@ -1219,7 +1219,7 @@ class woo(Exchange, ImplicitAPI):
1219
1219
  clientOrderIdExchangeSpecific = self.safe_string(params, 'client_order_id', clientOrderIdUnified)
1220
1220
  isByClientOrder = clientOrderIdExchangeSpecific is not None
1221
1221
  response = None
1222
- if stop:
1222
+ if isTrigger:
1223
1223
  request['order_id'] = id
1224
1224
  response = await self.v3PrivateDeleteAlgoOrderOrderId(self.extend(request, params))
1225
1225
  else:
@@ -1251,13 +1251,13 @@ class woo(Exchange, ImplicitAPI):
1251
1251
  cancel all open orders in a market
1252
1252
  :param str symbol: unified market symbol
1253
1253
  :param dict [params]: extra parameters specific to the exchange API endpoint
1254
- :param boolean [params.stop]: whether the order is a stop/algo order
1254
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1255
1255
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1256
1256
  """
1257
1257
  await self.load_markets()
1258
- stop = self.safe_bool_2(params, 'stop', 'trigger')
1258
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
1259
1259
  params = self.omit(params, ['stop', 'trigger'])
1260
- if stop:
1260
+ if trigger:
1261
1261
  return await self.v3PrivateDeleteAlgoOrdersPending(params)
1262
1262
  if symbol is None:
1263
1263
  raise ArgumentsRequired(self.id + ' cancelOrders() requires a symbol argument')
@@ -1314,17 +1314,17 @@ class woo(Exchange, ImplicitAPI):
1314
1314
  :param str id: the order id
1315
1315
  :param str symbol: unified symbol of the market the order was made in
1316
1316
  :param dict [params]: extra parameters specific to the exchange API endpoint
1317
- :param boolean [params.stop]: whether the order is a stop/algo order
1317
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1318
1318
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1319
1319
  """
1320
1320
  await self.load_markets()
1321
1321
  market = self.market(symbol) if (symbol is not None) else None
1322
- stop = self.safe_bool_2(params, 'stop', 'trigger')
1322
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
1323
1323
  params = self.omit(params, ['stop', 'trigger'])
1324
1324
  request: dict = {}
1325
1325
  clientOrderId = self.safe_string_2(params, 'clOrdID', 'clientOrderId')
1326
1326
  response = None
1327
- if stop:
1327
+ if trigger:
1328
1328
  request['oid'] = id
1329
1329
  response = await self.v3PrivateGetAlgoOrderOid(self.extend(request, params))
1330
1330
  elif clientOrderId:
@@ -1382,7 +1382,7 @@ class woo(Exchange, ImplicitAPI):
1382
1382
  :param int [since]: the earliest time in ms to fetch orders for
1383
1383
  :param int [limit]: the maximum number of order structures to retrieve
1384
1384
  :param dict [params]: extra parameters specific to the exchange API endpoint
1385
- :param boolean [params.stop]: whether the order is a stop/algo order
1385
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1386
1386
  :param boolean [params.isTriggered]: whether the order has been triggered(False by default)
1387
1387
  :param str [params.side]: 'buy' or 'sell'
1388
1388
  :param boolean [params.trailing]: set to True if you want to fetch trailing orders
@@ -1396,14 +1396,14 @@ class woo(Exchange, ImplicitAPI):
1396
1396
  return await self.fetch_paginated_call_incremental('fetchOrders', symbol, since, limit, params, 'page', 500)
1397
1397
  request: dict = {}
1398
1398
  market: Market = None
1399
- stop = self.safe_bool_2(params, 'stop', 'trigger')
1399
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
1400
1400
  trailing = self.safe_bool(params, 'trailing', False)
1401
1401
  params = self.omit(params, ['stop', 'trailing', 'trigger'])
1402
1402
  if symbol is not None:
1403
1403
  market = self.market(symbol)
1404
1404
  request['symbol'] = market['id']
1405
1405
  if since is not None:
1406
- if stop or trailing:
1406
+ if trigger or trailing:
1407
1407
  request['createdTimeStart'] = since
1408
1408
  else:
1409
1409
  request['start_t'] = since
@@ -1411,12 +1411,12 @@ class woo(Exchange, ImplicitAPI):
1411
1411
  request['size'] = limit
1412
1412
  else:
1413
1413
  request['size'] = 500
1414
- if stop:
1414
+ if trigger:
1415
1415
  request['algoType'] = 'stop'
1416
1416
  elif trailing:
1417
1417
  request['algoType'] = 'TRAILING_STOP'
1418
1418
  response = None
1419
- if stop or trailing:
1419
+ if trigger or trailing:
1420
1420
  response = await self.v3PrivateGetAlgoOrders(self.extend(request, params))
1421
1421
  else:
1422
1422
  response = await self.v1PrivateGetOrders(self.extend(request, params))
@@ -1466,7 +1466,7 @@ class woo(Exchange, ImplicitAPI):
1466
1466
  :param int [since]: the earliest time in ms to fetch orders for
1467
1467
  :param int [limit]: the maximum number of order structures to retrieve
1468
1468
  :param dict [params]: extra parameters specific to the exchange API endpoint
1469
- :param boolean [params.stop]: whether the order is a stop/algo order
1469
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1470
1470
  :param boolean [params.isTriggered]: whether the order has been triggered(False by default)
1471
1471
  :param str [params.side]: 'buy' or 'sell'
1472
1472
  :param boolean [params.trailing]: set to True if you want to fetch trailing orders
@@ -1488,7 +1488,7 @@ class woo(Exchange, ImplicitAPI):
1488
1488
  :param int [since]: the earliest time in ms to fetch orders for
1489
1489
  :param int [limit]: the maximum number of order structures to retrieve
1490
1490
  :param dict [params]: extra parameters specific to the exchange API endpoint
1491
- :param boolean [params.stop]: whether the order is a stop/algo order
1491
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1492
1492
  :param boolean [params.isTriggered]: whether the order has been triggered(False by default)
1493
1493
  :param str [params.side]: 'buy' or 'sell'
1494
1494
  :param boolean [params.trailing]: set to True if you want to fetch trailing orders
@@ -2056,7 +2056,7 @@ class woo(Exchange, ImplicitAPI):
2056
2056
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2057
2057
  :param int [limit]: max number of ledger entries to return, default is None
2058
2058
  :param dict [params]: extra parameters specific to the exchange API endpoint
2059
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2059
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2060
2060
  """
2061
2061
  currency, rows = await self.get_asset_history_rows(code, since, limit, params)
2062
2062
  return self.parse_ledger(rows, currency, since, limit, params)
@@ -2473,8 +2473,8 @@ class woo(Exchange, ImplicitAPI):
2473
2473
  if not isSandboxMode:
2474
2474
  applicationId = 'bc830de7-50f3-460b-9ee0-f430f83f9dad'
2475
2475
  brokerId = self.safe_string(self.options, 'brokerId', applicationId)
2476
- isStop = path.find('algo') > -1
2477
- if isStop:
2476
+ isTrigger = path.find('algo') > -1
2477
+ if isTrigger:
2478
2478
  params['brokerId'] = brokerId
2479
2479
  else:
2480
2480
  params['broker_id'] = brokerId
@@ -1264,15 +1264,15 @@ class woofipro(Exchange, ImplicitAPI):
1264
1264
  stopLoss = self.safe_value(params, 'stopLoss')
1265
1265
  takeProfit = self.safe_value(params, 'takeProfit')
1266
1266
  algoType = self.safe_string(params, 'algoType')
1267
- isStop = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
1267
+ isConditional = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
1268
1268
  isMarket = orderType == 'MARKET'
1269
1269
  timeInForce = self.safe_string_lower(params, 'timeInForce')
1270
1270
  postOnly = self.is_post_only(isMarket, None, params)
1271
- orderQtyKey = 'quantity' if isStop else 'order_quantity'
1272
- priceKey = 'price' if isStop else 'order_price'
1273
- typeKey = 'type' if isStop else 'order_type'
1271
+ orderQtyKey = 'quantity' if isConditional else 'order_quantity'
1272
+ priceKey = 'price' if isConditional else 'order_price'
1273
+ typeKey = 'type' if isConditional else 'order_type'
1274
1274
  request[typeKey] = orderType # LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
1275
- if not isStop:
1275
+ if not isConditional:
1276
1276
  if postOnly:
1277
1277
  request['order_type'] = 'POST_ONLY'
1278
1278
  elif timeInForce == 'fok':
@@ -1283,7 +1283,7 @@ class woofipro(Exchange, ImplicitAPI):
1283
1283
  request['reduce_only'] = reduceOnly
1284
1284
  if price is not None:
1285
1285
  request[priceKey] = self.price_to_precision(symbol, price)
1286
- if isMarket and not isStop:
1286
+ if isMarket and not isConditional:
1287
1287
  request[orderQtyKey] = self.amount_to_precision(symbol, amount)
1288
1288
  elif algoType != 'POSITIONAL_TP_SL':
1289
1289
  request[orderQtyKey] = self.amount_to_precision(symbol, amount)
@@ -1355,9 +1355,9 @@ class woofipro(Exchange, ImplicitAPI):
1355
1355
  stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1356
1356
  stopLoss = self.safe_value(params, 'stopLoss')
1357
1357
  takeProfit = self.safe_value(params, 'takeProfit')
1358
- isStop = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
1358
+ isConditional = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(params, 'childOrders') is not None)
1359
1359
  response = None
1360
- if isStop:
1360
+ if isConditional:
1361
1361
  response = await self.v1PrivatePostAlgoOrder(request)
1362
1362
  #
1363
1363
  # {
@@ -1417,8 +1417,8 @@ class woofipro(Exchange, ImplicitAPI):
1417
1417
  stopPrice = self.safe_string_2(orderParams, 'triggerPrice', 'stopPrice')
1418
1418
  stopLoss = self.safe_value(orderParams, 'stopLoss')
1419
1419
  takeProfit = self.safe_value(orderParams, 'takeProfit')
1420
- isStop = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(orderParams, 'childOrders') is not None)
1421
- if isStop:
1420
+ isConditional = stopPrice is not None or stopLoss is not None or takeProfit is not None or (self.safe_value(orderParams, 'childOrders') is not None)
1421
+ if isConditional:
1422
1422
  raise NotSupported(self.id + 'createOrders() only support non-stop order')
1423
1423
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
1424
1424
  ordersRequests.append(orderRequest)
@@ -1474,16 +1474,16 @@ class woofipro(Exchange, ImplicitAPI):
1474
1474
  stopPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'takeProfitPrice', 'stopLossPrice'])
1475
1475
  if stopPrice is not None:
1476
1476
  request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
1477
- isStop = (stopPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
1478
- orderQtyKey = 'quantity' if isStop else 'order_quantity'
1479
- priceKey = 'price' if isStop else 'order_price'
1477
+ isConditional = (stopPrice is not None) or (self.safe_value(params, 'childOrders') is not None)
1478
+ orderQtyKey = 'quantity' if isConditional else 'order_quantity'
1479
+ priceKey = 'price' if isConditional else 'order_price'
1480
1480
  if price is not None:
1481
1481
  request[priceKey] = self.price_to_precision(symbol, price)
1482
1482
  if amount is not None:
1483
1483
  request[orderQtyKey] = self.amount_to_precision(symbol, amount)
1484
1484
  params = self.omit(params, ['stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent'])
1485
1485
  response = None
1486
- if isStop:
1486
+ if isConditional:
1487
1487
  response = await self.v1PrivatePutAlgoOrder(self.extend(request, params))
1488
1488
  else:
1489
1489
  request['symbol'] = market['id']
@@ -1536,9 +1536,9 @@ class woofipro(Exchange, ImplicitAPI):
1536
1536
  :param str [params.clientOrderId]: a unique id for the order
1537
1537
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1538
1538
  """
1539
- stop = self.safe_bool_2(params, 'stop', 'trigger', False)
1539
+ trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
1540
1540
  params = self.omit(params, ['stop', 'trigger'])
1541
- if not stop and (symbol is None):
1541
+ if not trigger and (symbol is None):
1542
1542
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
1543
1543
  await self.load_markets()
1544
1544
  market: Market = None
@@ -1551,7 +1551,7 @@ class woofipro(Exchange, ImplicitAPI):
1551
1551
  clientOrderIdExchangeSpecific = self.safe_string(params, 'client_order_id', clientOrderIdUnified)
1552
1552
  isByClientOrder = clientOrderIdExchangeSpecific is not None
1553
1553
  response = None
1554
- if stop:
1554
+ if trigger:
1555
1555
  if isByClientOrder:
1556
1556
  request['client_order_id'] = clientOrderIdExchangeSpecific
1557
1557
  params = self.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
@@ -1587,7 +1587,7 @@ class woofipro(Exchange, ImplicitAPI):
1587
1587
  extendParams['client_order_id'] = clientOrderIdExchangeSpecific
1588
1588
  else:
1589
1589
  extendParams['id'] = id
1590
- if stop:
1590
+ if trigger:
1591
1591
  return self.extend(self.parse_order(response), extendParams)
1592
1592
  data = self.safe_dict(response, 'data', {})
1593
1593
  return self.extend(self.parse_order(data), extendParams)
@@ -1642,18 +1642,18 @@ class woofipro(Exchange, ImplicitAPI):
1642
1642
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1643
1643
  """
1644
1644
  await self.load_markets()
1645
- stop = self.safe_bool_2(params, 'stop', 'trigger')
1645
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
1646
1646
  params = self.omit(params, ['stop', 'trigger'])
1647
1647
  request: dict = {}
1648
1648
  if symbol is not None:
1649
1649
  market = self.market(symbol)
1650
1650
  request['symbol'] = market['id']
1651
1651
  response = None
1652
- if stop:
1652
+ if trigger:
1653
1653
  response = await self.v1PrivateDeleteAlgoOrders(self.extend(request, params))
1654
1654
  else:
1655
1655
  response = await self.v1PrivateDeleteOrders(self.extend(request, params))
1656
- # stop
1656
+ # trigger
1657
1657
  # {
1658
1658
  # "success": True,
1659
1659
  # "timestamp": 1702989203989,
@@ -1692,12 +1692,12 @@ class woofipro(Exchange, ImplicitAPI):
1692
1692
  """
1693
1693
  await self.load_markets()
1694
1694
  market = self.market(symbol) if (symbol is not None) else None
1695
- stop = self.safe_bool_2(params, 'stop', 'trigger', False)
1695
+ trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
1696
1696
  request: dict = {}
1697
1697
  clientOrderId = self.safe_string_n(params, ['clOrdID', 'clientOrderId', 'client_order_id'])
1698
1698
  params = self.omit(params, ['stop', 'trigger', 'clOrdID', 'clientOrderId', 'client_order_id'])
1699
1699
  response = None
1700
- if stop:
1700
+ if trigger:
1701
1701
  if clientOrderId:
1702
1702
  request['client_order_id'] = clientOrderId
1703
1703
  response = await self.v1PrivateGetAlgoClientOrderClientOrderId(self.extend(request, params))
@@ -2107,7 +2107,7 @@ class woofipro(Exchange, ImplicitAPI):
2107
2107
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2108
2108
  :param int [limit]: max number of ledger entries to return, default is None
2109
2109
  :param dict [params]: extra parameters specific to the exchange API endpoint
2110
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2110
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2111
2111
  """
2112
2112
  currency, rows = await self.get_asset_history_rows(code, since, limit, params)
2113
2113
  return self.parse_ledger(rows, currency, since, limit, params)
ccxt/async_support/xt.py CHANGED
@@ -2377,7 +2377,7 @@ class xt(Exchange, ImplicitAPI):
2377
2377
  :param str id: order id
2378
2378
  :param str [symbol]: unified symbol of the market the order was made in
2379
2379
  :param dict params: extra parameters specific to the xt api endpoint
2380
- :param bool [params.stop]: if the order is a stop trigger order or not
2380
+ :param bool [params.trigger]: if the order is a trigger order or not
2381
2381
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
2382
2382
  :returns dict: An `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
2383
2383
  """
@@ -2391,15 +2391,15 @@ class xt(Exchange, ImplicitAPI):
2391
2391
  response = None
2392
2392
  type, params = self.handle_market_type_and_params('fetchOrder', market, params)
2393
2393
  subType, params = self.handle_sub_type_and_params('fetchOrder', market, params)
2394
- stop = self.safe_value(params, 'stop')
2394
+ trigger = self.safe_value(params, 'stop')
2395
2395
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
2396
- if stop:
2396
+ if trigger:
2397
2397
  request['entrustId'] = id
2398
2398
  elif stopLossTakeProfit:
2399
2399
  request['profitId'] = id
2400
2400
  else:
2401
2401
  request['orderId'] = id
2402
- if stop:
2402
+ if trigger:
2403
2403
  params = self.omit(params, 'stop')
2404
2404
  if subType == 'inverse':
2405
2405
  response = await self.privateInverseGetFutureTradeV1EntrustPlanDetail(self.extend(request, params))
@@ -2549,7 +2549,7 @@ class xt(Exchange, ImplicitAPI):
2549
2549
  :param int [since]: timestamp in ms of the earliest order
2550
2550
  :param int [limit]: the maximum number of order structures to retrieve
2551
2551
  :param dict params: extra parameters specific to the xt api endpoint
2552
- :param bool [params.stop]: if the order is a stop trigger order or not
2552
+ :param bool [params.trigger]: if the order is a trigger order or not
2553
2553
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
2554
2554
  """
2555
2555
  await self.load_markets()
@@ -2567,9 +2567,9 @@ class xt(Exchange, ImplicitAPI):
2567
2567
  response = None
2568
2568
  type, params = self.handle_market_type_and_params('fetchOrders', market, params)
2569
2569
  subType, params = self.handle_sub_type_and_params('fetchOrders', market, params)
2570
- stop = self.safe_value(params, 'stop')
2571
- if stop:
2572
- params = self.omit(params, 'stop')
2570
+ trigger = self.safe_value_2(params, 'trigger', 'stop')
2571
+ if trigger:
2572
+ params = self.omit(params, ['trigger', 'stop'])
2573
2573
  if subType == 'inverse':
2574
2574
  response = await self.privateInverseGetFutureTradeV1EntrustPlanListHistory(self.extend(request, params))
2575
2575
  else:
@@ -2710,31 +2710,31 @@ class xt(Exchange, ImplicitAPI):
2710
2710
  response = None
2711
2711
  type, params = self.handle_market_type_and_params('fetchOrdersByStatus', market, params)
2712
2712
  subType, params = self.handle_sub_type_and_params('fetchOrdersByStatus', market, params)
2713
- stop = self.safe_value(params, 'stop')
2713
+ trigger = self.safe_value(params, 'stop')
2714
2714
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
2715
2715
  if status == 'open':
2716
- if stop or stopLossTakeProfit:
2716
+ if trigger or stopLossTakeProfit:
2717
2717
  request['state'] = 'NOT_TRIGGERED'
2718
2718
  elif subType is not None:
2719
2719
  request['state'] = 'NEW'
2720
2720
  elif status == 'closed':
2721
- if stop or stopLossTakeProfit:
2721
+ if trigger or stopLossTakeProfit:
2722
2722
  request['state'] = 'TRIGGERED'
2723
2723
  else:
2724
2724
  request['state'] = 'FILLED'
2725
2725
  elif status == 'canceled':
2726
- if stop or stopLossTakeProfit:
2726
+ if trigger or stopLossTakeProfit:
2727
2727
  request['state'] = 'USER_REVOCATION'
2728
2728
  else:
2729
2729
  request['state'] = 'CANCELED'
2730
2730
  else:
2731
2731
  request['state'] = status
2732
- if stop or stopLossTakeProfit or (subType is not None) or (type == 'swap') or (type == 'future'):
2732
+ if trigger or stopLossTakeProfit or (subType is not None) or (type == 'swap') or (type == 'future'):
2733
2733
  if since is not None:
2734
2734
  request['startTime'] = since
2735
2735
  if limit is not None:
2736
2736
  request['size'] = limit
2737
- if stop:
2737
+ if trigger:
2738
2738
  params = self.omit(params, 'stop')
2739
2739
  if subType == 'inverse':
2740
2740
  response = await self.privateInverseGetFutureTradeV1EntrustPlanList(self.extend(request, params))
@@ -2960,7 +2960,7 @@ class xt(Exchange, ImplicitAPI):
2960
2960
  :param int [since]: timestamp in ms of the earliest order
2961
2961
  :param int [limit]: the maximum number of open order structures to retrieve
2962
2962
  :param dict params: extra parameters specific to the xt api endpoint
2963
- :param bool [params.stop]: if the order is a stop trigger order or not
2963
+ :param bool [params.trigger]: if the order is a trigger order or not
2964
2964
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
2965
2965
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
2966
2966
  """
@@ -2979,7 +2979,7 @@ class xt(Exchange, ImplicitAPI):
2979
2979
  :param int [since]: timestamp in ms of the earliest order
2980
2980
  :param int [limit]: the maximum number of order structures to retrieve
2981
2981
  :param dict params: extra parameters specific to the xt api endpoint
2982
- :param bool [params.stop]: if the order is a stop trigger order or not
2982
+ :param bool [params.trigger]: if the order is a trigger order or not
2983
2983
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
2984
2984
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
2985
2985
  """
@@ -2998,7 +2998,7 @@ class xt(Exchange, ImplicitAPI):
2998
2998
  :param int [since]: timestamp in ms of the earliest order
2999
2999
  :param int [limit]: the maximum number of order structures to retrieve
3000
3000
  :param dict params: extra parameters specific to the xt api endpoint
3001
- :param bool [params.stop]: if the order is a stop trigger order or not
3001
+ :param bool [params.trigger]: if the order is a trigger order or not
3002
3002
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
3003
3003
  :returns dict: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
3004
3004
  """
@@ -3016,7 +3016,7 @@ class xt(Exchange, ImplicitAPI):
3016
3016
  :param str id: order id
3017
3017
  :param str [symbol]: unified symbol of the market the order was made in
3018
3018
  :param dict params: extra parameters specific to the xt api endpoint
3019
- :param bool [params.stop]: if the order is a stop trigger order or not
3019
+ :param bool [params.trigger]: if the order is a trigger order or not
3020
3020
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
3021
3021
  :returns dict: An `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
3022
3022
  """
@@ -3030,16 +3030,16 @@ class xt(Exchange, ImplicitAPI):
3030
3030
  response = None
3031
3031
  type, params = self.handle_market_type_and_params('cancelOrder', market, params)
3032
3032
  subType, params = self.handle_sub_type_and_params('cancelOrder', market, params)
3033
- stop = self.safe_value(params, 'stop')
3033
+ trigger = self.safe_value_2(params, 'trigger', 'stop')
3034
3034
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
3035
- if stop:
3035
+ if trigger:
3036
3036
  request['entrustId'] = id
3037
3037
  elif stopLossTakeProfit:
3038
3038
  request['profitId'] = id
3039
3039
  else:
3040
3040
  request['orderId'] = id
3041
- if stop:
3042
- params = self.omit(params, 'stop')
3041
+ if trigger:
3042
+ params = self.omit(params, ['trigger', 'stop'])
3043
3043
  if subType == 'inverse':
3044
3044
  response = await self.privateInversePostFutureTradeV1EntrustCancelPlan(self.extend(request, params))
3045
3045
  else:
@@ -3092,7 +3092,7 @@ class xt(Exchange, ImplicitAPI):
3092
3092
 
3093
3093
  :param str [symbol]: unified market symbol of the market to cancel orders in
3094
3094
  :param dict params: extra parameters specific to the xt api endpoint
3095
- :param bool [params.stop]: if the order is a stop trigger order or not
3095
+ :param bool [params.trigger]: if the order is a trigger order or not
3096
3096
  :param bool [params.stopLossTakeProfit]: if the order is a stop-loss or take-profit order
3097
3097
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
3098
3098
  """
@@ -3107,10 +3107,10 @@ class xt(Exchange, ImplicitAPI):
3107
3107
  response = None
3108
3108
  type, params = self.handle_market_type_and_params('cancelAllOrders', market, params)
3109
3109
  subType, params = self.handle_sub_type_and_params('cancelAllOrders', market, params)
3110
- stop = self.safe_value(params, 'stop')
3110
+ trigger = self.safe_value_2(params, 'trigger', 'stop')
3111
3111
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
3112
- if stop:
3113
- params = self.omit(params, 'stop')
3112
+ if trigger:
3113
+ params = self.omit(params, ['trigger', 'stop'])
3114
3114
  if subType == 'inverse':
3115
3115
  response = await self.privateInversePostFutureTradeV1EntrustCancelAllPlan(self.extend(request, params))
3116
3116
  else:
@@ -4175,6 +4175,8 @@ class xt(Exchange, ImplicitAPI):
4175
4175
  symbol = self.safe_symbol(marketId, market, '_', 'swap')
4176
4176
  timestamp = self.safe_integer(contract, 'nextCollectionTime')
4177
4177
  interval = self.safe_string(contract, 'collectionInternal')
4178
+ if interval is not None:
4179
+ interval = interval + 'h'
4178
4180
  return {
4179
4181
  'info': contract,
4180
4182
  'symbol': symbol,
@@ -4193,7 +4195,7 @@ class xt(Exchange, ImplicitAPI):
4193
4195
  'previousFundingRate': None,
4194
4196
  'previousFundingTimestamp': None,
4195
4197
  'previousFundingDatetime': None,
4196
- 'interval': interval + 'h',
4198
+ 'interval': interval,
4197
4199
  }
4198
4200
 
4199
4201
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -853,7 +853,7 @@ class zonda(Exchange, ImplicitAPI):
853
853
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
854
854
  :param int [limit]: max number of ledger entries to return, default is None
855
855
  :param dict [params]: extra parameters specific to the exchange API endpoint
856
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
856
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
857
857
  """
858
858
  balanceCurrencies = []
859
859
  if code is not None: