ccxt 4.4.97__py2.py3-none-any.whl → 4.4.99__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 +4 -1
- ccxt/abstract/bitget.py +6 -0
- ccxt/abstract/hibachi.py +26 -0
- ccxt/async_support/__init__.py +4 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +7 -6
- ccxt/async_support/bitget.py +2032 -559
- ccxt/async_support/bybit.py +5 -1
- ccxt/async_support/coinex.py +64 -3
- ccxt/async_support/coinmetro.py +2 -3
- ccxt/async_support/cryptocom.py +2 -1
- ccxt/async_support/gate.py +1 -2
- ccxt/async_support/hibachi.py +2080 -0
- ccxt/async_support/ndax.py +8 -0
- ccxt/async_support/novadax.py +34 -0
- ccxt/async_support/okx.py +2 -0
- ccxt/base/decimal_to_precision.py +7 -9
- ccxt/base/errors.py +6 -6
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +7 -6
- ccxt/bitget.py +2032 -559
- ccxt/bybit.py +5 -1
- ccxt/coinex.py +64 -3
- ccxt/coinmetro.py +2 -3
- ccxt/cryptocom.py +2 -1
- ccxt/gate.py +1 -2
- ccxt/hibachi.py +2079 -0
- ccxt/ndax.py +8 -0
- ccxt/novadax.py +34 -0
- ccxt/okx.py +2 -0
- ccxt/pro/__init__.py +2 -1
- ccxt/pro/alpaca.py +2 -2
- ccxt/pro/apex.py +2 -2
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +2 -4
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bithumb.py +2 -2
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitstamp.py +3 -3
- ccxt/pro/bittrade.py +2 -2
- ccxt/pro/bitvavo.py +4 -2
- ccxt/pro/bybit.py +4 -4
- ccxt/pro/cex.py +3 -2
- ccxt/pro/coinbaseexchange.py +4 -4
- ccxt/pro/coinbaseinternational.py +2 -2
- ccxt/pro/coincatch.py +1 -1
- ccxt/pro/coinone.py +2 -2
- ccxt/pro/cryptocom.py +2 -2
- ccxt/pro/derive.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +3 -3
- ccxt/pro/hyperliquid.py +2 -2
- ccxt/pro/kraken.py +2 -2
- ccxt/pro/krakenfutures.py +4 -3
- ccxt/pro/kucoin.py +3 -2
- ccxt/pro/kucoinfutures.py +3 -2
- ccxt/pro/modetrade.py +2 -2
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +5 -5
- ccxt/pro/onetrading.py +2 -2
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/paradex.py +2 -2
- ccxt/pro/poloniex.py +2 -2
- ccxt/pro/probit.py +2 -2
- ccxt/pro/vertex.py +2 -2
- ccxt/pro/whitebit.py +2 -2
- ccxt/pro/woo.py +2 -2
- ccxt/pro/woofipro.py +2 -2
- ccxt/test/tests_async.py +1 -1
- ccxt/test/tests_sync.py +1 -1
- {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/METADATA +7 -6
- {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/RECORD +77 -74
- {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/WHEEL +0 -0
- {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/top_level.txt +0 -0
ccxt/async_support/bybit.py
CHANGED
@@ -5857,7 +5857,11 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
5857
5857
|
"""
|
5858
5858
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
5859
5859
|
accountType = None
|
5860
|
+
accounts = await self.is_unified_enabled()
|
5861
|
+
isUta = accounts[1]
|
5860
5862
|
accountType, params = self.handle_option_and_params(params, 'withdraw', 'accountType', 'SPOT')
|
5863
|
+
if isUta:
|
5864
|
+
accountType = 'UTA'
|
5861
5865
|
await self.load_markets()
|
5862
5866
|
self.check_address(address)
|
5863
5867
|
currency = self.currency(code)
|
@@ -7935,7 +7939,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
7935
7939
|
if market['spot']:
|
7936
7940
|
raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
|
7937
7941
|
symbol = market['symbol']
|
7938
|
-
data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls':
|
7942
|
+
data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 50}, params))
|
7939
7943
|
symbols = self.market_symbols(symbols)
|
7940
7944
|
return self.parse_leverage_tiers(data, symbols, 'symbol')
|
7941
7945
|
|
ccxt/async_support/coinex.py
CHANGED
@@ -87,7 +87,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
87
87
|
'fetchDepositAddressesByNetwork': False,
|
88
88
|
'fetchDeposits': True,
|
89
89
|
'fetchDepositWithdrawFee': True,
|
90
|
-
'fetchDepositWithdrawFees':
|
90
|
+
'fetchDepositWithdrawFees': True,
|
91
91
|
'fetchFundingHistory': True,
|
92
92
|
'fetchFundingInterval': True,
|
93
93
|
'fetchFundingIntervals': False,
|
@@ -740,6 +740,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
740
740
|
for j in range(0, len(chains)):
|
741
741
|
chain = chains[j]
|
742
742
|
networkId = self.safe_string(chain, 'chain')
|
743
|
+
networkCode = self.network_id_to_code(networkId, code)
|
743
744
|
if networkId is None:
|
744
745
|
continue
|
745
746
|
precisionString = self.parse_precision(self.safe_string(chain, 'withdrawal_precision'))
|
@@ -750,7 +751,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
750
751
|
canWithdrawChain = self.safe_bool(chain, 'withdraw_enabled')
|
751
752
|
network: dict = {
|
752
753
|
'id': networkId,
|
753
|
-
'network':
|
754
|
+
'network': networkCode,
|
754
755
|
'name': None,
|
755
756
|
'active': canDepositChain and canWithdrawChain,
|
756
757
|
'deposit': canDepositChain,
|
@@ -773,7 +774,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
773
774
|
},
|
774
775
|
'info': chain,
|
775
776
|
}
|
776
|
-
networks[
|
777
|
+
networks[networkCode] = network
|
777
778
|
result[code] = self.safe_currency_structure({
|
778
779
|
'id': currencyId,
|
779
780
|
'code': code,
|
@@ -5393,6 +5394,66 @@ class coinex(Exchange, ImplicitAPI):
|
|
5393
5394
|
data = self.safe_dict(response, 'data', {})
|
5394
5395
|
return self.parse_deposit_withdraw_fee(data, currency)
|
5395
5396
|
|
5397
|
+
async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
5398
|
+
"""
|
5399
|
+
fetch the fees for deposits and withdrawals
|
5400
|
+
|
5401
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
|
5402
|
+
|
5403
|
+
@param codes
|
5404
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5405
|
+
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
5406
|
+
"""
|
5407
|
+
await self.load_markets()
|
5408
|
+
response = await self.v2PublicGetAssetsAllDepositWithdrawConfig(params)
|
5409
|
+
#
|
5410
|
+
# {
|
5411
|
+
# "code": 0,
|
5412
|
+
# "data": [
|
5413
|
+
# {
|
5414
|
+
# "asset": {
|
5415
|
+
# "ccy": "CET",
|
5416
|
+
# "deposit_enabled": True,
|
5417
|
+
# "withdraw_enabled": True,
|
5418
|
+
# "inter_transfer_enabled": True,
|
5419
|
+
# "is_st": False
|
5420
|
+
# },
|
5421
|
+
# "chains": [
|
5422
|
+
# {
|
5423
|
+
# "chain": "CSC",
|
5424
|
+
# "min_deposit_amount": "0.8",
|
5425
|
+
# "min_withdraw_amount": "8",
|
5426
|
+
# "deposit_enabled": True,
|
5427
|
+
# "withdraw_enabled": True,
|
5428
|
+
# "deposit_delay_minutes": 0,
|
5429
|
+
# "safe_confirmations": 10,
|
5430
|
+
# "irreversible_confirmations": 20,
|
5431
|
+
# "deflation_rate": "0",
|
5432
|
+
# "withdrawal_fee": "0.026",
|
5433
|
+
# "withdrawal_precision": 8,
|
5434
|
+
# "memo": "",
|
5435
|
+
# "is_memo_required_for_deposit": False,
|
5436
|
+
# "explorer_asset_url": ""
|
5437
|
+
# },
|
5438
|
+
# ]
|
5439
|
+
# }
|
5440
|
+
# ],
|
5441
|
+
# "message": "OK"
|
5442
|
+
# }
|
5443
|
+
#
|
5444
|
+
data = self.safe_list(response, 'data', [])
|
5445
|
+
result: dict = {}
|
5446
|
+
for i in range(0, len(data)):
|
5447
|
+
item = data[i]
|
5448
|
+
asset = self.safe_dict(item, 'asset', {})
|
5449
|
+
currencyId = self.safe_string(asset, 'ccy')
|
5450
|
+
if currencyId is None:
|
5451
|
+
continue
|
5452
|
+
code = self.safe_currency_code(currencyId)
|
5453
|
+
if codes is None or self.in_array(code, codes):
|
5454
|
+
result[code] = self.parse_deposit_withdraw_fee(item)
|
5455
|
+
return result
|
5456
|
+
|
5396
5457
|
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
5397
5458
|
#
|
5398
5459
|
# {
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -221,7 +221,6 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
221
221
|
'options': {
|
222
222
|
'currenciesByIdForParseMarket': None,
|
223
223
|
'currencyIdsListForParseMarket': ['QRDO'],
|
224
|
-
'skippedMarkets': ['VXVUSDT'], # broken markets which do not have enough info in API
|
225
224
|
},
|
226
225
|
'features': {
|
227
226
|
'spot': {
|
@@ -462,11 +461,11 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
462
461
|
# ...
|
463
462
|
# ]
|
464
463
|
#
|
465
|
-
skippedMarkets = self.safe_list(self.options, 'skippedMarkets', [])
|
466
464
|
result = []
|
467
465
|
for i in range(0, len(response)):
|
468
466
|
market = self.parse_market(response[i])
|
469
|
-
|
467
|
+
# there are several broken(unavailable info) markets
|
468
|
+
if market['base'] is None or market['quote'] is None:
|
470
469
|
continue
|
471
470
|
result.append(market)
|
472
471
|
return result
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -481,6 +481,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
481
481
|
'exceptions': {
|
482
482
|
'exact': {
|
483
483
|
'219': InvalidOrder,
|
484
|
+
'306': InsufficientFunds, # {"id" : 1753xxx, "method" : "private/amend-order", "code" : 306, "message" : "INSUFFICIENT_AVAILABLE_BALANCE", "result" : {"client_oid" : "1753xxx", "order_id" : "6530xxx"}}
|
484
485
|
'314': InvalidOrder, # {"id" : 1700xxx, "method" : "private/create-order", "code" : 314, "message" : "EXCEEDS_MAX_ORDER_SIZE", "result" : {"client_oid" : "1700xxx", "order_id" : "6530xxx"}}
|
485
486
|
'325': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 325, "message" : "EXCEED_DAILY_VOL_LIMIT", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
486
487
|
'415': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 415, "message" : "BELOW_MIN_ORDER_SIZE", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
@@ -1133,7 +1134,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1133
1134
|
'instrument_name': market['id'],
|
1134
1135
|
}
|
1135
1136
|
if limit:
|
1136
|
-
request['depth'] = limit
|
1137
|
+
request['depth'] = min(limit, 50) # max 50
|
1137
1138
|
response = await self.v1PublicGetPublicGetBook(self.extend(request, params))
|
1138
1139
|
#
|
1139
1140
|
# {
|
ccxt/async_support/gate.py
CHANGED