ccxt 4.4.39__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 (134) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ascendex.py +9 -9
  3. ccxt/async_support/__init__.py +1 -1
  4. ccxt/async_support/ascendex.py +9 -9
  5. ccxt/async_support/base/exchange.py +1 -1
  6. ccxt/async_support/base/ws/aiohttp_client.py +2 -2
  7. ccxt/async_support/binance.py +13 -17
  8. ccxt/async_support/bingx.py +1 -2
  9. ccxt/async_support/bit2c.py +0 -1
  10. ccxt/async_support/bitbank.py +0 -1
  11. ccxt/async_support/bitbns.py +0 -1
  12. ccxt/async_support/bitfinex.py +15 -16
  13. ccxt/async_support/bitfinex1.py +0 -1
  14. ccxt/async_support/bitflyer.py +0 -1
  15. ccxt/async_support/bitget.py +1 -2
  16. ccxt/async_support/bithumb.py +0 -1
  17. ccxt/async_support/bitmart.py +3 -4
  18. ccxt/async_support/bitmex.py +5 -6
  19. ccxt/async_support/bitopro.py +4 -5
  20. ccxt/async_support/bitrue.py +5 -7
  21. ccxt/async_support/bitso.py +1 -2
  22. ccxt/async_support/bitstamp.py +1 -2
  23. ccxt/async_support/bitteam.py +1 -3
  24. ccxt/async_support/bitvavo.py +2 -4
  25. ccxt/async_support/blockchaincom.py +5 -5
  26. ccxt/async_support/blofin.py +10 -10
  27. ccxt/async_support/btcalpha.py +0 -1
  28. ccxt/async_support/btcbox.py +0 -1
  29. ccxt/async_support/btcmarkets.py +1 -3
  30. ccxt/async_support/bybit.py +2 -3
  31. ccxt/async_support/cex.py +1 -1
  32. ccxt/async_support/coinbase.py +77 -1
  33. ccxt/async_support/coinbaseexchange.py +1 -1
  34. ccxt/async_support/coinbaseinternational.py +62 -0
  35. ccxt/async_support/coincatch.py +1 -1
  36. ccxt/async_support/coinex.py +9 -9
  37. ccxt/async_support/coinlist.py +1 -1
  38. ccxt/async_support/coinmetro.py +1 -1
  39. ccxt/async_support/cryptocom.py +91 -2
  40. ccxt/async_support/currencycom.py +1 -1
  41. ccxt/async_support/defx.py +1 -2
  42. ccxt/async_support/delta.py +1 -1
  43. ccxt/async_support/digifinex.py +1 -1
  44. ccxt/async_support/exmo.py +2 -2
  45. ccxt/async_support/gate.py +1 -1
  46. ccxt/async_support/hashkey.py +3 -5
  47. ccxt/async_support/htx.py +1 -1
  48. ccxt/async_support/hyperliquid.py +1 -1
  49. ccxt/async_support/kraken.py +1 -1
  50. ccxt/async_support/kucoin.py +24 -24
  51. ccxt/async_support/luno.py +1 -1
  52. ccxt/async_support/mexc.py +137 -1
  53. ccxt/async_support/ndax.py +1 -1
  54. ccxt/async_support/okcoin.py +18 -18
  55. ccxt/async_support/okx.py +21 -21
  56. ccxt/async_support/phemex.py +12 -8
  57. ccxt/async_support/poloniex.py +1 -1
  58. ccxt/async_support/poloniexfutures.py +6 -6
  59. ccxt/async_support/vertex.py +11 -11
  60. ccxt/async_support/woo.py +33 -33
  61. ccxt/async_support/woofipro.py +24 -24
  62. ccxt/async_support/xt.py +26 -26
  63. ccxt/async_support/zonda.py +1 -1
  64. ccxt/base/exchange.py +13 -16
  65. ccxt/binance.py +13 -17
  66. ccxt/bingx.py +1 -2
  67. ccxt/bit2c.py +0 -1
  68. ccxt/bitbank.py +0 -1
  69. ccxt/bitbns.py +0 -1
  70. ccxt/bitfinex.py +15 -16
  71. ccxt/bitfinex1.py +0 -1
  72. ccxt/bitflyer.py +0 -1
  73. ccxt/bitget.py +1 -2
  74. ccxt/bithumb.py +0 -1
  75. ccxt/bitmart.py +3 -4
  76. ccxt/bitmex.py +5 -6
  77. ccxt/bitopro.py +4 -5
  78. ccxt/bitrue.py +5 -7
  79. ccxt/bitso.py +1 -2
  80. ccxt/bitstamp.py +1 -2
  81. ccxt/bitteam.py +1 -3
  82. ccxt/bitvavo.py +2 -4
  83. ccxt/blockchaincom.py +5 -5
  84. ccxt/blofin.py +10 -10
  85. ccxt/btcalpha.py +0 -1
  86. ccxt/btcbox.py +0 -1
  87. ccxt/btcmarkets.py +1 -3
  88. ccxt/bybit.py +2 -3
  89. ccxt/cex.py +1 -1
  90. ccxt/coinbase.py +77 -1
  91. ccxt/coinbaseexchange.py +1 -1
  92. ccxt/coinbaseinternational.py +62 -0
  93. ccxt/coincatch.py +1 -1
  94. ccxt/coinex.py +9 -9
  95. ccxt/coinlist.py +1 -1
  96. ccxt/coinmetro.py +1 -1
  97. ccxt/cryptocom.py +91 -2
  98. ccxt/currencycom.py +1 -1
  99. ccxt/defx.py +1 -2
  100. ccxt/delta.py +1 -1
  101. ccxt/digifinex.py +1 -1
  102. ccxt/exmo.py +2 -2
  103. ccxt/gate.py +1 -1
  104. ccxt/hashkey.py +3 -5
  105. ccxt/htx.py +1 -1
  106. ccxt/hyperliquid.py +1 -1
  107. ccxt/kraken.py +1 -1
  108. ccxt/kucoin.py +24 -24
  109. ccxt/luno.py +1 -1
  110. ccxt/mexc.py +137 -1
  111. ccxt/ndax.py +1 -1
  112. ccxt/okcoin.py +18 -18
  113. ccxt/okx.py +21 -21
  114. ccxt/phemex.py +12 -8
  115. ccxt/poloniex.py +1 -1
  116. ccxt/poloniexfutures.py +6 -6
  117. ccxt/pro/__init__.py +1 -1
  118. ccxt/pro/bitget.py +1 -1
  119. ccxt/pro/bybit.py +12 -1
  120. ccxt/pro/coinex.py +2 -2
  121. ccxt/pro/gate.py +6 -6
  122. ccxt/pro/kucoin.py +3 -3
  123. ccxt/pro/okx.py +11 -11
  124. ccxt/pro/upbit.py +2 -2
  125. ccxt/vertex.py +11 -11
  126. ccxt/woo.py +33 -33
  127. ccxt/woofipro.py +24 -24
  128. ccxt/xt.py +26 -26
  129. ccxt/zonda.py +1 -1
  130. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
  131. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/RECORD +134 -134
  132. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
  133. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
  134. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
ccxt/bitfinex1.py CHANGED
@@ -1247,7 +1247,6 @@ class bitfinex1(Exchange, ImplicitAPI):
1247
1247
  'postOnly': None,
1248
1248
  'side': side,
1249
1249
  'price': self.safe_string(order, 'price'),
1250
- 'stopPrice': None,
1251
1250
  'triggerPrice': None,
1252
1251
  'average': self.safe_string(order, 'avg_execution_price'),
1253
1252
  'amount': self.safe_string(order, 'original_amount'),
ccxt/bitflyer.py CHANGED
@@ -638,7 +638,6 @@ class bitflyer(Exchange, ImplicitAPI):
638
638
  'postOnly': None,
639
639
  'side': side,
640
640
  'price': price,
641
- 'stopPrice': None,
642
641
  'triggerPrice': None,
643
642
  'cost': None,
644
643
  'amount': amount,
ccxt/bitget.py CHANGED
@@ -4102,7 +4102,6 @@ class bitget(Exchange, ImplicitAPI):
4102
4102
  'timeInForce': timeInForce,
4103
4103
  'postOnly': postOnly,
4104
4104
  'reduceOnly': reduceOnly,
4105
- 'stopPrice': self.safe_number(order, 'triggerPrice'),
4106
4105
  'triggerPrice': self.safe_number(order, 'triggerPrice'),
4107
4106
  'takeProfitPrice': self.safe_number_2(order, 'presetStopSurplusPrice', 'stopSurplusTriggerPrice'),
4108
4107
  'stopLossPrice': self.safe_number_2(order, 'presetStopLossPrice', 'stopLossTriggerPrice'),
@@ -5712,7 +5711,7 @@ class bitget(Exchange, ImplicitAPI):
5712
5711
  :param str [params.symbol]: *contract only* unified market symbol
5713
5712
  :param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5714
5713
  :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)
5715
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
5714
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
5716
5715
  """
5717
5716
  self.load_markets()
5718
5717
  symbol = self.safe_string(params, 'symbol')
ccxt/bithumb.py CHANGED
@@ -905,7 +905,6 @@ class bithumb(Exchange, ImplicitAPI):
905
905
  'postOnly': None,
906
906
  'side': side,
907
907
  'price': price,
908
- 'stopPrice': None,
909
908
  'triggerPrice': None,
910
909
  'amount': amount,
911
910
  'cost': None,
ccxt/bitmart.py CHANGED
@@ -2482,7 +2482,6 @@ class bitmart(Exchange, ImplicitAPI):
2482
2482
  'postOnly': postOnly,
2483
2483
  'side': self.parse_order_side(self.safe_string(order, 'side')),
2484
2484
  'price': self.omit_zero(priceString),
2485
- 'stopPrice': trailingActivationPrice,
2486
2485
  'triggerPrice': trailingActivationPrice,
2487
2486
  'amount': self.omit_zero(self.safe_string(order, 'size')),
2488
2487
  'cost': self.safe_string_2(order, 'filled_notional', 'filledNotional'),
@@ -2890,7 +2889,7 @@ class bitmart(Exchange, ImplicitAPI):
2890
2889
  :param str symbol: unified symbol of the market the order was made in
2891
2890
  :param dict [params]: extra parameters specific to the exchange API endpoint
2892
2891
  :param str [params.clientOrderId]: *spot only* the client order id of the order to cancel
2893
- :param boolean [params.stop]: *swap only* whether the order is a stop order
2892
+ :param boolean [params.trigger]: *swap only* whether the order is a trigger order
2894
2893
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2895
2894
  """
2896
2895
  if symbol is None:
@@ -2910,9 +2909,9 @@ class bitmart(Exchange, ImplicitAPI):
2910
2909
  if market['spot']:
2911
2910
  response = self.privatePostSpotV3CancelOrder(self.extend(request, params))
2912
2911
  else:
2913
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2912
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2914
2913
  params = self.omit(params, ['stop', 'trigger'])
2915
- if not stop:
2914
+ if not trigger:
2916
2915
  response = self.privatePostContractPrivateCancelOrder(self.extend(request, params))
2917
2916
  else:
2918
2917
  response = self.privatePostContractPrivateCancelPlanOrder(self.extend(request, params))
ccxt/bitmex.py CHANGED
@@ -1277,7 +1277,7 @@ class bitmex(Exchange, ImplicitAPI):
1277
1277
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
1278
1278
  :param int [limit]: max number of ledger entries to return, default is None
1279
1279
  :param dict [params]: extra parameters specific to the exchange API endpoint
1280
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1280
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1281
1281
  """
1282
1282
  self.load_markets()
1283
1283
  request: dict = {
@@ -1807,7 +1807,7 @@ class bitmex(Exchange, ImplicitAPI):
1807
1807
  if execInst is not None:
1808
1808
  postOnly = (execInst == 'ParticipateDoNotInitiate')
1809
1809
  timestamp = self.parse8601(self.safe_string(order, 'timestamp'))
1810
- stopPrice = self.safe_number(order, 'stopPx')
1810
+ triggerPrice = self.safe_number(order, 'stopPx')
1811
1811
  remaining = self.safe_string(order, 'leavesQty')
1812
1812
  return self.safe_order({
1813
1813
  'info': order,
@@ -1822,8 +1822,7 @@ class bitmex(Exchange, ImplicitAPI):
1822
1822
  'postOnly': postOnly,
1823
1823
  'side': self.safe_string_lower(order, 'side'),
1824
1824
  'price': self.safe_string(order, 'price'),
1825
- 'stopPrice': stopPrice,
1826
- 'triggerPrice': stopPrice,
1825
+ 'triggerPrice': triggerPrice,
1827
1826
  'amount': amount,
1828
1827
  'cost': cost,
1829
1828
  'average': average,
@@ -1961,7 +1960,7 @@ class bitmex(Exchange, ImplicitAPI):
1961
1960
  else:
1962
1961
  if triggerPrice is None:
1963
1962
  # if exchange specific trigger types were provided
1964
- raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice(stopPx|stopPrice) parameter for the ' + orderType + ' order type')
1963
+ raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice parameter for the ' + orderType + ' order type')
1965
1964
  request['stopPx'] = self.parse_to_numeric(self.price_to_precision(symbol, triggerPrice))
1966
1965
  request['ordType'] = orderType
1967
1966
  params = self.omit(params, ['triggerPrice', 'stopPrice', 'stopPx', 'triggerDirection', 'trailingAmount'])
@@ -2523,7 +2522,7 @@ class bitmex(Exchange, ImplicitAPI):
2523
2522
  'timestamp': self.parse8601(datetime),
2524
2523
  'datetime': datetime,
2525
2524
  'fundingRate': self.safe_number(contract, 'fundingRate'),
2526
- 'fundingTimestamp': self.parse_to_numeric(self.iso8601(fundingDatetime)),
2525
+ 'fundingTimestamp': self.parse8601(fundingDatetime),
2527
2526
  'fundingDatetime': fundingDatetime,
2528
2527
  'nextFundingRate': self.safe_number(contract, 'indicativeFundingRate'),
2529
2528
  'nextFundingTimestamp': None,
ccxt/bitopro.py CHANGED
@@ -964,7 +964,6 @@ class bitopro(Exchange, ImplicitAPI):
964
964
  'postOnly': postOnly,
965
965
  'side': side,
966
966
  'price': price,
967
- 'stopPrice': None,
968
967
  'triggerPrice': None,
969
968
  'amount': amount,
970
969
  'cost': None,
@@ -1006,12 +1005,12 @@ class bitopro(Exchange, ImplicitAPI):
1006
1005
  request['price'] = self.price_to_precision(symbol, price)
1007
1006
  if orderType == 'STOP_LIMIT':
1008
1007
  request['price'] = self.price_to_precision(symbol, price)
1009
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1008
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1010
1009
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1011
- if stopPrice is None:
1012
- raise InvalidOrder(self.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders')
1010
+ if triggerPrice is None:
1011
+ raise InvalidOrder(self.id + ' createOrder() requires a triggerPrice parameter for ' + orderType + ' orders')
1013
1012
  else:
1014
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1013
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1015
1014
  condition = self.safe_string(params, 'condition')
1016
1015
  if condition is None:
1017
1016
  raise InvalidOrder(self.id + ' createOrder() requires a condition parameter for ' + orderType + ' orders')
ccxt/bitrue.py CHANGED
@@ -1777,8 +1777,7 @@ class bitrue(Exchange, ImplicitAPI):
1777
1777
  postOnly = (type == 'limit_maker') or (timeInForce == 'GTX') or (type == 'post_only')
1778
1778
  if type == 'limit_maker':
1779
1779
  type = 'limit'
1780
- stopPriceString = self.safe_string(order, 'stopPrice')
1781
- stopPrice = self.parse_number(self.omit_zero(stopPriceString))
1780
+ triggerPrice = self.parse_number(self.omit_zero(self.safe_string(order, 'stopPrice')))
1782
1781
  return self.safe_order({
1783
1782
  'info': order,
1784
1783
  'id': id,
@@ -1792,8 +1791,7 @@ class bitrue(Exchange, ImplicitAPI):
1792
1791
  'postOnly': postOnly,
1793
1792
  'side': side,
1794
1793
  'price': price,
1795
- 'stopPrice': stopPrice,
1796
- 'triggerPrice': stopPrice,
1794
+ 'triggerPrice': triggerPrice,
1797
1795
  'amount': amount,
1798
1796
  'cost': cost,
1799
1797
  'average': average,
@@ -1916,10 +1914,10 @@ class bitrue(Exchange, ImplicitAPI):
1916
1914
  if clientOrderId is not None:
1917
1915
  params = self.omit(params, ['newClientOrderId', 'clientOrderId'])
1918
1916
  request['newClientOrderId'] = clientOrderId
1919
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1920
- if stopPrice is not None:
1917
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1918
+ if triggerPrice is not None:
1921
1919
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1922
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1920
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1923
1921
  response = self.spotV1PrivatePostOrder(self.extend(request, params))
1924
1922
  data = response
1925
1923
  else:
ccxt/bitso.py CHANGED
@@ -209,7 +209,7 @@ class bitso(Exchange, ImplicitAPI):
209
209
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
210
210
  :param int [limit]: max number of ledger entries to return, default is None
211
211
  :param dict [params]: extra parameters specific to the exchange API endpoint
212
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
212
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
213
213
  """
214
214
  request: dict = {}
215
215
  if limit is not None:
@@ -1108,7 +1108,6 @@ class bitso(Exchange, ImplicitAPI):
1108
1108
  'postOnly': None,
1109
1109
  'side': side,
1110
1110
  'price': price,
1111
- 'stopPrice': None,
1112
1111
  'triggerPrice': None,
1113
1112
  'amount': amount,
1114
1113
  'cost': None,
ccxt/bitstamp.py CHANGED
@@ -1850,7 +1850,6 @@ class bitstamp(Exchange, ImplicitAPI):
1850
1850
  'postOnly': None,
1851
1851
  'side': side,
1852
1852
  'price': price,
1853
- 'stopPrice': None,
1854
1853
  'triggerPrice': None,
1855
1854
  'cost': None,
1856
1855
  'amount': amount,
@@ -1968,7 +1967,7 @@ class bitstamp(Exchange, ImplicitAPI):
1968
1967
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
1969
1968
  :param int [limit]: max number of ledger entries to return, default is None
1970
1969
  :param dict [params]: extra parameters specific to the exchange API endpoint
1971
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1970
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1972
1971
  """
1973
1972
  self.load_markets()
1974
1973
  request: dict = {}
ccxt/bitteam.py CHANGED
@@ -1185,7 +1185,6 @@ class bitteam(Exchange, ImplicitAPI):
1185
1185
  side = self.safe_string(order, 'side')
1186
1186
  feeRaw = self.safe_value(order, 'fee')
1187
1187
  price = self.safe_string(order, 'price')
1188
- stopPrice = self.safe_string(order, 'stopPrice')
1189
1188
  amount = self.safe_string(order, 'quantity')
1190
1189
  filled = self.safe_string(order, 'executed')
1191
1190
  fee = None
@@ -1210,8 +1209,7 @@ class bitteam(Exchange, ImplicitAPI):
1210
1209
  'timeInForce': 'GTC',
1211
1210
  'side': side,
1212
1211
  'price': price,
1213
- 'stopPrice': stopPrice,
1214
- 'triggerPrice': stopPrice,
1212
+ 'triggerPrice': self.safe_string(order, 'stopPrice'),
1215
1213
  'average': None,
1216
1214
  'amount': amount,
1217
1215
  'cost': None,
ccxt/bitvavo.py CHANGED
@@ -1112,7 +1112,7 @@ class bitvavo(Exchange, ImplicitAPI):
1112
1112
  :param float price: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1113
1113
  :param dict [params]: extra parameters specific to the bitvavo api endpoint
1114
1114
  :param str [params.timeInForce]: "GTC", "IOC", or "PO"
1115
- :param float [params.stopPrice]: The price at which a trigger order is triggered at
1115
+ :param float [params.stopPrice]: Alias for triggerPrice
1116
1116
  :param float [params.triggerPrice]: The price at which a trigger order is triggered at
1117
1117
  :param bool [params.postOnly]: If True, the order will only be posted to the order book and not executed immediately
1118
1118
  :param float [params.stopLossPrice]: The price at which a stop loss order is triggered at
@@ -1564,7 +1564,6 @@ class bitvavo(Exchange, ImplicitAPI):
1564
1564
  timeInForce = self.safe_string(order, 'timeInForce')
1565
1565
  postOnly = self.safe_value(order, 'postOnly')
1566
1566
  # https://github.com/ccxt/ccxt/issues/8489
1567
- stopPrice = self.safe_number(order, 'triggerPrice')
1568
1567
  return self.safe_order({
1569
1568
  'info': order,
1570
1569
  'id': id,
@@ -1578,8 +1577,7 @@ class bitvavo(Exchange, ImplicitAPI):
1578
1577
  'postOnly': postOnly,
1579
1578
  'side': side,
1580
1579
  'price': price,
1581
- 'stopPrice': stopPrice,
1582
- 'triggerPrice': stopPrice,
1580
+ 'triggerPrice': self.safe_number(order, 'triggerPrice'),
1583
1581
  'amount': amount,
1584
1582
  'cost': cost,
1585
1583
  'average': None,
ccxt/blockchaincom.py CHANGED
@@ -567,12 +567,12 @@ class blockchaincom(Exchange, ImplicitAPI):
567
567
  'orderQty': self.amount_to_precision(symbol, amount),
568
568
  'clOrdId': clientOrderId,
569
569
  }
570
- stopPrice = self.safe_value_2(params, 'stopPx', 'stopPrice')
570
+ triggerPrice = self.safe_value_2(params, 'stopPx', 'stopPrice')
571
571
  params = self.omit(params, ['stopPx', 'stopPrice'])
572
572
  if uppercaseOrderType == 'STOP' or uppercaseOrderType == 'STOPLIMIT':
573
- if stopPrice is None:
574
- raise ArgumentsRequired(self.id + ' createOrder() requires a stopPx or stopPrice param for a ' + uppercaseOrderType + ' order')
575
- if stopPrice is not None:
573
+ if triggerPrice is None:
574
+ raise ArgumentsRequired(self.id + ' createOrder() requires a stopPx or triggerPrice param for a ' + uppercaseOrderType + ' order')
575
+ if triggerPrice is not None:
576
576
  if uppercaseOrderType == 'MARKET':
577
577
  request['ordType'] = 'STOP'
578
578
  elif uppercaseOrderType == 'LIMIT':
@@ -586,7 +586,7 @@ class blockchaincom(Exchange, ImplicitAPI):
586
586
  if priceRequired:
587
587
  request['price'] = self.price_to_precision(symbol, price)
588
588
  if stopPriceRequired:
589
- request['stopPx'] = self.price_to_precision(symbol, stopPrice)
589
+ request['stopPx'] = self.price_to_precision(symbol, triggerPrice)
590
590
  response = self.privatePostOrders(self.extend(request, params))
591
591
  return self.parse_order(response, market)
592
592
 
ccxt/blofin.py CHANGED
@@ -1331,7 +1331,7 @@ class blofin(Exchange, ImplicitAPI):
1331
1331
  :param int [since]: the earliest time in ms to fetch open orders for
1332
1332
  :param int [limit]: the maximum number of open orders structures to retrieve
1333
1333
  :param dict [params]: extra parameters specific to the exchange API endpoint
1334
- :param bool [params.stop]: True if fetching trigger or conditional orders
1334
+ :param bool [params.trigger]: True if fetching trigger or conditional orders
1335
1335
  :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)
1336
1336
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1337
1337
  """
@@ -1348,12 +1348,12 @@ class blofin(Exchange, ImplicitAPI):
1348
1348
  request['instId'] = market['id']
1349
1349
  if limit is not None:
1350
1350
  request['limit'] = limit # default 100, max 100
1351
- isStop = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl', 'TPSL'], False)
1351
+ isTrigger = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl', 'TPSL'], False)
1352
1352
  method: Str = None
1353
1353
  method, params = self.handle_option_and_params(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersPending')
1354
1354
  query = self.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL'])
1355
1355
  response = None
1356
- if isStop or (method == 'privateGetTradeOrdersTpslPending'):
1356
+ if isTrigger or (method == 'privateGetTradeOrdersTpslPending'):
1357
1357
  response = self.privateGetTradeOrdersTpslPending(self.extend(request, query))
1358
1358
  else:
1359
1359
  response = self.privateGetTradeOrdersPending(self.extend(request, query))
@@ -1473,7 +1473,7 @@ class blofin(Exchange, ImplicitAPI):
1473
1473
  :param str [params.marginMode]: 'cross' or 'isolated'
1474
1474
  :param int [params.until]: the latest time in ms to fetch entries for
1475
1475
  :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)
1476
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1476
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1477
1477
  """
1478
1478
  self.load_markets()
1479
1479
  paginate = False
@@ -1660,8 +1660,8 @@ class blofin(Exchange, ImplicitAPI):
1660
1660
  method = self.safe_string(params, 'method', defaultMethod)
1661
1661
  clientOrderIds = self.parse_ids(self.safe_value(params, 'clientOrderId'))
1662
1662
  tpslIds = self.parse_ids(self.safe_value(params, 'tpslId'))
1663
- stop = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl'])
1664
- if stop:
1663
+ trigger = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl'])
1664
+ if trigger:
1665
1665
  method = 'privatePostTradeCancelTpsl'
1666
1666
  if clientOrderIds is None:
1667
1667
  ids = self.parse_ids(ids)
@@ -1672,7 +1672,7 @@ class blofin(Exchange, ImplicitAPI):
1672
1672
  'instId': market['id'],
1673
1673
  })
1674
1674
  for i in range(0, len(ids)):
1675
- if stop:
1675
+ if trigger:
1676
1676
  request.append({
1677
1677
  'tpslId': ids[i],
1678
1678
  'instId': market['id'],
@@ -2060,7 +2060,7 @@ class blofin(Exchange, ImplicitAPI):
2060
2060
  :param int [since]: the earliest time in ms to fetch orders for
2061
2061
  :param int [limit]: the maximum number of orde structures to retrieve
2062
2062
  :param dict [params]: extra parameters specific to the exchange API endpoint
2063
- :param bool [params.stop]: True if fetching trigger or conditional orders
2063
+ :param bool [params.trigger]: True if fetching trigger or conditional orders
2064
2064
  :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)
2065
2065
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2066
2066
  """
@@ -2079,12 +2079,12 @@ class blofin(Exchange, ImplicitAPI):
2079
2079
  request['limit'] = limit # default 100, max 100
2080
2080
  if since is not None:
2081
2081
  request['begin'] = since
2082
- isStop = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl', 'TPSL'], False)
2082
+ isTrigger = self.safe_bool_n(params, ['stop', 'trigger', 'tpsl', 'TPSL'], False)
2083
2083
  method: Str = None
2084
2084
  method, params = self.handle_option_and_params(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersHistory')
2085
2085
  query = self.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL'])
2086
2086
  response = None
2087
- if (isStop) or (method == 'privateGetTradeOrdersTpslHistory'):
2087
+ if (isTrigger) or (method == 'privateGetTradeOrdersTpslHistory'):
2088
2088
  response = self.privateGetTradeOrdersTpslHistory(self.extend(request, query))
2089
2089
  else:
2090
2090
  response = self.privateGetTradeOrdersHistory(self.extend(request, query))
ccxt/btcalpha.py CHANGED
@@ -710,7 +710,6 @@ class btcalpha(Exchange, ImplicitAPI):
710
710
  'postOnly': None,
711
711
  'side': side,
712
712
  'price': price,
713
- 'stopPrice': None,
714
713
  'triggerPrice': None,
715
714
  'cost': None,
716
715
  'amount': amount,
ccxt/btcbox.py CHANGED
@@ -548,7 +548,6 @@ class btcbox(Exchange, ImplicitAPI):
548
548
  'status': status,
549
549
  'symbol': market['symbol'],
550
550
  'price': price,
551
- 'stopPrice': None,
552
551
  'triggerPrice': None,
553
552
  'cost': None,
554
553
  'trades': trades,
ccxt/btcmarkets.py CHANGED
@@ -1015,7 +1015,6 @@ class btcmarkets(Exchange, ImplicitAPI):
1015
1015
  id = self.safe_string(order, 'orderId')
1016
1016
  clientOrderId = self.safe_string(order, 'clientOrderId')
1017
1017
  timeInForce = self.safe_string(order, 'timeInForce')
1018
- stopPrice = self.safe_number(order, 'triggerPrice')
1019
1018
  postOnly = self.safe_bool(order, 'postOnly')
1020
1019
  return self.safe_order({
1021
1020
  'info': order,
@@ -1030,8 +1029,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1030
1029
  'postOnly': postOnly,
1031
1030
  'side': side,
1032
1031
  'price': price,
1033
- 'stopPrice': stopPrice,
1034
- 'triggerPrice': stopPrice,
1032
+ 'triggerPrice': self.safe_number(order, 'triggerPrice'),
1035
1033
  'cost': None,
1036
1034
  'amount': amount,
1037
1035
  'filled': None,
ccxt/bybit.py CHANGED
@@ -3568,7 +3568,6 @@ class bybit(Exchange, ImplicitAPI):
3568
3568
  'reduceOnly': self.safe_bool(order, 'reduceOnly'),
3569
3569
  'side': side,
3570
3570
  'price': price,
3571
- 'stopPrice': stopPrice,
3572
3571
  'triggerPrice': stopPrice,
3573
3572
  'takeProfitPrice': takeProfitPrice,
3574
3573
  'stopLossPrice': stopLossPrice,
@@ -5428,7 +5427,7 @@ classic accounts only/ spot not supported* fetches information on an order made
5428
5427
  :param dict [params]: extra parameters specific to the exchange API endpoint
5429
5428
  :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)
5430
5429
  :param str [params.subType]: if inverse will use v5/account/contract-transaction-log
5431
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
5430
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
5432
5431
  """
5433
5432
  self.load_markets()
5434
5433
  paginate = False
@@ -7704,7 +7703,7 @@ classic accounts only/ spot not supported* fetches information on an order made
7704
7703
  if market['spot']:
7705
7704
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7706
7705
  symbol = market['symbol']
7707
- data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 20}, params))
7706
+ data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
7708
7707
  symbols = self.market_symbols(symbols)
7709
7708
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7710
7709
 
ccxt/cex.py CHANGED
@@ -1237,7 +1237,7 @@ class cex(Exchange, ImplicitAPI):
1237
1237
  :param int [limit]: max number of ledger entries to return
1238
1238
  :param dict [params]: extra parameters specific to the exchange API endpoint
1239
1239
  :param int [params.until]: timestamp in ms of the latest ledger entry
1240
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1240
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1241
1241
  """
1242
1242
  self.load_markets()
1243
1243
  currency = None
ccxt/coinbase.py CHANGED
@@ -384,6 +384,82 @@ class coinbase(Exchange, ImplicitAPI):
384
384
  'fetchTime': 'v2PublicGetTime', # 'v2PublicGetTime' or 'v3PublicGetBrokerageTime'
385
385
  'user_native_currency': 'USD', # needed to get fees for v3
386
386
  },
387
+ 'features': {
388
+ 'spot': {
389
+ 'sandbox': False,
390
+ 'createOrder': {
391
+ 'marginMode': True,
392
+ 'triggerPrice': True,
393
+ 'triggerPriceType': None,
394
+ 'triggerDirection': True,
395
+ 'stopLossPrice': True,
396
+ 'takeProfitPrice': True,
397
+ 'attachedStopLossTakeProfit': None,
398
+ 'timeInForce': {
399
+ 'IOC': True,
400
+ 'FOK': True,
401
+ 'PO': True,
402
+ 'GTD': True,
403
+ },
404
+ 'hedged': False,
405
+ 'trailing': False,
406
+ },
407
+ 'createOrders': None,
408
+ 'fetchMyTrades': {
409
+ 'marginMode': False,
410
+ 'limit': 3000,
411
+ 'daysBack': None,
412
+ 'untilDays': 10000,
413
+ },
414
+ 'fetchOrder': {
415
+ 'marginMode': False,
416
+ 'trigger': False,
417
+ 'trailing': False,
418
+ },
419
+ 'fetchOpenOrders': {
420
+ 'marginMode': False,
421
+ 'limit': None,
422
+ 'trigger': False,
423
+ 'trailing': False,
424
+ },
425
+ 'fetchOrders': {
426
+ 'marginMode': False,
427
+ 'limit': None,
428
+ 'daysBack': None,
429
+ 'untilDays': 10000,
430
+ 'trigger': False,
431
+ 'trailing': False,
432
+ },
433
+ 'fetchClosedOrders': {
434
+ 'marginMode': False,
435
+ 'limit': None,
436
+ 'daysBackClosed': None,
437
+ 'daysBackCanceled': None,
438
+ 'untilDays': 10000,
439
+ 'trigger': False,
440
+ 'trailing': False,
441
+ },
442
+ 'fetchOHLCV': {
443
+ 'limit': 350,
444
+ },
445
+ },
446
+ 'swap': {
447
+ 'linear': {
448
+ 'extends': 'spot',
449
+ },
450
+ 'inverse': {
451
+ 'extends': 'spot',
452
+ },
453
+ },
454
+ 'future': {
455
+ 'linear': {
456
+ 'extends': 'spot',
457
+ },
458
+ 'inverse': {
459
+ 'extends': 'spot',
460
+ },
461
+ },
462
+ },
387
463
  })
388
464
 
389
465
  def fetch_time(self, params={}):
@@ -2288,7 +2364,7 @@ class coinbase(Exchange, ImplicitAPI):
2288
2364
  :param int [limit]: max number of ledger entries to return, default is None
2289
2365
  :param dict [params]: extra parameters specific to the exchange API endpoint
2290
2366
  :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)
2291
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2367
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2292
2368
  """
2293
2369
  self.load_markets()
2294
2370
  paginate = False
ccxt/coinbaseexchange.py CHANGED
@@ -1449,7 +1449,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
1449
1449
  :param int [limit]: max number of ledger entries to return, default is None
1450
1450
  :param dict [params]: extra parameters specific to the exchange API endpoint
1451
1451
  :param int [params.until]: the latest time in ms to fetch trades for
1452
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1452
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1453
1453
  """
1454
1454
  # https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
1455
1455
  if code is None:
@@ -264,6 +264,68 @@ class coinbaseinternational(Exchange, ImplicitAPI):
264
264
  'bitcoin': 'BTC',
265
265
  },
266
266
  },
267
+ 'features': {
268
+ 'spot': {
269
+ 'sandbox': True,
270
+ 'createOrder': {
271
+ 'marginMode': False,
272
+ 'triggerPrice': True,
273
+ 'triggerPriceType': None,
274
+ 'triggerDirection': True,
275
+ 'stopLossPrice': False, # todo implementation
276
+ 'takeProfitPrice': False, # todo implementation
277
+ 'attachedStopLossTakeProfit': None,
278
+ 'timeInForce': {
279
+ 'IOC': True,
280
+ 'FOK': True,
281
+ 'PO': True,
282
+ 'GTD': True,
283
+ 'GTC': True, # has 30 days max
284
+ },
285
+ 'hedged': False,
286
+ 'trailing': False,
287
+ },
288
+ 'createOrders': None,
289
+ 'fetchMyTrades': {
290
+ 'marginMode': False,
291
+ 'limit': 100,
292
+ 'daysBack': None,
293
+ 'untilDays': 10000,
294
+ },
295
+ 'fetchOrder': {
296
+ 'marginMode': False,
297
+ 'trigger': False,
298
+ 'trailing': False,
299
+ },
300
+ 'fetchOpenOrders': {
301
+ 'marginMode': False,
302
+ 'limit': 100,
303
+ 'trigger': False,
304
+ 'trailing': False,
305
+ },
306
+ 'fetchOrders': None,
307
+ 'fetchClosedOrders': None,
308
+ 'fetchOHLCV': {
309
+ 'limit': 300,
310
+ },
311
+ },
312
+ 'swap': {
313
+ 'linear': {
314
+ 'extends': 'spot',
315
+ },
316
+ 'inverse': {
317
+ 'extends': 'spot',
318
+ },
319
+ },
320
+ 'future': {
321
+ 'linear': {
322
+ 'extends': 'spot',
323
+ },
324
+ 'inverse': {
325
+ 'extends': 'spot',
326
+ },
327
+ },
328
+ },
267
329
  })
268
330
 
269
331
  def handle_portfolio_and_params(self, methodName: str, params={}):
ccxt/coincatch.py CHANGED
@@ -4783,7 +4783,7 @@ class coincatch(Exchange, ImplicitAPI):
4783
4783
  :param str [params.business]: *swap only*
4784
4784
  :param str [params.lastEndId]: *swap only*
4785
4785
  :param bool [params.next]: *swap only*
4786
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
4786
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
4787
4787
  """
4788
4788
  methodName = 'fetchLedger'
4789
4789
  self.load_markets()