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
@@ -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,
@@ -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
  await self.load_markets()
1974
1973
  request: dict = {}
@@ -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,
@@ -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,
@@ -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 = await self.privatePostOrders(self.extend(request, params))
591
591
  return self.parse_order(response, market)
592
592
 
@@ -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 = await self.privateGetTradeOrdersTpslPending(self.extend(request, query))
1358
1358
  else:
1359
1359
  response = await 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
  await 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 = await self.privateGetTradeOrdersTpslHistory(self.extend(request, query))
2089
2089
  else:
2090
2090
  response = await self.privateGetTradeOrdersHistory(self.extend(request, query))
@@ -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,
@@ -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,
@@ -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,
@@ -3569,7 +3569,6 @@ class bybit(Exchange, ImplicitAPI):
3569
3569
  'reduceOnly': self.safe_bool(order, 'reduceOnly'),
3570
3570
  'side': side,
3571
3571
  'price': price,
3572
- 'stopPrice': stopPrice,
3573
3572
  'triggerPrice': stopPrice,
3574
3573
  'takeProfitPrice': takeProfitPrice,
3575
3574
  'stopLossPrice': stopLossPrice,
@@ -5429,7 +5428,7 @@ classic accounts only/ spot not supported* fetches information on an order made
5429
5428
  :param dict [params]: extra parameters specific to the exchange API endpoint
5430
5429
  :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)
5431
5430
  :param str [params.subType]: if inverse will use v5/account/contract-transaction-log
5432
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
5431
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
5433
5432
  """
5434
5433
  await self.load_markets()
5435
5434
  paginate = False
@@ -7705,7 +7704,7 @@ classic accounts only/ spot not supported* fetches information on an order made
7705
7704
  if market['spot']:
7706
7705
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7707
7706
  symbol = market['symbol']
7708
- data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 20}, params))
7707
+ data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
7709
7708
  symbols = self.market_symbols(symbols)
7710
7709
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7711
7710
 
ccxt/async_support/cex.py CHANGED
@@ -1238,7 +1238,7 @@ class cex(Exchange, ImplicitAPI):
1238
1238
  :param int [limit]: max number of ledger entries to return
1239
1239
  :param dict [params]: extra parameters specific to the exchange API endpoint
1240
1240
  :param int [params.until]: timestamp in ms of the latest ledger entry
1241
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1241
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1242
1242
  """
1243
1243
  await self.load_markets()
1244
1244
  currency = None
@@ -385,6 +385,82 @@ class coinbase(Exchange, ImplicitAPI):
385
385
  'fetchTime': 'v2PublicGetTime', # 'v2PublicGetTime' or 'v3PublicGetBrokerageTime'
386
386
  'user_native_currency': 'USD', # needed to get fees for v3
387
387
  },
388
+ 'features': {
389
+ 'spot': {
390
+ 'sandbox': False,
391
+ 'createOrder': {
392
+ 'marginMode': True,
393
+ 'triggerPrice': True,
394
+ 'triggerPriceType': None,
395
+ 'triggerDirection': True,
396
+ 'stopLossPrice': True,
397
+ 'takeProfitPrice': True,
398
+ 'attachedStopLossTakeProfit': None,
399
+ 'timeInForce': {
400
+ 'IOC': True,
401
+ 'FOK': True,
402
+ 'PO': True,
403
+ 'GTD': True,
404
+ },
405
+ 'hedged': False,
406
+ 'trailing': False,
407
+ },
408
+ 'createOrders': None,
409
+ 'fetchMyTrades': {
410
+ 'marginMode': False,
411
+ 'limit': 3000,
412
+ 'daysBack': None,
413
+ 'untilDays': 10000,
414
+ },
415
+ 'fetchOrder': {
416
+ 'marginMode': False,
417
+ 'trigger': False,
418
+ 'trailing': False,
419
+ },
420
+ 'fetchOpenOrders': {
421
+ 'marginMode': False,
422
+ 'limit': None,
423
+ 'trigger': False,
424
+ 'trailing': False,
425
+ },
426
+ 'fetchOrders': {
427
+ 'marginMode': False,
428
+ 'limit': None,
429
+ 'daysBack': None,
430
+ 'untilDays': 10000,
431
+ 'trigger': False,
432
+ 'trailing': False,
433
+ },
434
+ 'fetchClosedOrders': {
435
+ 'marginMode': False,
436
+ 'limit': None,
437
+ 'daysBackClosed': None,
438
+ 'daysBackCanceled': None,
439
+ 'untilDays': 10000,
440
+ 'trigger': False,
441
+ 'trailing': False,
442
+ },
443
+ 'fetchOHLCV': {
444
+ 'limit': 350,
445
+ },
446
+ },
447
+ 'swap': {
448
+ 'linear': {
449
+ 'extends': 'spot',
450
+ },
451
+ 'inverse': {
452
+ 'extends': 'spot',
453
+ },
454
+ },
455
+ 'future': {
456
+ 'linear': {
457
+ 'extends': 'spot',
458
+ },
459
+ 'inverse': {
460
+ 'extends': 'spot',
461
+ },
462
+ },
463
+ },
388
464
  })
389
465
 
390
466
  async def fetch_time(self, params={}):
@@ -2289,7 +2365,7 @@ class coinbase(Exchange, ImplicitAPI):
2289
2365
  :param int [limit]: max number of ledger entries to return, default is None
2290
2366
  :param dict [params]: extra parameters specific to the exchange API endpoint
2291
2367
  :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)
2292
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2368
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2293
2369
  """
2294
2370
  await self.load_markets()
2295
2371
  paginate = False
@@ -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
  async def handle_portfolio_and_params(self, methodName: str, params={}):
@@ -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
  await self.load_markets()
@@ -2543,18 +2543,18 @@ class coinex(Exchange, ImplicitAPI):
2543
2543
  request: dict = {
2544
2544
  'market': market['id'],
2545
2545
  }
2546
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2546
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2547
2547
  params = self.omit(params, ['stop', 'trigger'])
2548
2548
  response = None
2549
2549
  requestIds = []
2550
2550
  for i in range(0, len(ids)):
2551
2551
  requestIds.append(int(ids[i]))
2552
- if stop:
2552
+ if trigger:
2553
2553
  request['stop_ids'] = requestIds
2554
2554
  else:
2555
2555
  request['order_ids'] = requestIds
2556
2556
  if market['spot']:
2557
- if stop:
2557
+ if trigger:
2558
2558
  response = await self.v2PrivatePostSpotCancelBatchStopOrder(self.extend(request, params))
2559
2559
  #
2560
2560
  # {
@@ -2623,7 +2623,7 @@ class coinex(Exchange, ImplicitAPI):
2623
2623
  #
2624
2624
  else:
2625
2625
  request['market_type'] = 'FUTURES'
2626
- if stop:
2626
+ if trigger:
2627
2627
  response = await self.v2PrivatePostFuturesCancelBatchStopOrder(self.extend(request, params))
2628
2628
  #
2629
2629
  # {
@@ -3271,7 +3271,7 @@ class coinex(Exchange, ImplicitAPI):
3271
3271
  request['market'] = market['id']
3272
3272
  if limit is not None:
3273
3273
  request['limit'] = limit
3274
- stop = self.safe_bool_2(params, 'stop', 'trigger')
3274
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
3275
3275
  params = self.omit(params, ['stop', 'trigger'])
3276
3276
  marketType = None
3277
3277
  marketType, params = self.handle_market_type_and_params('fetchOrdersByStatus', market, params)
@@ -3281,7 +3281,7 @@ class coinex(Exchange, ImplicitAPI):
3281
3281
  if marketType == 'swap':
3282
3282
  request['market_type'] = 'FUTURES'
3283
3283
  if isClosed:
3284
- if stop:
3284
+ if trigger:
3285
3285
  response = await self.v2PrivateGetFuturesFinishedStopOrder(self.extend(request, params))
3286
3286
  #
3287
3287
  # {
@@ -3342,7 +3342,7 @@ class coinex(Exchange, ImplicitAPI):
3342
3342
  # }
3343
3343
  #
3344
3344
  elif isOpen:
3345
- if stop:
3345
+ if trigger:
3346
3346
  response = await self.v2PrivateGetFuturesPendingStopOrder(self.extend(request, params))
3347
3347
  #
3348
3348
  # {
@@ -3415,7 +3415,7 @@ class coinex(Exchange, ImplicitAPI):
3415
3415
  else:
3416
3416
  request['market_type'] = 'SPOT'
3417
3417
  if isClosed:
3418
- if stop:
3418
+ if trigger:
3419
3419
  response = await self.v2PrivateGetSpotFinishedStopOrder(self.extend(request, params))
3420
3420
  #
3421
3421
  # {
@@ -3479,7 +3479,7 @@ class coinex(Exchange, ImplicitAPI):
3479
3479
  # }
3480
3480
  #
3481
3481
  elif status == 'pending':
3482
- if stop:
3482
+ if trigger:
3483
3483
  response = await self.v2PrivateGetSpotPendingStopOrder(self.extend(request, params))
3484
3484
  #
3485
3485
  # {
@@ -2046,7 +2046,7 @@ class coinlist(Exchange, ImplicitAPI):
2046
2046
  :param int [limit]: max number of ledger entries to return(default 200, max 500)
2047
2047
  :param dict [params]: extra parameters specific to the exchange API endpoint
2048
2048
  :param int [params.until]: the latest time in ms to fetch entries for
2049
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2049
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2050
2050
  """
2051
2051
  traderId = self.safe_string_2(params, 'trader_id', 'traderId')
2052
2052
  if traderId is None:
@@ -977,7 +977,7 @@ class coinmetro(Exchange, ImplicitAPI):
977
977
  :param int [limit]: max number of ledger entries to return(default 200, max 500)
978
978
  :param dict [params]: extra parameters specific to the exchange API endpoint
979
979
  :param int [params.until]: the latest time in ms to fetch entries for
980
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
980
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
981
981
  """
982
982
  await self.load_markets()
983
983
  request: dict = {}
@@ -366,6 +366,95 @@ class cryptocom(Exchange, ImplicitAPI):
366
366
  },
367
367
  'broker': 'CCXT',
368
368
  },
369
+ 'features': {
370
+ 'default': {
371
+ 'sandbox': True,
372
+ 'createOrder': {
373
+ 'marginMode': True,
374
+ 'triggerPrice': True,
375
+ # todo: implementation fix
376
+ 'triggerPriceType': {
377
+ 'last': True,
378
+ 'mark': True,
379
+ 'index': True,
380
+ },
381
+ 'triggerDirection': False,
382
+ 'stopLossPrice': True,
383
+ 'takeProfitPrice': True,
384
+ 'attachedStopLossTakeProfit': None,
385
+ 'timeInForce': {
386
+ 'IOC': True,
387
+ 'FOK': True,
388
+ 'PO': True,
389
+ 'GTD': False,
390
+ },
391
+ 'hedged': False,
392
+ # exchange-supported features
393
+ 'selfTradePrevention': True,
394
+ 'trailing': False,
395
+ 'iceberg': False,
396
+ },
397
+ 'createOrders': {
398
+ 'max': 10,
399
+ },
400
+ 'fetchMyTrades': {
401
+ 'marginMode': False,
402
+ 'limit': 100,
403
+ 'daysBack': None,
404
+ 'untilDays': 1,
405
+ },
406
+ 'fetchOrder': {
407
+ 'marginMode': False,
408
+ 'trigger': False,
409
+ 'trailing': False,
410
+ },
411
+ 'fetchOpenOrders': {
412
+ 'marginMode': True,
413
+ 'limit': 100,
414
+ 'trigger': False,
415
+ 'trailing': False,
416
+ },
417
+ 'fetchOrders': {
418
+ 'marginMode': False,
419
+ 'limit': 100,
420
+ 'daysBack': None,
421
+ 'untilDays': 1,
422
+ 'trigger': False,
423
+ 'trailing': False,
424
+ },
425
+ 'fetchClosedOrders': {
426
+ 'marginMode': False,
427
+ 'limit': 100,
428
+ 'daysBackClosed': None,
429
+ 'daysBackCanceled': None,
430
+ 'untilDays': 1,
431
+ 'trigger': False,
432
+ 'trailing': False,
433
+ },
434
+ 'fetchOHLCV': {
435
+ 'limit': 300,
436
+ },
437
+ },
438
+ 'spot': {
439
+ 'extends': 'default',
440
+ },
441
+ 'swap': {
442
+ 'linear': {
443
+ 'extends': 'default',
444
+ },
445
+ 'inverse': {
446
+ 'extends': 'default',
447
+ },
448
+ },
449
+ 'future': {
450
+ 'linear': {
451
+ 'extends': 'default',
452
+ },
453
+ 'inverse': {
454
+ 'extends': 'default',
455
+ },
456
+ },
457
+ },
369
458
  # https://exchange-docs.crypto.com/spot/index.html#response-and-reason-codes
370
459
  'commonCurrencies': {
371
460
  'USD_STABLE_COIN': 'USDC',
@@ -1147,7 +1236,7 @@ class cryptocom(Exchange, ImplicitAPI):
1147
1236
  :param dict [params]: extra parameters specific to the exchange API endpoint
1148
1237
  :param str [params.timeInForce]: 'GTC', 'IOC', 'FOK' or 'PO'
1149
1238
  :param str [params.ref_price_type]: 'MARK_PRICE', 'INDEX_PRICE', 'LAST_PRICE' which trigger price type to use, default is MARK_PRICE
1150
- :param float [params.triggerPrice]: price to trigger a stop order
1239
+ :param float [params.triggerPrice]: price to trigger a trigger order
1151
1240
  :param float [params.stopLossPrice]: price to trigger a stop-loss trigger order
1152
1241
  :param float [params.takeProfitPrice]: price to trigger a take-profit trigger order
1153
1242
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2283,7 +2372,7 @@ class cryptocom(Exchange, ImplicitAPI):
2283
2372
  :param int [limit]: max number of ledger entries to return
2284
2373
  :param dict [params]: extra parameters specific to the exchange API endpoint
2285
2374
  :param int [params.until]: timestamp in ms for the ending date filter, default is the current time
2286
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2375
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2287
2376
  """
2288
2377
  await self.load_markets()
2289
2378
  request: dict = {}