ccxt 4.4.33__py2.py3-none-any.whl → 4.4.35__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 (100) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/bingx.py +17 -0
  3. ccxt/abstract/bitbank.py +5 -0
  4. ccxt/abstract/bitfinex2.py +1 -0
  5. ccxt/abstract/bitpanda.py +0 -12
  6. ccxt/abstract/bitrue.py +3 -3
  7. ccxt/abstract/ellipx.py +25 -0
  8. ccxt/abstract/okx.py +1 -0
  9. ccxt/abstract/onetrading.py +0 -12
  10. ccxt/abstract/xt.py +5 -5
  11. ccxt/alpaca.py +2 -0
  12. ccxt/async_support/__init__.py +3 -1
  13. ccxt/async_support/alpaca.py +2 -0
  14. ccxt/async_support/base/exchange.py +1 -1
  15. ccxt/async_support/binance.py +19 -15
  16. ccxt/async_support/bingx.py +479 -146
  17. ccxt/async_support/bitbank.py +5 -0
  18. ccxt/async_support/bitbns.py +2 -0
  19. ccxt/async_support/bitfinex2.py +1 -0
  20. ccxt/async_support/bitget.py +174 -40
  21. ccxt/async_support/bitmex.py +3 -1
  22. ccxt/async_support/bitopro.py +3 -0
  23. ccxt/async_support/bitrue.py +3 -2
  24. ccxt/async_support/btcmarkets.py +5 -3
  25. ccxt/async_support/btcturk.py +19 -19
  26. ccxt/async_support/bybit.py +13 -10
  27. ccxt/async_support/cex.py +13 -4
  28. ccxt/async_support/coinbase.py +3 -2
  29. ccxt/async_support/coinex.py +1 -0
  30. ccxt/async_support/coinone.py +7 -7
  31. ccxt/async_support/coinsph.py +7 -7
  32. ccxt/async_support/coinspot.py +39 -39
  33. ccxt/async_support/cryptocom.py +36 -34
  34. ccxt/async_support/ellipx.py +1828 -0
  35. ccxt/async_support/gate.py +143 -39
  36. ccxt/async_support/hyperliquid.py +70 -11
  37. ccxt/async_support/idex.py +3 -4
  38. ccxt/async_support/kraken.py +58 -49
  39. ccxt/async_support/krakenfutures.py +3 -1
  40. ccxt/async_support/kucoin.py +1 -1
  41. ccxt/async_support/okcoin.py +2 -0
  42. ccxt/async_support/okx.py +15 -10
  43. ccxt/async_support/onetrading.py +67 -370
  44. ccxt/async_support/paradex.py +2 -0
  45. ccxt/async_support/phemex.py +16 -0
  46. ccxt/async_support/poloniex.py +3 -1
  47. ccxt/async_support/poloniexfutures.py +3 -1
  48. ccxt/async_support/vertex.py +2 -0
  49. ccxt/async_support/woo.py +69 -69
  50. ccxt/async_support/xt.py +10 -10
  51. ccxt/base/exchange.py +28 -7
  52. ccxt/binance.py +19 -15
  53. ccxt/bingx.py +479 -146
  54. ccxt/bitbank.py +5 -0
  55. ccxt/bitbns.py +2 -0
  56. ccxt/bitfinex2.py +1 -0
  57. ccxt/bitget.py +174 -40
  58. ccxt/bitmex.py +3 -1
  59. ccxt/bitopro.py +3 -0
  60. ccxt/bitrue.py +3 -2
  61. ccxt/btcmarkets.py +5 -3
  62. ccxt/btcturk.py +19 -19
  63. ccxt/bybit.py +13 -10
  64. ccxt/cex.py +13 -4
  65. ccxt/coinbase.py +3 -2
  66. ccxt/coinex.py +1 -0
  67. ccxt/coinone.py +7 -7
  68. ccxt/coinsph.py +7 -7
  69. ccxt/coinspot.py +39 -39
  70. ccxt/cryptocom.py +36 -34
  71. ccxt/ellipx.py +1828 -0
  72. ccxt/gate.py +143 -39
  73. ccxt/hyperliquid.py +70 -11
  74. ccxt/idex.py +3 -4
  75. ccxt/kraken.py +58 -49
  76. ccxt/krakenfutures.py +3 -1
  77. ccxt/kucoin.py +1 -1
  78. ccxt/okcoin.py +2 -0
  79. ccxt/okx.py +15 -10
  80. ccxt/onetrading.py +67 -370
  81. ccxt/paradex.py +2 -0
  82. ccxt/phemex.py +16 -0
  83. ccxt/poloniex.py +3 -1
  84. ccxt/poloniexfutures.py +3 -1
  85. ccxt/pro/__init__.py +1 -1
  86. ccxt/pro/bitrue.py +13 -11
  87. ccxt/pro/idex.py +15 -0
  88. ccxt/pro/probit.py +58 -68
  89. ccxt/pro/woo.py +15 -15
  90. ccxt/test/tests_async.py +29 -2
  91. ccxt/test/tests_helpers.py +0 -2
  92. ccxt/test/tests_sync.py +29 -2
  93. ccxt/vertex.py +2 -0
  94. ccxt/woo.py +69 -69
  95. ccxt/xt.py +10 -10
  96. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/METADATA +9 -8
  97. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/RECORD +100 -97
  98. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/LICENSE.txt +0 -0
  99. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/WHEEL +0 -0
  100. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/top_level.txt +0 -0
ccxt/binance.py CHANGED
@@ -1583,13 +1583,13 @@ class binance(Exchange, ImplicitAPI):
1583
1583
  'spot': {
1584
1584
  'sandbox': True,
1585
1585
  'createOrder': {
1586
+ 'marginMode': True,
1586
1587
  'triggerPrice': True,
1587
1588
  'triggerPriceType': None,
1588
1589
  'triggerDirection': False,
1589
1590
  'stopLossPrice': True,
1590
1591
  'takeProfitPrice': True,
1591
1592
  'attachedStopLossTakeProfit': None, # not supported
1592
- 'marginMode': True,
1593
1593
  'timeInForce': {
1594
1594
  'GTC': True,
1595
1595
  'IOC': True,
@@ -1607,6 +1607,7 @@ class binance(Exchange, ImplicitAPI):
1607
1607
  },
1608
1608
  'createOrders': None,
1609
1609
  'fetchMyTrades': {
1610
+ 'marginMode': False,
1610
1611
  'limit': 1000,
1611
1612
  'daysBack': None,
1612
1613
  'untilDays': 1, # days between start-end
@@ -1617,25 +1618,25 @@ class binance(Exchange, ImplicitAPI):
1617
1618
  'trailing': False,
1618
1619
  },
1619
1620
  'fetchOpenOrders': {
1620
- 'limit': None,
1621
1621
  'marginMode': True,
1622
+ 'limit': None,
1622
1623
  'trigger': False,
1623
1624
  'trailing': False,
1624
1625
  },
1625
1626
  'fetchOrders': {
1627
+ 'marginMode': True,
1626
1628
  'limit': 1000,
1627
1629
  'daysBack': None,
1628
1630
  'untilDays': 10000,
1629
- 'marginMode': True,
1630
1631
  'trigger': False,
1631
1632
  'trailing': False,
1632
1633
  },
1633
1634
  'fetchClosedOrders': {
1635
+ 'marginMode': True,
1634
1636
  'limit': 1000,
1635
1637
  'daysBackClosed': None,
1636
1638
  'daysBackCanceled': None,
1637
1639
  'untilDays': 10000,
1638
- 'marginMode': True,
1639
1640
  'trigger': False,
1640
1641
  'trailing': False,
1641
1642
  },
@@ -1646,6 +1647,7 @@ class binance(Exchange, ImplicitAPI):
1646
1647
  'default': {
1647
1648
  'sandbox': True,
1648
1649
  'createOrder': {
1650
+ 'marginMode': False,
1649
1651
  'triggerPrice': True,
1650
1652
  'triggerPriceType': {
1651
1653
  'mark': True,
@@ -1655,7 +1657,6 @@ class binance(Exchange, ImplicitAPI):
1655
1657
  'stopLossPrice': True,
1656
1658
  'takeProfitPrice': True,
1657
1659
  'attachedStopLossTakeProfit': None, # not supported
1658
- 'marginMode': False,
1659
1660
  'timeInForce': {
1660
1661
  'GTC': True,
1661
1662
  'IOC': True,
@@ -1676,6 +1677,7 @@ class binance(Exchange, ImplicitAPI):
1676
1677
  'max': 5,
1677
1678
  },
1678
1679
  'fetchMyTrades': {
1680
+ 'marginMode': False,
1679
1681
  'daysBack': None,
1680
1682
  'limit': 1000,
1681
1683
  'untilDays': 7,
@@ -1686,25 +1688,25 @@ class binance(Exchange, ImplicitAPI):
1686
1688
  'trailing': False,
1687
1689
  },
1688
1690
  'fetchOpenOrders': {
1689
- 'limit': 500,
1690
1691
  'marginMode': True,
1692
+ 'limit': 500,
1691
1693
  'trigger': False,
1692
1694
  'trailing': False,
1693
1695
  },
1694
1696
  'fetchOrders': {
1697
+ 'marginMode': True,
1695
1698
  'limit': 1000,
1696
1699
  'daysBack': 90,
1697
1700
  'untilDays': 7,
1698
- 'marginMode': True,
1699
1701
  'trigger': False,
1700
1702
  'trailing': False,
1701
1703
  },
1702
1704
  'fetchClosedOrders': {
1705
+ 'marginMode': True,
1703
1706
  'limit': 1000,
1704
1707
  'daysBackClosed': 90,
1705
1708
  'daysBackCanceled': 3,
1706
1709
  'untilDays': 7,
1707
- 'marginMode': True,
1708
1710
  'trigger': False,
1709
1711
  'trailing': False,
1710
1712
  },
@@ -2131,7 +2133,8 @@ class binance(Exchange, ImplicitAPI):
2131
2133
  '-4140': BadRequest, # Invalid symbol status for opening position
2132
2134
  '-4141': OperationRejected, # Symbol is closed
2133
2135
  '-4144': BadSymbol, # Invalid pair
2134
- '-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."}
2136
+ '-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."},
2137
+ '-4136': InvalidOrder, # {"code":-4136,"msg":"Target strategy invalid for orderType TRAILING_STOP_MARKET,closePosition True"}
2135
2138
  '-4165': BadRequest, # Invalid time interval
2136
2139
  '-4167': BadRequest, # Unable to adjust to Multi-Assets mode with symbols of USDⓈ-M Futures under isolated-margin mode.
2137
2140
  '-4168': BadRequest, # Unable to adjust to isolated-margin mode under the Multi-Assets mode.
@@ -6110,6 +6113,7 @@ class binance(Exchange, ImplicitAPI):
6110
6113
  typeRequest = 'strategyType' if isPortfolioMarginConditional else 'type'
6111
6114
  request[typeRequest] = uppercaseType
6112
6115
  # additional required fields depending on the order type
6116
+ closePosition = self.safe_bool(params, 'closePosition', False)
6113
6117
  timeInForceIsRequired = False
6114
6118
  priceIsRequired = False
6115
6119
  stopPriceIsRequired = False
@@ -6175,12 +6179,12 @@ class binance(Exchange, ImplicitAPI):
6175
6179
  stopPriceIsRequired = True
6176
6180
  priceIsRequired = True
6177
6181
  elif (uppercaseType == 'STOP_MARKET') or (uppercaseType == 'TAKE_PROFIT_MARKET'):
6178
- closePosition = self.safe_bool(params, 'closePosition')
6179
- if closePosition is None:
6182
+ if not closePosition:
6180
6183
  quantityIsRequired = True
6181
6184
  stopPriceIsRequired = True
6182
6185
  elif uppercaseType == 'TRAILING_STOP_MARKET':
6183
- quantityIsRequired = True
6186
+ if not closePosition:
6187
+ quantityIsRequired = True
6184
6188
  if trailingPercent is None:
6185
6189
  raise InvalidOrder(self.id + ' createOrder() requires a trailingPercent param for a ' + type + ' order')
6186
6190
  if quantityIsRequired:
@@ -11129,11 +11133,11 @@ class binance(Exchange, ImplicitAPI):
11129
11133
  def get_exceptions_by_url(self, url: str, exactOrBroad: str):
11130
11134
  marketType = None
11131
11135
  hostname = self.hostname if (self.hostname is not None) else 'binance.com'
11132
- if url.startswith('https://api.' + hostname + '/'):
11136
+ if url.startswith('https://api.' + hostname + '/') or url.startswith('https://testnet.binance.vision'):
11133
11137
  marketType = 'spot'
11134
- elif url.startswith('https://dapi.' + hostname + '/'):
11138
+ elif url.startswith('https://dapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/dapi'):
11135
11139
  marketType = 'inverse'
11136
- elif url.startswith('https://fapi.' + hostname + '/'):
11140
+ elif url.startswith('https://fapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/fapi'):
11137
11141
  marketType = 'linear'
11138
11142
  elif url.startswith('https://eapi.' + hostname + '/'):
11139
11143
  marketType = 'option'