ccxt 4.4.23__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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +1 -1
- ccxt/abstract/binancecoinm.py +1 -1
- ccxt/abstract/binanceus.py +1 -1
- ccxt/abstract/binanceusdm.py +1 -1
- ccxt/abstract/kucoin.py +1 -0
- ccxt/abstract/kucoinfutures.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bybit.py +37 -4
- ccxt/async_support/coincatch.py +1 -1
- ccxt/async_support/gate.py +177 -59
- ccxt/async_support/hyperliquid.py +1 -1
- ccxt/async_support/kucoin.py +15 -8
- ccxt/async_support/yobit.py +1 -1
- ccxt/base/exchange.py +5 -4
- ccxt/binance.py +1 -1
- ccxt/bybit.py +37 -4
- ccxt/coincatch.py +1 -1
- ccxt/gate.py +177 -59
- ccxt/hyperliquid.py +1 -1
- ccxt/kucoin.py +15 -8
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/kucoin.py +2 -1
- ccxt/pro/onetrading.py +2 -1
- ccxt/test/tests_async.py +14 -5
- ccxt/test/tests_sync.py +14 -5
- ccxt/yobit.py +1 -1
- ccxt-4.4.24.dist-info/METADATA +636 -0
- {ccxt-4.4.23.dist-info → ccxt-4.4.24.dist-info}/RECORD +34 -34
- ccxt-4.4.23.dist-info/METADATA +0 -636
- {ccxt-4.4.23.dist-info → ccxt-4.4.24.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.23.dist-info → ccxt-4.4.24.dist-info}/WHEEL +0 -0
- {ccxt-4.4.23.dist-info → ccxt-4.4.24.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/binance.py
CHANGED
@@ -697,7 +697,7 @@ class ImplicitAPI:
|
|
697
697
|
papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
|
698
698
|
papi_get_um_trade_asyn = papiGetUmTradeAsyn = Entry('um/trade/asyn', 'papi', 'GET', {'cost': 300})
|
699
699
|
papi_get_um_trade_asyn_id = papiGetUmTradeAsynId = Entry('um/trade/asyn/id', 'papi', 'GET', {'cost': 2})
|
700
|
-
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn
|
700
|
+
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn', 'papi', 'GET', {'cost': 300})
|
701
701
|
papi_get_um_order_asyn_id = papiGetUmOrderAsynId = Entry('um/order/asyn/id', 'papi', 'GET', {'cost': 2})
|
702
702
|
papi_get_um_income_asyn = papiGetUmIncomeAsyn = Entry('um/income/asyn', 'papi', 'GET', {'cost': 300})
|
703
703
|
papi_get_um_income_asyn_id = papiGetUmIncomeAsynId = Entry('um/income/asyn/id', 'papi', 'GET', {'cost': 2})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -697,7 +697,7 @@ class ImplicitAPI:
|
|
697
697
|
papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
|
698
698
|
papi_get_um_trade_asyn = papiGetUmTradeAsyn = Entry('um/trade/asyn', 'papi', 'GET', {'cost': 300})
|
699
699
|
papi_get_um_trade_asyn_id = papiGetUmTradeAsynId = Entry('um/trade/asyn/id', 'papi', 'GET', {'cost': 2})
|
700
|
-
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn
|
700
|
+
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn', 'papi', 'GET', {'cost': 300})
|
701
701
|
papi_get_um_order_asyn_id = papiGetUmOrderAsynId = Entry('um/order/asyn/id', 'papi', 'GET', {'cost': 2})
|
702
702
|
papi_get_um_income_asyn = papiGetUmIncomeAsyn = Entry('um/income/asyn', 'papi', 'GET', {'cost': 300})
|
703
703
|
papi_get_um_income_asyn_id = papiGetUmIncomeAsynId = Entry('um/income/asyn/id', 'papi', 'GET', {'cost': 2})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -749,7 +749,7 @@ class ImplicitAPI:
|
|
749
749
|
papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
|
750
750
|
papi_get_um_trade_asyn = papiGetUmTradeAsyn = Entry('um/trade/asyn', 'papi', 'GET', {'cost': 300})
|
751
751
|
papi_get_um_trade_asyn_id = papiGetUmTradeAsynId = Entry('um/trade/asyn/id', 'papi', 'GET', {'cost': 2})
|
752
|
-
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn
|
752
|
+
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn', 'papi', 'GET', {'cost': 300})
|
753
753
|
papi_get_um_order_asyn_id = papiGetUmOrderAsynId = Entry('um/order/asyn/id', 'papi', 'GET', {'cost': 2})
|
754
754
|
papi_get_um_income_asyn = papiGetUmIncomeAsyn = Entry('um/income/asyn', 'papi', 'GET', {'cost': 300})
|
755
755
|
papi_get_um_income_asyn_id = papiGetUmIncomeAsynId = Entry('um/income/asyn/id', 'papi', 'GET', {'cost': 2})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -697,7 +697,7 @@ class ImplicitAPI:
|
|
697
697
|
papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
|
698
698
|
papi_get_um_trade_asyn = papiGetUmTradeAsyn = Entry('um/trade/asyn', 'papi', 'GET', {'cost': 300})
|
699
699
|
papi_get_um_trade_asyn_id = papiGetUmTradeAsynId = Entry('um/trade/asyn/id', 'papi', 'GET', {'cost': 2})
|
700
|
-
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn
|
700
|
+
papi_get_um_order_asyn = papiGetUmOrderAsyn = Entry('um/order/asyn', 'papi', 'GET', {'cost': 300})
|
701
701
|
papi_get_um_order_asyn_id = papiGetUmOrderAsynId = Entry('um/order/asyn/id', 'papi', 'GET', {'cost': 2})
|
702
702
|
papi_get_um_income_asyn = papiGetUmIncomeAsyn = Entry('um/income/asyn', 'papi', 'GET', {'cost': 300})
|
703
703
|
papi_get_um_income_asyn_id = papiGetUmIncomeAsynId = Entry('um/income/asyn/id', 'papi', 'GET', {'cost': 2})
|
ccxt/abstract/kucoin.py
CHANGED
@@ -49,6 +49,7 @@ class ImplicitAPI:
|
|
49
49
|
private_get_market_orderbook_level_level = privateGetMarketOrderbookLevelLevel = Entry('market/orderbook/level{level}', 'private', 'GET', {'cost': 3})
|
50
50
|
private_get_market_orderbook_level2 = privateGetMarketOrderbookLevel2 = Entry('market/orderbook/level2', 'private', 'GET', {'cost': 3})
|
51
51
|
private_get_market_orderbook_level3 = privateGetMarketOrderbookLevel3 = Entry('market/orderbook/level3', 'private', 'GET', {'cost': 3})
|
52
|
+
private_get_hf_accounts_opened = privateGetHfAccountsOpened = Entry('hf/accounts/opened', 'private', 'GET', {'cost': 2})
|
52
53
|
private_get_hf_orders_active = privateGetHfOrdersActive = Entry('hf/orders/active', 'private', 'GET', {'cost': 2})
|
53
54
|
private_get_hf_orders_active_symbols = privateGetHfOrdersActiveSymbols = Entry('hf/orders/active/symbols', 'private', 'GET', {'cost': 2})
|
54
55
|
private_get_hf_margin_order_active_symbols = privateGetHfMarginOrderActiveSymbols = Entry('hf/margin/order/active/symbols', 'private', 'GET', {'cost': 2})
|
ccxt/abstract/kucoinfutures.py
CHANGED
@@ -49,6 +49,7 @@ class ImplicitAPI:
|
|
49
49
|
private_get_market_orderbook_level_level = privateGetMarketOrderbookLevelLevel = Entry('market/orderbook/level{level}', 'private', 'GET', {'cost': 3})
|
50
50
|
private_get_market_orderbook_level2 = privateGetMarketOrderbookLevel2 = Entry('market/orderbook/level2', 'private', 'GET', {'cost': 3})
|
51
51
|
private_get_market_orderbook_level3 = privateGetMarketOrderbookLevel3 = Entry('market/orderbook/level3', 'private', 'GET', {'cost': 3})
|
52
|
+
private_get_hf_accounts_opened = privateGetHfAccountsOpened = Entry('hf/accounts/opened', 'private', 'GET', {'cost': 2})
|
52
53
|
private_get_hf_orders_active = privateGetHfOrdersActive = Entry('hf/orders/active', 'private', 'GET', {'cost': 2})
|
53
54
|
private_get_hf_orders_active_symbols = privateGetHfOrdersActiveSymbols = Entry('hf/orders/active/symbols', 'private', 'GET', {'cost': 2})
|
54
55
|
private_get_hf_margin_order_active_symbols = privateGetHfMarginOrderActiveSymbols = Entry('hf/margin/order/active/symbols', 'private', 'GET', {'cost': 2})
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/binance.py
CHANGED
@@ -1118,7 +1118,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1118
1118
|
'cm/adlQuantile': 5,
|
1119
1119
|
'um/trade/asyn': 300,
|
1120
1120
|
'um/trade/asyn/id': 2,
|
1121
|
-
'um/order/asyn
|
1121
|
+
'um/order/asyn': 300,
|
1122
1122
|
'um/order/asyn/id': 2,
|
1123
1123
|
'um/income/asyn': 300,
|
1124
1124
|
'um/income/asyn/id': 2,
|
ccxt/async_support/bybit.py
CHANGED
@@ -1027,6 +1027,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1027
1027
|
},
|
1028
1028
|
'enableUnifiedMargin': None,
|
1029
1029
|
'enableUnifiedAccount': None,
|
1030
|
+
'unifiedMarginStatus': None,
|
1030
1031
|
'createMarketBuyOrderRequiresPrice': True, # only True for classic accounts
|
1031
1032
|
'createUnifiedMarginAccount': False,
|
1032
1033
|
'defaultType': 'swap', # 'swap', 'future', 'option', 'spot'
|
@@ -1146,6 +1147,8 @@ class bybit(Exchange, ImplicitAPI):
|
|
1146
1147
|
|
1147
1148
|
async def is_unified_enabled(self, params={}):
|
1148
1149
|
"""
|
1150
|
+
:see: https://bybit-exchange.github.io/docs/v5/user/apikey-info#http-request
|
1151
|
+
:see: https://bybit-exchange.github.io/docs/v5/account/account-info
|
1149
1152
|
returns [enableUnifiedMargin, enableUnifiedAccount] so the user can check if unified account is enabled
|
1150
1153
|
"""
|
1151
1154
|
# The API key of user id must own one of permissions will be allowed to call following API endpoints.
|
@@ -1159,8 +1162,12 @@ class bybit(Exchange, ImplicitAPI):
|
|
1159
1162
|
# so we're assuming UTA is enabled
|
1160
1163
|
self.options['enableUnifiedMargin'] = False
|
1161
1164
|
self.options['enableUnifiedAccount'] = True
|
1165
|
+
self.options['unifiedMarginStatus'] = 3
|
1162
1166
|
return [self.options['enableUnifiedMargin'], self.options['enableUnifiedAccount']]
|
1163
|
-
|
1167
|
+
rawPromises = [self.privateGetV5UserQueryApi(params), self.privateGetV5AccountInfo(params)]
|
1168
|
+
promises = await asyncio.gather(*rawPromises)
|
1169
|
+
response = promises[0]
|
1170
|
+
accountInfo = promises[1]
|
1164
1171
|
#
|
1165
1172
|
# {
|
1166
1173
|
# "retCode": 0,
|
@@ -1200,13 +1207,34 @@ class bybit(Exchange, ImplicitAPI):
|
|
1200
1207
|
# "retExtInfo": {},
|
1201
1208
|
# "time": 1676891757649
|
1202
1209
|
# }
|
1210
|
+
# account info
|
1211
|
+
# {
|
1212
|
+
# "retCode": 0,
|
1213
|
+
# "retMsg": "OK",
|
1214
|
+
# "result": {
|
1215
|
+
# "marginMode": "REGULAR_MARGIN",
|
1216
|
+
# "updatedTime": "1697078946000",
|
1217
|
+
# "unifiedMarginStatus": 4,
|
1218
|
+
# "dcpStatus": "OFF",
|
1219
|
+
# "timeWindow": 10,
|
1220
|
+
# "smpGroup": 0,
|
1221
|
+
# "isMasterTrader": False,
|
1222
|
+
# "spotHedgingStatus": "OFF"
|
1223
|
+
# }
|
1224
|
+
# }
|
1203
1225
|
#
|
1204
1226
|
result = self.safe_dict(response, 'result', {})
|
1227
|
+
accountResult = self.safe_dict(accountInfo, 'result', {})
|
1205
1228
|
self.options['enableUnifiedMargin'] = self.safe_integer(result, 'unified') == 1
|
1206
1229
|
self.options['enableUnifiedAccount'] = self.safe_integer(result, 'uta') == 1
|
1230
|
+
self.options['unifiedMarginStatus'] = self.safe_integer(accountResult, 'unifiedMarginStatus', 3) # default to uta.1 if not found
|
1207
1231
|
return [self.options['enableUnifiedMargin'], self.options['enableUnifiedAccount']]
|
1208
1232
|
|
1209
1233
|
async def upgrade_unified_trade_account(self, params={}):
|
1234
|
+
"""
|
1235
|
+
:see: https://bybit-exchange.github.io/docs/v5/account/upgrade-unified-account
|
1236
|
+
upgrades the account to unified trade account *warning* self is irreversible
|
1237
|
+
"""
|
1210
1238
|
return await self.privatePostV5AccountUpgradeToUta(params)
|
1211
1239
|
|
1212
1240
|
def create_expired_option_market(self, symbol: str):
|
@@ -3019,10 +3047,15 @@ class bybit(Exchange, ImplicitAPI):
|
|
3019
3047
|
isInverse = (type == 'inverse')
|
3020
3048
|
isFunding = (lowercaseRawType == 'fund') or (lowercaseRawType == 'funding')
|
3021
3049
|
if isUnifiedAccount:
|
3022
|
-
|
3023
|
-
|
3050
|
+
unifiedMarginStatus = self.safe_integer(self.options, 'unifiedMarginStatus', 3)
|
3051
|
+
if unifiedMarginStatus < 5:
|
3052
|
+
# it's not uta.20 where inverse are unified
|
3053
|
+
if isInverse:
|
3054
|
+
type = 'contract'
|
3055
|
+
else:
|
3056
|
+
type = 'unified'
|
3024
3057
|
else:
|
3025
|
-
type = 'unified'
|
3058
|
+
type = 'unified' # uta.20 where inverse are unified
|
3026
3059
|
else:
|
3027
3060
|
if isLinear or isInverse:
|
3028
3061
|
type = 'contract'
|
ccxt/async_support/coincatch.py
CHANGED
@@ -154,7 +154,7 @@ class coincatch(Exchange, ImplicitAPI):
|
|
154
154
|
'1M': '1M',
|
155
155
|
},
|
156
156
|
'urls': {
|
157
|
-
'logo': 'https://
|
157
|
+
'logo': 'https://github.com/user-attachments/assets/3d49065f-f05d-4573-88a2-1b5201ec6ff3',
|
158
158
|
'api': {
|
159
159
|
'public': 'https://api.coincatch.com',
|
160
160
|
'private': 'https://api.coincatch.com',
|