ccxt 4.4.23__py2.py3-none-any.whl → 4.4.25__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 (47) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -1
  3. ccxt/abstract/binancecoinm.py +1 -1
  4. ccxt/abstract/binanceus.py +1 -1
  5. ccxt/abstract/binanceusdm.py +1 -1
  6. ccxt/abstract/kucoin.py +1 -0
  7. ccxt/abstract/kucoinfutures.py +1 -0
  8. ccxt/async_support/__init__.py +1 -1
  9. ccxt/async_support/base/exchange.py +1 -1
  10. ccxt/async_support/binance.py +1 -1
  11. ccxt/async_support/bitmex.py +8 -7
  12. ccxt/async_support/bybit.py +37 -4
  13. ccxt/async_support/coincatch.py +1 -1
  14. ccxt/async_support/coinex.py +45 -21
  15. ccxt/async_support/gate.py +177 -59
  16. ccxt/async_support/hitbtc.py +5 -9
  17. ccxt/async_support/htx.py +16 -16
  18. ccxt/async_support/hyperliquid.py +1 -1
  19. ccxt/async_support/kucoin.py +15 -8
  20. ccxt/async_support/woofipro.py +1 -1
  21. ccxt/async_support/xt.py +4 -1
  22. ccxt/async_support/yobit.py +1 -1
  23. ccxt/base/exchange.py +5 -4
  24. ccxt/binance.py +1 -1
  25. ccxt/bitmex.py +8 -7
  26. ccxt/bybit.py +37 -4
  27. ccxt/coincatch.py +1 -1
  28. ccxt/coinex.py +45 -21
  29. ccxt/gate.py +177 -59
  30. ccxt/hitbtc.py +5 -9
  31. ccxt/htx.py +16 -16
  32. ccxt/hyperliquid.py +1 -1
  33. ccxt/kucoin.py +15 -8
  34. ccxt/pro/__init__.py +1 -1
  35. ccxt/pro/kucoin.py +2 -1
  36. ccxt/pro/onetrading.py +2 -1
  37. ccxt/test/tests_async.py +14 -5
  38. ccxt/test/tests_sync.py +14 -5
  39. ccxt/woofipro.py +1 -1
  40. ccxt/xt.py +4 -1
  41. ccxt/yobit.py +1 -1
  42. ccxt-4.4.25.dist-info/METADATA +636 -0
  43. {ccxt-4.4.23.dist-info → ccxt-4.4.25.dist-info}/RECORD +46 -46
  44. ccxt-4.4.23.dist-info/METADATA +0 -636
  45. {ccxt-4.4.23.dist-info → ccxt-4.4.25.dist-info}/LICENSE.txt +0 -0
  46. {ccxt-4.4.23.dist-info → ccxt-4.4.25.dist-info}/WHEEL +0 -0
  47. {ccxt-4.4.23.dist-info → ccxt-4.4.25.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.23'
25
+ __version__ = '4.4.25'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
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/', 'papi', 'GET', {'cost': 300})
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})
@@ -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/', 'papi', 'GET', {'cost': 300})
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})
@@ -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/', 'papi', 'GET', {'cost': 300})
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})
@@ -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/', 'papi', 'GET', {'cost': 300})
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})
@@ -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})
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.23'
7
+ __version__ = '4.4.25'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.23'
5
+ __version__ = '4.4.25'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -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/': 300,
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,
@@ -1108,17 +1108,18 @@ class bitmex(Exchange, ImplicitAPI):
1108
1108
  # set the timestamp to zero, 1970 Jan 1 00:00:00
1109
1109
  # for unrealized pnl and other transactions without a timestamp
1110
1110
  timestamp = 0 # see comments above
1111
+ fee = None
1111
1112
  feeCost = self.safe_string(item, 'fee')
1112
1113
  if feeCost is not None:
1113
1114
  feeCost = self.convert_to_real_amount(code, feeCost)
1114
- fee = {
1115
- 'cost': self.parse_to_numeric(feeCost),
1116
- 'currency': code,
1117
- }
1115
+ fee = {
1116
+ 'cost': self.parse_number(feeCost),
1117
+ 'currency': code,
1118
+ }
1118
1119
  after = self.safe_string(item, 'walletBalance')
1119
1120
  if after is not None:
1120
1121
  after = self.convert_to_real_amount(code, after)
1121
- before = self.parse_to_numeric(Precise.string_sub(self.number_to_string(after), self.number_to_string(amount)))
1122
+ before = self.parse_number(Precise.string_sub(self.number_to_string(after), self.number_to_string(amount)))
1122
1123
  direction = None
1123
1124
  if Precise.string_lt(amountString, '0'):
1124
1125
  direction = 'out'
@@ -1137,9 +1138,9 @@ class bitmex(Exchange, ImplicitAPI):
1137
1138
  'referenceAccount': referenceAccount,
1138
1139
  'type': type,
1139
1140
  'currency': code,
1140
- 'amount': self.parse_to_numeric(amount),
1141
+ 'amount': self.parse_number(amount),
1141
1142
  'before': before,
1142
- 'after': self.parse_to_numeric(after),
1143
+ 'after': self.parse_number(after),
1143
1144
  'status': status,
1144
1145
  'fee': fee,
1145
1146
  }, currency)
@@ -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
- response = await self.privateGetV5UserQueryApi(params)
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
- if isInverse:
3023
- type = 'contract'
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'
@@ -154,7 +154,7 @@ class coincatch(Exchange, ImplicitAPI):
154
154
  '1M': '1M',
155
155
  },
156
156
  'urls': {
157
- 'logo': 'https://private-user-images.githubusercontent.com/43336371/379178446-b99d8af1-3016-4775-ac37-d5016dccb000.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mjk2NzMxOTksIm5iZiI6MTcyOTY3Mjg5OSwicGF0aCI6Ii80MzMzNjM3MS8zNzkxNzg0NDYtYjk5ZDhhZjEtMzAxNi00Nzc1LWFjMzctZDUwMTZkY2NiMDAwLmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQxMDIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTAyM1QwODQxMzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMTkzNTAzYjhlYzg5ODU4ZjFhYzgwZTg3MGFmYjk5MWViMjMwNDY5ZGU4NDRlNGU0NmUxYTgxMzM3OTNlZWM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.tosowLHE9p_cKbY8dPPduHXFVJQrUZ8qzGBOTCCznvw',
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',
@@ -474,9 +474,43 @@ class coinex(Exchange, ImplicitAPI):
474
474
  'FUTURES': 'swap',
475
475
  },
476
476
  'networks': {
477
+ 'BTC': 'BTC',
477
478
  'BEP20': 'BSC',
478
- 'TRX': 'TRC20',
479
- 'ETH': 'ERC20',
479
+ 'TRC20': 'TRC20',
480
+ 'ERC20': 'ERC20',
481
+ 'BRC20': 'BRC20',
482
+ 'SOL': 'SOL',
483
+ 'TON': 'SOL',
484
+ 'BSV': 'BSV',
485
+ 'AVAXC': 'AVA_C',
486
+ 'AVAXX': 'AVA',
487
+ 'SUI': 'SUI',
488
+ 'ACA': 'ACA',
489
+ 'CHZ': 'CHILIZ',
490
+ 'ADA': 'ADA',
491
+ 'ARB': 'ARBITRUM',
492
+ 'ARBNOVA': 'ARBITRUM_NOVA',
493
+ 'OP': 'OPTIMISM',
494
+ 'APT': 'APTOS',
495
+ 'ATOM': 'ATOM',
496
+ 'FTM': 'FTM',
497
+ 'BCH': 'BCH',
498
+ 'ASTR': 'ASTR',
499
+ 'LTC': 'LTC',
500
+ 'MATIC': 'MATIC',
501
+ 'CRONOS': 'CRONOS',
502
+ 'DASH': 'DASH',
503
+ 'DOT': 'DOT',
504
+ 'ETC': 'ETC',
505
+ 'ETHW': 'ETHPOW',
506
+ 'FIL': 'FIL',
507
+ 'ZIL': 'ZIL',
508
+ 'DOGE': 'DOGE',
509
+ 'TIA': 'CELESTIA',
510
+ 'SEI': 'SEI',
511
+ 'XRP': 'XRP',
512
+ 'XMR': 'XMR',
513
+ # CSC, AE, BASE, AIPG, AKASH, POLKADOTASSETHUB ?, ALEO, STX, ALGO, ALPH, BLAST, AR, ARCH, ARDR, ARK, ARRR, MANTA, NTRN, LUNA, AURORA, AVAIL, ASC20, AVA, AYA, AZERO, BAN, BAND, BB, RUNES, BEAM, BELLSCOIN, BITCI, NEAR, AGORIC, BLOCX, BNC, BOBA, BRISE, KRC20, CANTO, CAPS, CCD, CELO, CFX, CHI, CKB, CLORE, CLV, CORE, CSPR, CTXC, DAG, DCR, DERO, DESO, DEFI, DGB, DNX, DOCK, DOGECHAIN, DYDX, DYMENSION, EGLD, ELA, ELF, ENJIN, EOSIO, ERG, ETN_SC, EVMOS, EWC, SGB, FACT, FB, FET, FIO, FIRO, NEO3, FLOW, FLARE, FLUX, LINEA, FREN, FSN, FB_BRC20, GLMR, GRIN, GRS, HACASH, HBAR, HERB, HIVE, MAPO, HMND, HNS, ZKSYNC, HTR, HUAHUA, MERLIN, ICP, ICX, INJ, IOST, IOTA, IOTX, IRIS, IRON, ONE, JOYSTREAM, KAI, KAR, KAS, KAVA, KCN, KDA, KLAY, KLY, KMD, KSM, KUB, KUJIRA, LAT, LBC, LUNC, LUKSO, MARS, METIS, MINA, MANTLE, MOB, MODE, MONA, MOVR, MTL, NEOX, NEXA, NIBI, NIMIQ, NMC, ONOMY, NRG, WAVES, NULS, OAS, OCTA, OLT, ONT, OORT, ORAI, OSMO, P3D, COMPOSABLE, PIVX, RON, POKT, POLYMESH, PRE_MARKET, PYI, QKC, QTUM, QUBIC, RSK, ROSE, ROUTE, RTM, THORCHAIN, RVN, RADIANT, SAGA, SALVIUM, SATOX, SC, SCP, _NULL, SCRT, SDN, RGBPP, SELF, SMH, SPACE, STARGAZE, STC, STEEM, STRATISEVM, STRD, STARKNET, SXP, SYS, TAIKO, TAO, TARA, TENET, THETA, TT, VENOM, VECHAIN, TOMO, VITE, VLX, VSYS, VTC, WAN, WAXP, WEMIX, XCH, XDC, XEC, XELIS, NEM, XHV, XLM, XNA, NANO, XPLA, XPR, XPRT, XRD, XTZ, XVG, XYM, ZANO, ZEC, ZEN, ZEPH, ZETA
480
514
  },
481
515
  },
482
516
  'commonCurrencies': {
@@ -3547,20 +3581,14 @@ class coinex(Exchange, ImplicitAPI):
3547
3581
  """
3548
3582
  await self.load_markets()
3549
3583
  currency = self.currency(code)
3550
- networks = self.safe_dict(currency, 'networks', {})
3551
- network = self.safe_string_2(params, 'network', 'chain')
3552
- params = self.omit(params, 'network')
3553
- networksKeys = list(networks.keys())
3554
- numOfNetworks = len(networksKeys)
3555
- if networks is not None and numOfNetworks > 1:
3556
- if network is None:
3557
- raise ArgumentsRequired(self.id + ' fetchDepositAddress() ' + code + ' requires a network parameter')
3558
- if not (network in networks):
3559
- raise ExchangeError(self.id + ' fetchDepositAddress() ' + network + ' network not supported for ' + code)
3560
3584
  request: dict = {
3561
3585
  'ccy': currency['id'],
3562
- 'chain': network,
3563
3586
  }
3587
+ networkCode = None
3588
+ networkCode, params = self.handle_network_code_and_params(params)
3589
+ if networkCode is None:
3590
+ raise ArgumentsRequired(self.id + ' fetchDepositAddress() requires a "network" parameter')
3591
+ request['chain'] = self.network_code_to_id(networkCode) # required for on-chain, not required for inter-user transfer
3564
3592
  response = await self.v2PrivateGetAssetsDepositAddress(self.extend(request, params))
3565
3593
  #
3566
3594
  # {
@@ -3573,12 +3601,7 @@ class coinex(Exchange, ImplicitAPI):
3573
3601
  # }
3574
3602
  #
3575
3603
  data = self.safe_dict(response, 'data', {})
3576
- depositAddress = self.parse_deposit_address(data, currency)
3577
- options = self.safe_dict(self.options, 'fetchDepositAddress', {})
3578
- fillResponseFromRequest = self.safe_bool(options, 'fillResponseFromRequest', True)
3579
- if fillResponseFromRequest:
3580
- depositAddress['network'] = self.network_id_to_code(network, currency).upper()
3581
- return depositAddress
3604
+ return self.parse_deposit_address(data, currency)
3582
3605
 
3583
3606
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
3584
3607
  #
@@ -4418,8 +4441,6 @@ class coinex(Exchange, ImplicitAPI):
4418
4441
  self.check_address(address)
4419
4442
  await self.load_markets()
4420
4443
  currency = self.currency(code)
4421
- networkCode = self.safe_string_upper_2(params, 'network', 'chain')
4422
- params = self.omit(params, 'network')
4423
4444
  if tag:
4424
4445
  address = address + ':' + tag
4425
4446
  request: dict = {
@@ -4427,6 +4448,8 @@ class coinex(Exchange, ImplicitAPI):
4427
4448
  'to_address': address, # must be authorized, inter-user transfer by a registered mobile phone number or an email address is supported
4428
4449
  'amount': self.number_to_string(amount), # the actual amount without fees, https://www.coinex.com/fees
4429
4450
  }
4451
+ networkCode = None
4452
+ networkCode, params = self.handle_network_code_and_params(params)
4430
4453
  if networkCode is not None:
4431
4454
  request['chain'] = self.network_code_to_id(networkCode) # required for on-chain, not required for inter-user transfer
4432
4455
  response = await self.v2PrivatePostAssetsWithdraw(self.extend(request, params))
@@ -4463,6 +4486,7 @@ class coinex(Exchange, ImplicitAPI):
4463
4486
  statuses: dict = {
4464
4487
  'audit': 'pending',
4465
4488
  'pass': 'pending',
4489
+ 'audit_required': 'pending',
4466
4490
  'processing': 'pending',
4467
4491
  'confirming': 'pending',
4468
4492
  'not_pass': 'failed',