ccxt 4.4.22__py2.py3-none-any.whl → 4.4.24__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 (60) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/binance.py +64 -43
  3. ccxt/abstract/binancecoinm.py +64 -43
  4. ccxt/abstract/binanceus.py +64 -43
  5. ccxt/abstract/binanceusdm.py +64 -43
  6. ccxt/abstract/coincatch.py +94 -0
  7. ccxt/abstract/kucoin.py +1 -0
  8. ccxt/abstract/kucoinfutures.py +1 -0
  9. ccxt/async_support/__init__.py +3 -1
  10. ccxt/async_support/base/exchange.py +1 -1
  11. ccxt/async_support/binance.py +87 -62
  12. ccxt/async_support/bitfinex.py +4 -0
  13. ccxt/async_support/bitflyer.py +1 -0
  14. ccxt/async_support/bitrue.py +3 -0
  15. ccxt/async_support/bybit.py +39 -6
  16. ccxt/async_support/cex.py +4 -0
  17. ccxt/async_support/coinbase.py +1 -1
  18. ccxt/async_support/coinbaseexchange.py +3 -0
  19. ccxt/async_support/coincatch.py +4955 -0
  20. ccxt/async_support/coinex.py +60 -1
  21. ccxt/async_support/gate.py +177 -59
  22. ccxt/async_support/hyperliquid.py +1 -1
  23. ccxt/async_support/kucoin.py +15 -8
  24. ccxt/async_support/latoken.py +6 -0
  25. ccxt/async_support/mexc.py +1 -1
  26. ccxt/async_support/oceanex.py +2 -0
  27. ccxt/async_support/okcoin.py +1 -0
  28. ccxt/async_support/poloniex.py +5 -0
  29. ccxt/async_support/yobit.py +1 -1
  30. ccxt/base/exchange.py +5 -4
  31. ccxt/binance.py +87 -62
  32. ccxt/bitfinex.py +4 -0
  33. ccxt/bitflyer.py +1 -0
  34. ccxt/bitrue.py +3 -0
  35. ccxt/bybit.py +39 -6
  36. ccxt/cex.py +4 -0
  37. ccxt/coinbase.py +1 -1
  38. ccxt/coinbaseexchange.py +3 -0
  39. ccxt/coincatch.py +4955 -0
  40. ccxt/coinex.py +60 -1
  41. ccxt/gate.py +177 -59
  42. ccxt/hyperliquid.py +1 -1
  43. ccxt/kucoin.py +15 -8
  44. ccxt/latoken.py +6 -0
  45. ccxt/mexc.py +1 -1
  46. ccxt/oceanex.py +2 -0
  47. ccxt/okcoin.py +1 -0
  48. ccxt/poloniex.py +5 -0
  49. ccxt/pro/__init__.py +3 -1
  50. ccxt/pro/coincatch.py +1429 -0
  51. ccxt/pro/kucoin.py +2 -1
  52. ccxt/pro/onetrading.py +2 -1
  53. ccxt/test/tests_async.py +29 -6
  54. ccxt/test/tests_sync.py +29 -6
  55. ccxt/yobit.py +1 -1
  56. {ccxt-4.4.22.dist-info → ccxt-4.4.24.dist-info}/METADATA +7 -6
  57. {ccxt-4.4.22.dist-info → ccxt-4.4.24.dist-info}/RECORD +60 -56
  58. {ccxt-4.4.22.dist-info → ccxt-4.4.24.dist-info}/LICENSE.txt +0 -0
  59. {ccxt-4.4.22.dist-info → ccxt-4.4.24.dist-info}/WHEEL +0 -0
  60. {ccxt-4.4.22.dist-info → ccxt-4.4.24.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py CHANGED
@@ -222,6 +222,7 @@ class kucoin(Exchange, ImplicitAPI):
222
222
  'market/orderbook/level{level}': 3, # 3SW
223
223
  'market/orderbook/level2': 3, # 3SW
224
224
  'market/orderbook/level3': 3, # 3SW
225
+ 'hf/accounts/opened': 2, #
225
226
  'hf/orders/active': 2, # 2SW
226
227
  'hf/orders/active/symbols': 2, # 2SW
227
228
  'hf/margin/order/active/symbols': 2, # 2SW
@@ -651,7 +652,7 @@ class kucoin(Exchange, ImplicitAPI):
651
652
  'FUD': 'FTX Users\' Debt',
652
653
  },
653
654
  'options': {
654
- 'hf': False,
655
+ 'hf': None, # would be auto set to `true/false` after first load
655
656
  'version': 'v1',
656
657
  'symbolSeparator': '-',
657
658
  'fetchMyTradesMethod': 'private_get_fills',
@@ -1083,7 +1084,8 @@ class kucoin(Exchange, ImplicitAPI):
1083
1084
  # "enableTrading": True
1084
1085
  # },
1085
1086
  #
1086
- requestMarginables = self.check_required_credentials(False)
1087
+ credentialsSet = self.check_required_credentials(False)
1088
+ requestMarginables = credentialsSet and self.safe_bool(params, 'marginables', True)
1087
1089
  if requestMarginables:
1088
1090
  promises.append(self.privateGetMarginSymbols(params)) # cross margin symbols
1089
1091
  #
@@ -1146,6 +1148,9 @@ class kucoin(Exchange, ImplicitAPI):
1146
1148
  # "makerCoefficient": "1" # Maker Fee Coefficient
1147
1149
  # }
1148
1150
  #
1151
+ if credentialsSet:
1152
+ # load migration status for account
1153
+ promises.append(self.load_migration_status())
1149
1154
  responses = promises
1150
1155
  symbolsData = self.safe_list(responses[0], 'data')
1151
1156
  crossData = self.safe_dict(responses[1], 'data', {}) if requestMarginables else {}
@@ -1232,14 +1237,16 @@ class kucoin(Exchange, ImplicitAPI):
1232
1237
  return result
1233
1238
 
1234
1239
  def load_migration_status(self, force: bool = False):
1235
- if not ('hfMigrated' in self.options) or (self.options['hfMigrated'] is None) or force:
1236
- result: dict = self.privateGetMigrateUserAccountStatus()
1237
- data: dict = self.safe_dict(result, 'data', {})
1238
- status: Int = self.safe_integer(data, 'status')
1239
- self.options['hfMigrated'] = (status == 2)
1240
+ """
1241
+ loads the migration status for the account(hf or not)
1242
+ :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
1243
+ """
1244
+ if not ('hf' in self.options) or (self.options['hf'] is None) or force:
1245
+ result: dict = self.privateGetHfAccountsOpened()
1246
+ self.options['hf'] = self.safe_bool(result, 'data')
1240
1247
 
1241
1248
  def handle_hf_and_params(self, params={}):
1242
- migrated: Bool = self.safe_bool_2(self.options, 'hfMigrated', 'hf', False)
1249
+ migrated: Bool = self.safe_bool(self.options, 'hf', False)
1243
1250
  loadedHf: Bool = None
1244
1251
  if migrated is not None:
1245
1252
  if migrated:
ccxt/latoken.py CHANGED
@@ -60,6 +60,12 @@ class latoken(Exchange, ImplicitAPI):
60
60
  'fetchDepositAddressesByNetwork': False,
61
61
  'fetchDepositsWithdrawals': True,
62
62
  'fetchDepositWithdrawFees': False,
63
+ 'fetchFundingHistory': False,
64
+ 'fetchFundingInterval': False,
65
+ 'fetchFundingIntervals': False,
66
+ 'fetchFundingRate': False,
67
+ 'fetchFundingRateHistory': False,
68
+ 'fetchFundingRates': False,
63
69
  'fetchIsolatedBorrowRate': False,
64
70
  'fetchIsolatedBorrowRates': False,
65
71
  'fetchMarginMode': False,
ccxt/mexc.py CHANGED
@@ -93,7 +93,7 @@ class mexc(Exchange, ImplicitAPI):
93
93
  'fetchFundingIntervals': False,
94
94
  'fetchFundingRate': True,
95
95
  'fetchFundingRateHistory': True,
96
- 'fetchFundingRates': None,
96
+ 'fetchFundingRates': False,
97
97
  'fetchIndexOHLCV': True,
98
98
  'fetchIsolatedBorrowRate': False,
99
99
  'fetchIsolatedBorrowRates': False,
ccxt/oceanex.py CHANGED
@@ -57,6 +57,8 @@ class oceanex(Exchange, ImplicitAPI):
57
57
  'fetchDepositAddress': 'emulated',
58
58
  'fetchDepositAddresses': None,
59
59
  'fetchDepositAddressesByNetwork': True,
60
+ 'fetchFundingRateHistory': False,
61
+ 'fetchFundingRates': False,
60
62
  'fetchIsolatedBorrowRate': False,
61
63
  'fetchIsolatedBorrowRates': False,
62
64
  'fetchMarkets': True,
ccxt/okcoin.py CHANGED
@@ -72,6 +72,7 @@ class okcoin(Exchange, ImplicitAPI):
72
72
  'fetchFundingHistory': False,
73
73
  'fetchFundingRate': False,
74
74
  'fetchFundingRateHistory': False,
75
+ 'fetchFundingRates': False,
75
76
  'fetchLedger': True,
76
77
  'fetchMarkets': True,
77
78
  'fetchMyTrades': True,
ccxt/poloniex.py CHANGED
@@ -62,7 +62,12 @@ class poloniex(Exchange, ImplicitAPI):
62
62
  'fetchDepositsWithdrawals': True,
63
63
  'fetchDepositWithdrawFee': 'emulated',
64
64
  'fetchDepositWithdrawFees': True,
65
+ 'fetchFundingHistory': False,
66
+ 'fetchFundingInterval': False,
67
+ 'fetchFundingIntervals': False,
65
68
  'fetchFundingRate': False,
69
+ 'fetchFundingRateHistory': False,
70
+ 'fetchFundingRates': False,
66
71
  'fetchMarginMode': False,
67
72
  'fetchMarkets': True,
68
73
  'fetchMyTrades': True,
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.22'
7
+ __version__ = '4.4.24'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -40,6 +40,7 @@ from ccxt.pro.coinbase import coinbase # noqa
40
40
  from ccxt.pro.coinbaseadvanced import coinbaseadvanced # noqa: F401
41
41
  from ccxt.pro.coinbaseexchange import coinbaseexchange # noqa: F401
42
42
  from ccxt.pro.coinbaseinternational import coinbaseinternational # noqa: F401
43
+ from ccxt.pro.coincatch import coincatch # noqa: F401
43
44
  from ccxt.pro.coincheck import coincheck # noqa: F401
44
45
  from ccxt.pro.coinex import coinex # noqa: F401
45
46
  from ccxt.pro.coinone import coinone # noqa: F401
@@ -114,6 +115,7 @@ exchanges = [
114
115
  'coinbaseadvanced',
115
116
  'coinbaseexchange',
116
117
  'coinbaseinternational',
118
+ 'coincatch',
117
119
  'coincheck',
118
120
  'coinex',
119
121
  'coinone',