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.
Files changed (77) hide show
  1. ccxt/__init__.py +4 -1
  2. ccxt/abstract/bitget.py +6 -0
  3. ccxt/abstract/hibachi.py +26 -0
  4. ccxt/async_support/__init__.py +4 -1
  5. ccxt/async_support/base/exchange.py +1 -1
  6. ccxt/async_support/binance.py +7 -6
  7. ccxt/async_support/bitget.py +2032 -559
  8. ccxt/async_support/bybit.py +5 -1
  9. ccxt/async_support/coinex.py +64 -3
  10. ccxt/async_support/coinmetro.py +2 -3
  11. ccxt/async_support/cryptocom.py +2 -1
  12. ccxt/async_support/gate.py +1 -2
  13. ccxt/async_support/hibachi.py +2080 -0
  14. ccxt/async_support/ndax.py +8 -0
  15. ccxt/async_support/novadax.py +34 -0
  16. ccxt/async_support/okx.py +2 -0
  17. ccxt/base/decimal_to_precision.py +7 -9
  18. ccxt/base/errors.py +6 -6
  19. ccxt/base/exchange.py +1 -1
  20. ccxt/binance.py +7 -6
  21. ccxt/bitget.py +2032 -559
  22. ccxt/bybit.py +5 -1
  23. ccxt/coinex.py +64 -3
  24. ccxt/coinmetro.py +2 -3
  25. ccxt/cryptocom.py +2 -1
  26. ccxt/gate.py +1 -2
  27. ccxt/hibachi.py +2079 -0
  28. ccxt/ndax.py +8 -0
  29. ccxt/novadax.py +34 -0
  30. ccxt/okx.py +2 -0
  31. ccxt/pro/__init__.py +2 -1
  32. ccxt/pro/alpaca.py +2 -2
  33. ccxt/pro/apex.py +2 -2
  34. ccxt/pro/ascendex.py +2 -2
  35. ccxt/pro/binance.py +2 -4
  36. ccxt/pro/bitget.py +3 -3
  37. ccxt/pro/bithumb.py +2 -2
  38. ccxt/pro/bitmart.py +2 -2
  39. ccxt/pro/bitmex.py +3 -3
  40. ccxt/pro/bitstamp.py +3 -3
  41. ccxt/pro/bittrade.py +2 -2
  42. ccxt/pro/bitvavo.py +4 -2
  43. ccxt/pro/bybit.py +4 -4
  44. ccxt/pro/cex.py +3 -2
  45. ccxt/pro/coinbaseexchange.py +4 -4
  46. ccxt/pro/coinbaseinternational.py +2 -2
  47. ccxt/pro/coincatch.py +1 -1
  48. ccxt/pro/coinone.py +2 -2
  49. ccxt/pro/cryptocom.py +2 -2
  50. ccxt/pro/derive.py +2 -2
  51. ccxt/pro/gate.py +3 -3
  52. ccxt/pro/hollaex.py +2 -2
  53. ccxt/pro/htx.py +3 -3
  54. ccxt/pro/hyperliquid.py +2 -2
  55. ccxt/pro/kraken.py +2 -2
  56. ccxt/pro/krakenfutures.py +4 -3
  57. ccxt/pro/kucoin.py +3 -2
  58. ccxt/pro/kucoinfutures.py +3 -2
  59. ccxt/pro/modetrade.py +2 -2
  60. ccxt/pro/okcoin.py +2 -2
  61. ccxt/pro/okx.py +5 -5
  62. ccxt/pro/onetrading.py +2 -2
  63. ccxt/pro/p2b.py +2 -2
  64. ccxt/pro/paradex.py +2 -2
  65. ccxt/pro/poloniex.py +2 -2
  66. ccxt/pro/probit.py +2 -2
  67. ccxt/pro/vertex.py +2 -2
  68. ccxt/pro/whitebit.py +2 -2
  69. ccxt/pro/woo.py +2 -2
  70. ccxt/pro/woofipro.py +2 -2
  71. ccxt/test/tests_async.py +1 -1
  72. ccxt/test/tests_sync.py +1 -1
  73. {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/METADATA +7 -6
  74. {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/RECORD +77 -74
  75. {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/LICENSE.txt +0 -0
  76. {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/WHEEL +0 -0
  77. {ccxt-4.4.97.dist-info → ccxt-4.4.99.dist-info}/top_level.txt +0 -0
ccxt/bybit.py CHANGED
@@ -5856,7 +5856,11 @@ classic accounts only/ spot not supported* fetches information on an order made
5856
5856
  """
5857
5857
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
5858
5858
  accountType = None
5859
+ accounts = self.is_unified_enabled()
5860
+ isUta = accounts[1]
5859
5861
  accountType, params = self.handle_option_and_params(params, 'withdraw', 'accountType', 'SPOT')
5862
+ if isUta:
5863
+ accountType = 'UTA'
5860
5864
  self.load_markets()
5861
5865
  self.check_address(address)
5862
5866
  currency = self.currency(code)
@@ -7934,7 +7938,7 @@ classic accounts only/ spot not supported* fetches information on an order made
7934
7938
  if market['spot']:
7935
7939
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7936
7940
  symbol = market['symbol']
7937
- data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
7941
+ data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 50}, params))
7938
7942
  symbols = self.market_symbols(symbols)
7939
7943
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7940
7944
 
ccxt/coinex.py CHANGED
@@ -86,7 +86,7 @@ class coinex(Exchange, ImplicitAPI):
86
86
  'fetchDepositAddressesByNetwork': False,
87
87
  'fetchDeposits': True,
88
88
  'fetchDepositWithdrawFee': True,
89
- 'fetchDepositWithdrawFees': False,
89
+ 'fetchDepositWithdrawFees': True,
90
90
  'fetchFundingHistory': True,
91
91
  'fetchFundingInterval': True,
92
92
  'fetchFundingIntervals': False,
@@ -739,6 +739,7 @@ class coinex(Exchange, ImplicitAPI):
739
739
  for j in range(0, len(chains)):
740
740
  chain = chains[j]
741
741
  networkId = self.safe_string(chain, 'chain')
742
+ networkCode = self.network_id_to_code(networkId, code)
742
743
  if networkId is None:
743
744
  continue
744
745
  precisionString = self.parse_precision(self.safe_string(chain, 'withdrawal_precision'))
@@ -749,7 +750,7 @@ class coinex(Exchange, ImplicitAPI):
749
750
  canWithdrawChain = self.safe_bool(chain, 'withdraw_enabled')
750
751
  network: dict = {
751
752
  'id': networkId,
752
- 'network': networkId,
753
+ 'network': networkCode,
753
754
  'name': None,
754
755
  'active': canDepositChain and canWithdrawChain,
755
756
  'deposit': canDepositChain,
@@ -772,7 +773,7 @@ class coinex(Exchange, ImplicitAPI):
772
773
  },
773
774
  'info': chain,
774
775
  }
775
- networks[networkId] = network
776
+ networks[networkCode] = network
776
777
  result[code] = self.safe_currency_structure({
777
778
  'id': currencyId,
778
779
  'code': code,
@@ -5392,6 +5393,66 @@ class coinex(Exchange, ImplicitAPI):
5392
5393
  data = self.safe_dict(response, 'data', {})
5393
5394
  return self.parse_deposit_withdraw_fee(data, currency)
5394
5395
 
5396
+ def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
5397
+ """
5398
+ fetch the fees for deposits and withdrawals
5399
+
5400
+ https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
5401
+
5402
+ @param codes
5403
+ :param dict [params]: extra parameters specific to the exchange API endpoint
5404
+ :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
5405
+ """
5406
+ self.load_markets()
5407
+ response = self.v2PublicGetAssetsAllDepositWithdrawConfig(params)
5408
+ #
5409
+ # {
5410
+ # "code": 0,
5411
+ # "data": [
5412
+ # {
5413
+ # "asset": {
5414
+ # "ccy": "CET",
5415
+ # "deposit_enabled": True,
5416
+ # "withdraw_enabled": True,
5417
+ # "inter_transfer_enabled": True,
5418
+ # "is_st": False
5419
+ # },
5420
+ # "chains": [
5421
+ # {
5422
+ # "chain": "CSC",
5423
+ # "min_deposit_amount": "0.8",
5424
+ # "min_withdraw_amount": "8",
5425
+ # "deposit_enabled": True,
5426
+ # "withdraw_enabled": True,
5427
+ # "deposit_delay_minutes": 0,
5428
+ # "safe_confirmations": 10,
5429
+ # "irreversible_confirmations": 20,
5430
+ # "deflation_rate": "0",
5431
+ # "withdrawal_fee": "0.026",
5432
+ # "withdrawal_precision": 8,
5433
+ # "memo": "",
5434
+ # "is_memo_required_for_deposit": False,
5435
+ # "explorer_asset_url": ""
5436
+ # },
5437
+ # ]
5438
+ # }
5439
+ # ],
5440
+ # "message": "OK"
5441
+ # }
5442
+ #
5443
+ data = self.safe_list(response, 'data', [])
5444
+ result: dict = {}
5445
+ for i in range(0, len(data)):
5446
+ item = data[i]
5447
+ asset = self.safe_dict(item, 'asset', {})
5448
+ currencyId = self.safe_string(asset, 'ccy')
5449
+ if currencyId is None:
5450
+ continue
5451
+ code = self.safe_currency_code(currencyId)
5452
+ if codes is None or self.in_array(code, codes):
5453
+ result[code] = self.parse_deposit_withdraw_fee(item)
5454
+ return result
5455
+
5395
5456
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
5396
5457
  #
5397
5458
  # {
ccxt/coinmetro.py CHANGED
@@ -220,7 +220,6 @@ class coinmetro(Exchange, ImplicitAPI):
220
220
  'options': {
221
221
  'currenciesByIdForParseMarket': None,
222
222
  'currencyIdsListForParseMarket': ['QRDO'],
223
- 'skippedMarkets': ['VXVUSDT'], # broken markets which do not have enough info in API
224
223
  },
225
224
  'features': {
226
225
  'spot': {
@@ -461,11 +460,11 @@ class coinmetro(Exchange, ImplicitAPI):
461
460
  # ...
462
461
  # ]
463
462
  #
464
- skippedMarkets = self.safe_list(self.options, 'skippedMarkets', [])
465
463
  result = []
466
464
  for i in range(0, len(response)):
467
465
  market = self.parse_market(response[i])
468
- if self.in_array(market['id'], skippedMarkets):
466
+ # there are several broken(unavailable info) markets
467
+ if market['base'] is None or market['quote'] is None:
469
468
  continue
470
469
  result.append(market)
471
470
  return result
ccxt/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 = self.v1PublicGetPublicGetBook(self.extend(request, params))
1138
1139
  #
1139
1140
  # {
ccxt/gate.py CHANGED
@@ -684,8 +684,7 @@ class gate(Exchange, ImplicitAPI):
684
684
  'BSC': 'BSC',
685
685
  'BEP20': 'BSC',
686
686
  'SOL': 'SOL',
687
- 'POLYGON': 'POL',
688
- 'MATIC': 'POL',
687
+ 'MATIC': 'MATIC',
689
688
  'OPTIMISM': 'OPETH',
690
689
  'ADA': 'ADA', # CARDANO
691
690
  'AVAXC': 'AVAX_C',