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/okx.py CHANGED
@@ -285,6 +285,7 @@ class okx(Exchange, ImplicitAPI):
285
285
  'tradingBot/public/rsi-back-testing': 1,
286
286
  'asset/exchange-list': 5 / 3,
287
287
  'finance/staking-defi/eth/apy-history': 5 / 3,
288
+ 'finance/staking-defi/sol/apy-history': 5 / 3,
288
289
  'finance/savings/lending-rate-summary': 5 / 3,
289
290
  'finance/savings/lending-rate-history': 5 / 3,
290
291
  'finance/fixed-loan/lending-offers': 10 / 3,
@@ -423,6 +424,8 @@ class okx(Exchange, ImplicitAPI):
423
424
  'finance/staking-defi/eth/balance': 5 / 3,
424
425
  'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
425
426
  'finance/staking-defi/eth/product-info': 3,
427
+ 'finance/staking-defi/sol/balance': 5 / 3,
428
+ 'finance/staking-defi/sol/purchase-redeem-history': 5 / 3,
426
429
  # copytrading
427
430
  'copytrading/current-subpositions': 1,
428
431
  'copytrading/subpositions-history': 1,
@@ -557,6 +560,8 @@ class okx(Exchange, ImplicitAPI):
557
560
  # eth staking
558
561
  'finance/staking-defi/eth/purchase': 5,
559
562
  'finance/staking-defi/eth/redeem': 5,
563
+ 'finance/staking-defi/sol/purchase': 5,
564
+ 'finance/staking-defi/sol/redeem': 5,
560
565
  # copytrading
561
566
  'copytrading/algo-order': 1,
562
567
  'copytrading/close-subposition': 1,
@@ -3254,9 +3259,9 @@ class okx(Exchange, ImplicitAPI):
3254
3259
  """
3255
3260
  if symbol is None:
3256
3261
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
3257
- stop = self.safe_value_2(params, 'stop', 'trigger')
3262
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
3258
3263
  trailing = self.safe_bool(params, 'trailing', False)
3259
- if stop or trailing:
3264
+ if trigger or trailing:
3260
3265
  orderInner = self.cancel_orders([id], symbol, params)
3261
3266
  return self.safe_value(orderInner, 0)
3262
3267
  self.load_markets()
@@ -3314,9 +3319,9 @@ class okx(Exchange, ImplicitAPI):
3314
3319
  method = self.safe_string(params, 'method', defaultMethod)
3315
3320
  clientOrderIds = self.parse_ids(self.safe_value_2(params, 'clOrdId', 'clientOrderId'))
3316
3321
  algoIds = self.parse_ids(self.safe_value(params, 'algoId'))
3317
- stop = self.safe_value_2(params, 'stop', 'trigger')
3322
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
3318
3323
  trailing = self.safe_bool(params, 'trailing', False)
3319
- if stop or trailing:
3324
+ if trigger or trailing:
3320
3325
  method = 'privatePostTradeCancelAlgos'
3321
3326
  if clientOrderIds is None:
3322
3327
  ids = self.parse_ids(ids)
@@ -3327,7 +3332,7 @@ class okx(Exchange, ImplicitAPI):
3327
3332
  'instId': market['id'],
3328
3333
  })
3329
3334
  for i in range(0, len(ids)):
3330
- if trailing or stop:
3335
+ if trailing or trigger:
3331
3336
  request.append({
3332
3337
  'algoId': ids[i],
3333
3338
  'instId': market['id'],
@@ -3398,9 +3403,9 @@ class okx(Exchange, ImplicitAPI):
3398
3403
  options = self.safe_dict(self.options, 'cancelOrders', {})
3399
3404
  defaultMethod = self.safe_string(options, 'method', 'privatePostTradeCancelBatchOrders')
3400
3405
  method = self.safe_string(params, 'method', defaultMethod)
3401
- stop = self.safe_bool_2(params, 'stop', 'trigger')
3406
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
3402
3407
  trailing = self.safe_bool(params, 'trailing', False)
3403
- isStopOrTrailing = stop or trailing
3408
+ isStopOrTrailing = trigger or trailing
3404
3409
  if isStopOrTrailing:
3405
3410
  method = 'privatePostTradeCancelAlgos'
3406
3411
  for i in range(0, len(orders)):
@@ -3723,8 +3728,8 @@ class okx(Exchange, ImplicitAPI):
3723
3728
  options = self.safe_value(self.options, 'fetchOrder', {})
3724
3729
  defaultMethod = self.safe_string(options, 'method', 'privateGetTradeOrder')
3725
3730
  method = self.safe_string(params, 'method', defaultMethod)
3726
- stop = self.safe_value_2(params, 'stop', 'trigger')
3727
- if stop:
3731
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
3732
+ if trigger:
3728
3733
  method = 'privateGetTradeOrderAlgo'
3729
3734
  if clientOrderId is not None:
3730
3735
  request['algoClOrdId'] = clientOrderId
@@ -3852,7 +3857,7 @@ class okx(Exchange, ImplicitAPI):
3852
3857
  :param int [since]: the earliest time in ms to fetch open orders for
3853
3858
  :param int [limit]: the maximum number of open orders structures to retrieve
3854
3859
  :param dict [params]: extra parameters specific to the exchange API endpoint
3855
- :param bool [params.stop]: True if fetching trigger or conditional orders
3860
+ :param bool [params.trigger]: True if fetching trigger or conditional orders
3856
3861
  :param str [params.ordType]: "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
3857
3862
  :param str [params.algoId]: Algo ID "'433845797218942976'"
3858
3863
  :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)
@@ -3885,13 +3890,13 @@ class okx(Exchange, ImplicitAPI):
3885
3890
  defaultMethod = self.safe_string(options, 'method', 'privateGetTradeOrdersPending')
3886
3891
  method = self.safe_string(params, 'method', defaultMethod)
3887
3892
  ordType = self.safe_string(params, 'ordType')
3888
- stop = self.safe_value_2(params, 'stop', 'trigger')
3893
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
3889
3894
  trailing = self.safe_bool(params, 'trailing', False)
3890
- if trailing or stop or (ordType in algoOrderTypes):
3895
+ if trailing or trigger or (ordType in algoOrderTypes):
3891
3896
  method = 'privateGetTradeOrdersAlgoPending'
3892
3897
  if trailing:
3893
3898
  request['ordType'] = 'move_order_stop'
3894
- elif stop and (ordType is None):
3899
+ elif trigger and (ordType is None):
3895
3900
  request['ordType'] = 'trigger'
3896
3901
  query = self.omit(params, ['method', 'stop', 'trigger', 'trailing'])
3897
3902
  response = None
@@ -4008,7 +4013,7 @@ class okx(Exchange, ImplicitAPI):
4008
4013
  :param int [since]: timestamp in ms of the earliest order, default is None
4009
4014
  :param int [limit]: max number of orders to return, default is None
4010
4015
  :param dict [params]: extra parameters specific to the exchange API endpoint
4011
- :param bool [params.stop]: True if fetching trigger or conditional orders
4016
+ :param bool [params.trigger]: True if fetching trigger or conditional orders
4012
4017
  :param str [params.ordType]: "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
4013
4018
  :param str [params.algoId]: Algo ID "'433845797218942976'"
4014
4019
  :param int [params.until]: timestamp in ms to fetch orders for
@@ -4043,18 +4048,18 @@ class okx(Exchange, ImplicitAPI):
4043
4048
  defaultMethod = self.safe_string(options, 'method', 'privateGetTradeOrdersHistory')
4044
4049
  method = self.safe_string(params, 'method', defaultMethod)
4045
4050
  ordType = self.safe_string(params, 'ordType')
4046
- stop = self.safe_value_2(params, 'stop', 'trigger')
4051
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
4047
4052
  trailing = self.safe_bool(params, 'trailing', False)
4048
4053
  if trailing:
4049
4054
  method = 'privateGetTradeOrdersAlgoHistory'
4050
4055
  request['ordType'] = 'move_order_stop'
4051
- elif stop or (ordType in algoOrderTypes):
4056
+ elif trigger or (ordType in algoOrderTypes):
4052
4057
  method = 'privateGetTradeOrdersAlgoHistory'
4053
4058
  algoId = self.safe_string(params, 'algoId')
4054
4059
  if algoId is not None:
4055
4060
  request['algoId'] = algoId
4056
4061
  params = self.omit(params, 'algoId')
4057
- if stop:
4062
+ if trigger:
4058
4063
  if ordType is None:
4059
4064
  raise ArgumentsRequired(self.id + ' fetchCanceledOrders() requires an "ordType" string parameter, "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"')
4060
4065
  else:
@@ -4224,14 +4229,14 @@ class okx(Exchange, ImplicitAPI):
4224
4229
  defaultMethod = self.safe_string(options, 'method', 'privateGetTradeOrdersHistory')
4225
4230
  method = self.safe_string(params, 'method', defaultMethod)
4226
4231
  ordType = self.safe_string(params, 'ordType')
4227
- stop = self.safe_bool_2(params, 'stop', 'trigger')
4232
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
4228
4233
  trailing = self.safe_bool(params, 'trailing', False)
4229
- if trailing or stop or (ordType in algoOrderTypes):
4234
+ if trailing or trigger or (ordType in algoOrderTypes):
4230
4235
  method = 'privateGetTradeOrdersAlgoHistory'
4231
4236
  request['state'] = 'effective'
4232
4237
  if trailing:
4233
4238
  request['ordType'] = 'move_order_stop'
4234
- elif stop:
4239
+ elif trigger:
4235
4240
  if ordType is None:
4236
4241
  request['ordType'] = 'trigger'
4237
4242
  else:
@@ -4453,7 +4458,7 @@ class okx(Exchange, ImplicitAPI):
4453
4458
  :param str [params.marginMode]: 'cross' or 'isolated'
4454
4459
  :param int [params.until]: the latest time in ms to fetch entries for
4455
4460
  :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)
4456
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
4461
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
4457
4462
  """
4458
4463
  self.load_markets()
4459
4464
  paginate = False
@@ -7033,7 +7038,7 @@ class okx(Exchange, ImplicitAPI):
7033
7038
  # }
7034
7039
  #
7035
7040
  data = self.safe_list(response, 'data', [])
7036
- return self.parse_open_interests(data, None, since, limit)
7041
+ return self.parse_open_interests_history(data, None, since, limit)
7037
7042
 
7038
7043
  def parse_open_interest(self, interest, market: Market = None):
7039
7044
  #
ccxt/phemex.py CHANGED
@@ -2804,15 +2804,15 @@ class phemex(Exchange, ImplicitAPI):
2804
2804
  raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument')
2805
2805
  self.load_markets()
2806
2806
  market = self.market(symbol)
2807
- stop = self.safe_value_2(params, 'stop', 'trigger', False)
2808
- params = self.omit(params, 'stop', 'trigger')
2807
+ trigger = self.safe_value_2(params, 'stop', 'trigger', False)
2808
+ params = self.omit(params, ['stop', 'trigger'])
2809
2809
  request: dict = {
2810
2810
  'symbol': market['id'],
2811
2811
  # 'untriggerred': False, # False to cancel non-conditional orders, True to cancel conditional orders
2812
2812
  # 'text': 'up to 40 characters max',
2813
2813
  }
2814
- if stop:
2815
- request['untriggerred'] = stop
2814
+ if trigger:
2815
+ request['untriggerred'] = trigger
2816
2816
  response = None
2817
2817
  if market['settle'] == 'USDT':
2818
2818
  response = self.privateDeleteGOrdersAll(self.extend(request, params))
@@ -3894,19 +3894,23 @@ class phemex(Exchange, ImplicitAPI):
3894
3894
  marketId = self.safe_string(contract, 'symbol')
3895
3895
  symbol = self.safe_symbol(marketId, market)
3896
3896
  timestamp = self.safe_integer_product(contract, 'timestamp', 0.000001)
3897
+ markEp = self.from_ep(self.safe_string(contract, 'markEp'), market)
3898
+ indexEp = self.from_ep(self.safe_string(contract, 'indexEp'), market)
3899
+ fundingRateEr = self.from_er(self.safe_string(contract, 'fundingRateEr'), market)
3900
+ nextFundingRateEr = self.from_er(self.safe_string(contract, 'predFundingRateEr'), market)
3897
3901
  return {
3898
3902
  'info': contract,
3899
3903
  'symbol': symbol,
3900
- 'markPrice': self.from_ep(self.safe_string_2(contract, 'markEp', 'markPriceRp'), market),
3901
- 'indexPrice': self.from_ep(self.safe_string_2(contract, 'indexEp', 'indexPriceRp'), market),
3904
+ 'markPrice': self.safe_number(contract, 'markPriceRp', markEp),
3905
+ 'indexPrice': self.safe_number(contract, 'indexPriceRp', indexEp),
3902
3906
  'interestRate': None,
3903
3907
  'estimatedSettlePrice': None,
3904
3908
  'timestamp': timestamp,
3905
3909
  'datetime': self.iso8601(timestamp),
3906
- 'fundingRate': self.from_er(self.safe_string(contract, 'fundingRateEr'), market),
3910
+ 'fundingRate': self.safe_number(contract, 'fundingRateRr', fundingRateEr),
3907
3911
  'fundingTimestamp': None,
3908
3912
  'fundingDatetime': None,
3909
- 'nextFundingRate': self.from_er(self.safe_string_2(contract, 'predFundingRateEr', 'predFundingRateRr'), market),
3913
+ 'nextFundingRate': self.safe_number(contract, 'predFundingRateRr', nextFundingRateEr),
3910
3914
  'nextFundingTimestamp': None,
3911
3915
  'nextFundingDatetime': None,
3912
3916
  'previousFundingRate': None,
ccxt/poloniex.py CHANGED
@@ -1201,7 +1201,7 @@ class poloniex(Exchange, ImplicitAPI):
1201
1201
  :param int [since]: the earliest time in ms to fetch open orders for
1202
1202
  :param int [limit]: the maximum number of open orders structures to retrieve
1203
1203
  :param dict [params]: extra parameters specific to the exchange API endpoint
1204
- :param boolean [params.stop]: set True to fetch trigger orders instead of regular orders
1204
+ :param boolean [params.trigger]: set True to fetch trigger orders instead of regular orders
1205
1205
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1206
1206
  """
1207
1207
  self.load_markets()
ccxt/poloniexfutures.py CHANGED
@@ -1180,17 +1180,17 @@ class poloniexfutures(Exchange, ImplicitAPI):
1180
1180
  cancel all open orders
1181
1181
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
1182
1182
  :param dict [params]: extra parameters specific to the exchange API endpoint
1183
- :param dict [params.stop]: When True, all the trigger orders will be cancelled
1183
+ :param dict [params.trigger]: When True, all the trigger orders will be cancelled
1184
1184
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1185
1185
  """
1186
1186
  self.load_markets()
1187
1187
  request: dict = {}
1188
1188
  if symbol is not None:
1189
1189
  request['symbol'] = self.market_id(symbol)
1190
- stop = self.safe_value_2(params, 'stop', 'trigger')
1190
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
1191
1191
  params = self.omit(params, ['stop', 'trigger'])
1192
1192
  response = None
1193
- if stop:
1193
+ if trigger:
1194
1194
  response = self.privateDeleteStopOrders(self.extend(request, params))
1195
1195
  else:
1196
1196
  response = self.privateDeleteOrders(self.extend(request, params))
@@ -1254,13 +1254,13 @@ class poloniexfutures(Exchange, ImplicitAPI):
1254
1254
  :returns: An `array of order structures <https://docs.ccxt.com/#/?id=order-structure>`
1255
1255
  """
1256
1256
  self.load_markets()
1257
- stop = self.safe_value_2(params, 'stop', 'trigger')
1257
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
1258
1258
  until = self.safe_integer(params, 'until')
1259
1259
  params = self.omit(params, ['trigger', 'stop', 'until'])
1260
1260
  if status == 'closed':
1261
1261
  status = 'done'
1262
1262
  request: dict = {}
1263
- if not stop:
1263
+ if not trigger:
1264
1264
  request['status'] = 'active' if (status == 'open') else 'done'
1265
1265
  elif status != 'open':
1266
1266
  raise BadRequest(self.id + ' fetchOrdersByStatus() can only fetch untriggered stop orders')
@@ -1273,7 +1273,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1273
1273
  if until is not None:
1274
1274
  request['endAt'] = until
1275
1275
  response = None
1276
- if stop:
1276
+ if trigger:
1277
1277
  response = self.privateGetStopOrders(self.extend(request, params))
1278
1278
  else:
1279
1279
  response = self.privateGetOrders(self.extend(request, params))
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.39'
7
+ __version__ = '4.4.41'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/bitget.py CHANGED
@@ -1090,7 +1090,7 @@ class bitget(ccxt.async_support.bitget):
1090
1090
  :param int [since]: the earliest time in ms to fetch orders for
1091
1091
  :param int [limit]: the maximum number of order structures to retrieve
1092
1092
  :param dict [params]: extra parameters specific to the exchange API endpoint
1093
- :param boolean [params.stop]: *contract only* set to True for watching trigger orders
1093
+ :param boolean [params.trigger]: *contract only* set to True for watching trigger orders
1094
1094
  :param str [params.marginMode]: 'isolated' or 'cross' for watching spot margin orders]
1095
1095
  :param str [params.type]: 'spot', 'swap'
1096
1096
  :param str [params.subType]: 'linear', 'inverse'
ccxt/pro/bybit.py CHANGED
@@ -117,6 +117,12 @@ class bybit(ccxt.async_support.bybit):
117
117
  'fetchPositionsSnapshot': True, # or False
118
118
  'awaitPositionsSnapshot': True, # whether to wait for the positions snapshot before providing updates
119
119
  },
120
+ 'watchMyTrades': {
121
+ # filter execType: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
122
+ 'filterExecTypes': [
123
+ 'Trade', 'AdlTrade', 'BustTrade', 'Settle',
124
+ ],
125
+ },
120
126
  'spot': {
121
127
  'timeframes': {
122
128
  '1m': '1m',
@@ -309,7 +315,7 @@ class bybit(ccxt.async_support.bybit):
309
315
  :param str id: order id
310
316
  :param str symbol: unified symbol of the market the order was made in
311
317
  :param dict [params]: extra parameters specific to the exchange API endpoint
312
- :param boolean [params.stop]: *spot only* whether the order is a stop order
318
+ :param boolean [params.trigger]: *spot only* whether the order is a trigger order
313
319
  :param str [params.orderFilter]: *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
314
320
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
315
321
  """
@@ -1306,12 +1312,17 @@ class bybit(ccxt.async_support.bybit):
1306
1312
  self.myTrades = ArrayCacheBySymbolById(limit)
1307
1313
  trades = self.myTrades
1308
1314
  symbols: dict = {}
1315
+ filterExecTypes = self.handle_option('watchMyTrades', 'filterExecTypes', [])
1309
1316
  for i in range(0, len(data)):
1310
1317
  rawTrade = data[i]
1311
1318
  parsed = None
1312
1319
  if spot:
1313
1320
  parsed = self.parse_ws_trade(rawTrade)
1314
1321
  else:
1322
+ # filter unified trades
1323
+ execType = self.safe_string(rawTrade, 'execType', '')
1324
+ if not self.in_array(execType, filterExecTypes):
1325
+ continue
1315
1326
  parsed = self.parse_trade(rawTrade)
1316
1327
  symbol = parsed['symbol']
1317
1328
  symbols[symbol] = True
ccxt/pro/coinex.py CHANGED
@@ -859,7 +859,7 @@ class coinex(ccxt.async_support.coinex):
859
859
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
860
860
  """
861
861
  await self.load_markets()
862
- stop = self.safe_bool_2(params, 'trigger', 'stop')
862
+ trigger = self.safe_bool_2(params, 'trigger', 'stop')
863
863
  params = self.omit(params, ['trigger', 'stop'])
864
864
  messageHash = 'orders'
865
865
  market = None
@@ -880,7 +880,7 @@ class coinex(ccxt.async_support.coinex):
880
880
  else:
881
881
  messageHash += ':swap'
882
882
  method = None
883
- if stop:
883
+ if trigger:
884
884
  method = 'stop.subscribe'
885
885
  else:
886
886
  method = 'order.subscribe'
ccxt/pro/gate.py CHANGED
@@ -211,14 +211,14 @@ class gate(ccxt.async_support.gate):
211
211
  """
212
212
  await self.load_markets()
213
213
  market = None if (symbol is None) else self.market(symbol)
214
- stop = self.safe_bool_2(params, 'stop', 'trigger')
214
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
215
215
  messageType = self.get_type_by_market(market)
216
216
  channel = messageType + '.order_cancel_cp'
217
217
  channel, params = self.handle_option_and_params(params, 'cancelAllOrdersWs', 'channel', channel)
218
218
  url = self.get_url_by_market(market)
219
219
  params = self.omit(params, ['stop', 'trigger'])
220
220
  type, query = self.handle_market_type_and_params('cancelAllOrders', market, params)
221
- request, requestParams = self.multiOrderSpotPrepareRequest(market, stop, query) if (type == 'spot') else self.prepareRequest(market, type, query)
221
+ request, requestParams = self.multiOrderSpotPrepareRequest(market, trigger, query) if (type == 'spot') else self.prepareRequest(market, type, query)
222
222
  await self.authenticate(url, messageType)
223
223
  rawOrders = await self.request_private(url, self.extend(request, requestParams), channel)
224
224
  return self.parse_orders(rawOrders, market)
@@ -233,15 +233,15 @@ class gate(ccxt.async_support.gate):
233
233
  :param str id: Order id
234
234
  :param str symbol: Unified market symbol
235
235
  :param dict [params]: Parameters specified by the exchange api
236
- :param bool [params.stop]: True if the order to be cancelled is a trigger order
236
+ :param bool [params.trigger]: True if the order to be cancelled is a trigger order
237
237
  :returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
238
238
  """
239
239
  await self.load_markets()
240
240
  market = None if (symbol is None) else self.market(symbol)
241
- stop = self.safe_value_n(params, ['is_stop_order', 'stop', 'trigger'], False)
241
+ trigger = self.safe_value_n(params, ['is_stop_order', 'stop', 'trigger'], False)
242
242
  params = self.omit(params, ['is_stop_order', 'stop', 'trigger'])
243
243
  type, query = self.handle_market_type_and_params('cancelOrder', market, params)
244
- request, requestParams = self.spotOrderPrepareRequest(market, stop, query) if (type == 'spot' or type == 'margin') else self.prepareRequest(market, type, query)
244
+ request, requestParams = self.spotOrderPrepareRequest(market, trigger, query) if (type == 'spot' or type == 'margin') else self.prepareRequest(market, type, query)
245
245
  messageType = self.get_type_by_market(market)
246
246
  channel = messageType + '.order_cancel'
247
247
  url = self.get_url_by_market(market)
@@ -286,7 +286,7 @@ class gate(ccxt.async_support.gate):
286
286
  :param str id: Order id
287
287
  :param str symbol: Unified market symbol, *required for spot and margin*
288
288
  :param dict [params]: Parameters specified by the exchange api
289
- :param bool [params.stop]: True if the order being fetched is a trigger order
289
+ :param bool [params.trigger]: True if the order being fetched is a trigger order
290
290
  :param str [params.marginMode]: 'cross' or 'isolated' - marginMode for margin trading if not provided self.options['defaultMarginMode'] is used
291
291
  :param str [params.type]: 'spot', 'swap', or 'future', if not provided self.options['defaultMarginMode'] is used
292
292
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol is not None, default="usdt" for swap and "btc" for future
ccxt/pro/kucoin.py CHANGED
@@ -898,14 +898,14 @@ class kucoin(ccxt.async_support.kucoin):
898
898
  :param int [since]: the earliest time in ms to fetch orders for
899
899
  :param int [limit]: the maximum number of order structures to retrieve
900
900
  :param dict [params]: extra parameters specific to the exchange API endpoint
901
- :param boolean [params.stop]: trigger orders are watched if True
901
+ :param boolean [params.trigger]: trigger orders are watched if True
902
902
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
903
903
  """
904
904
  await self.load_markets()
905
- stop = self.safe_value_2(params, 'stop', 'trigger')
905
+ trigger = self.safe_value_2(params, 'stop', 'trigger')
906
906
  params = self.omit(params, ['stop', 'trigger'])
907
907
  url = await self.negotiate(True)
908
- topic = '/spotMarket/advancedOrders' if stop else '/spotMarket/tradeOrders'
908
+ topic = '/spotMarket/advancedOrders' if trigger else '/spotMarket/tradeOrders'
909
909
  request: dict = {
910
910
  'privateChannel': True,
911
911
  }
ccxt/pro/okx.py CHANGED
@@ -720,9 +720,9 @@ class okx(ccxt.async_support.okx):
720
720
  :returns dict: an array of `liquidation structures <https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure>`
721
721
  """
722
722
  await self.load_markets()
723
- isStop = self.safe_value_2(params, 'stop', 'trigger', False)
723
+ isTrigger = self.safe_value_2(params, 'stop', 'trigger', False)
724
724
  params = self.omit(params, ['stop', 'trigger'])
725
- await self.authenticate({'access': 'business' if isStop else 'private'})
725
+ await self.authenticate({'access': 'business' if isTrigger else 'private'})
726
726
  symbols = self.market_symbols(symbols, None, True, True)
727
727
  messageHash = 'myLiquidations'
728
728
  messageHashes = []
@@ -1513,7 +1513,7 @@ class okx(ccxt.async_support.okx):
1513
1513
  :param int [since]: the earliest time in ms to fetch trades for
1514
1514
  :param int [limit]: the maximum number of trade structures to retrieve
1515
1515
  :param dict [params]: extra parameters specific to the exchange API endpoint
1516
- :param bool [params.stop]: True if fetching trigger or conditional trades
1516
+ :param bool [params.trigger]: True if fetching trigger or conditional trades
1517
1517
  :param str [params.type]: 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
1518
1518
  :param str [params.marginMode]: 'cross' or 'isolated', for automatically setting the type to spot margin
1519
1519
  :returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
@@ -1521,11 +1521,11 @@ class okx(ccxt.async_support.okx):
1521
1521
  # By default, receive order updates from any instrument type
1522
1522
  type = None
1523
1523
  type, params = self.handle_option_and_params(params, 'watchMyTrades', 'type', 'ANY')
1524
- isStop = self.safe_bool(params, 'stop', False)
1525
- params = self.omit(params, ['stop'])
1524
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop', False)
1525
+ params = self.omit(params, ['trigger', 'stop'])
1526
1526
  await self.load_markets()
1527
- await self.authenticate({'access': 'business' if isStop else 'private'})
1528
- channel = 'orders-algo' if isStop else 'orders'
1527
+ await self.authenticate({'access': 'business' if isTrigger else 'private'})
1528
+ channel = 'orders-algo' if isTrigger else 'orders'
1529
1529
  messageHash = channel + '::myTrades'
1530
1530
  market = None
1531
1531
  if symbol is not None:
@@ -1690,7 +1690,7 @@ class okx(ccxt.async_support.okx):
1690
1690
  :param int [since]: the earliest time in ms to fetch orders for
1691
1691
  :param int [limit]: the maximum number of order structures to retrieve
1692
1692
  :param dict [params]: extra parameters specific to the exchange API endpoint
1693
- :param bool [params.stop]: True if fetching trigger or conditional orders
1693
+ :param bool [params.trigger]: True if fetching trigger or conditional orders
1694
1694
  :param str [params.type]: 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
1695
1695
  :param str [params.marginMode]: 'cross' or 'isolated', for automatically setting the type to spot margin
1696
1696
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1698,10 +1698,10 @@ class okx(ccxt.async_support.okx):
1698
1698
  type = None
1699
1699
  # By default, receive order updates from any instrument type
1700
1700
  type, params = self.handle_option_and_params(params, 'watchOrders', 'type', 'ANY')
1701
- isStop = self.safe_value_2(params, 'stop', 'trigger', False)
1701
+ isTrigger = self.safe_value_2(params, 'stop', 'trigger', False)
1702
1702
  params = self.omit(params, ['stop', 'trigger'])
1703
1703
  await self.load_markets()
1704
- await self.authenticate({'access': 'business' if isStop else 'private'})
1704
+ await self.authenticate({'access': 'business' if isTrigger else 'private'})
1705
1705
  market = None
1706
1706
  if symbol is not None:
1707
1707
  market = self.market(symbol)
@@ -1718,7 +1718,7 @@ class okx(ccxt.async_support.okx):
1718
1718
  request: dict = {
1719
1719
  'instType': uppercaseType,
1720
1720
  }
1721
- channel = 'orders-algo' if isStop else 'orders'
1721
+ channel = 'orders-algo' if isTrigger else 'orders'
1722
1722
  orders = await self.subscribe('private', channel, channel, symbol, self.extend(request, params))
1723
1723
  if self.newUpdates:
1724
1724
  limit = orders.getLimit(symbol, limit)
ccxt/pro/upbit.py CHANGED
@@ -100,11 +100,11 @@ class upbit(ccxt.async_support.upbit):
100
100
 
101
101
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
102
102
  """
103
- watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
103
+ watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
104
104
 
105
105
  https://global-docs.upbit.com/reference/websocket-ticker
106
106
 
107
- @param symbols
107
+ :param str[] symbols: unified symbol of the market to fetch the ticker for
108
108
  :param dict [params]: extra parameters specific to the exchange API endpoint
109
109
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
110
110
  """
ccxt/vertex.py CHANGED
@@ -1964,7 +1964,7 @@ class vertex(Exchange, ImplicitAPI):
1964
1964
  :param int [since]: the earliest time in ms to fetch open orders for
1965
1965
  :param int [limit]: the maximum number of open orders structures to retrieve
1966
1966
  :param dict [params]: extra parameters specific to the exchange API endpoint
1967
- :param boolean [params.stop]: whether the order is a stop/algo order
1967
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
1968
1968
  :param str [params.user]: user address, will default to self.walletAddress if not provided
1969
1969
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1970
1970
  """
@@ -1974,13 +1974,13 @@ class vertex(Exchange, ImplicitAPI):
1974
1974
  userAddress, params = self.handle_public_address('fetchOpenOrders', params)
1975
1975
  request = {}
1976
1976
  market: Market = None
1977
- stop = self.safe_bool_2(params, 'stop', 'trigger')
1977
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
1978
1978
  params = self.omit(params, ['stop', 'trigger'])
1979
1979
  if symbol is not None:
1980
1980
  market = self.market(symbol)
1981
1981
  request['product_id'] = self.parse_to_numeric(market['id'])
1982
1982
  response = None
1983
- if stop:
1983
+ if trigger:
1984
1984
  contracts = self.query_contracts()
1985
1985
  chainId = self.safe_string(contracts, 'chain_id')
1986
1986
  verifyingContractAddress = self.safe_string(contracts, 'endpoint_addr')
@@ -2076,14 +2076,14 @@ class vertex(Exchange, ImplicitAPI):
2076
2076
  :param int [since]: the earliest time in ms to fetch open orders for
2077
2077
  :param int [limit]: the maximum number of open orders structures to retrieve
2078
2078
  :param dict [params]: extra parameters specific to the exchange API endpoint
2079
- :param boolean [params.stop]: whether the order is a stop/algo order
2079
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
2080
2080
  :param str [params.user]: user address, will default to self.walletAddress if not provided
2081
2081
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2082
2082
  """
2083
2083
  self.check_required_credentials()
2084
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2084
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2085
2085
  params = self.omit(params, ['stop', 'trigger'])
2086
- if not stop:
2086
+ if not trigger:
2087
2087
  raise NotSupported(self.id + ' fetchOrders only support trigger orders')
2088
2088
  userAddress = None
2089
2089
  userAddress, params = self.handle_public_address('fetchOrders', params)
@@ -2158,7 +2158,7 @@ class vertex(Exchange, ImplicitAPI):
2158
2158
  cancel all open orders in a market
2159
2159
  :param str symbol: unified market symbol
2160
2160
  :param dict [params]: extra parameters specific to the exchange API endpoint
2161
- :param boolean [params.stop]: whether the order is a stop/algo order
2161
+ :param boolean [params.trigger]: whether the order is a trigger/algo order
2162
2162
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2163
2163
  """
2164
2164
  self.check_required_credentials()
@@ -2189,10 +2189,10 @@ class vertex(Exchange, ImplicitAPI):
2189
2189
  'signature': self.build_cancel_all_orders_sig(cancels, chainId, verifyingContractAddress),
2190
2190
  },
2191
2191
  }
2192
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2192
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2193
2193
  params = self.omit(params, ['stop', 'trigger'])
2194
2194
  response = None
2195
- if stop:
2195
+ if trigger:
2196
2196
  response = self.v1TriggerPostExecute(self.extend(request, params))
2197
2197
  #
2198
2198
  # {
@@ -2286,10 +2286,10 @@ class vertex(Exchange, ImplicitAPI):
2286
2286
  'signature': self.build_cancel_orders_sig(cancels, chainId, verifyingContractAddress),
2287
2287
  },
2288
2288
  }
2289
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2289
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2290
2290
  params = self.omit(params, ['stop', 'trigger'])
2291
2291
  response = None
2292
- if stop:
2292
+ if trigger:
2293
2293
  response = self.v1TriggerPostExecute(self.extend(request, params))
2294
2294
  #
2295
2295
  # {