MCPcopy Create free account
hub / github.com/ccxt/ccxt / network_code_to_id

Method network_code_to_id

python/ccxt/htx.py:3360–3374  ·  view source on GitHub ↗
(self, networkCode: str, currencyCode: Str = None)

Source from the content-addressed store, hash-verified

3358 return super(htx, self).network_id_to_code(networkTitle, currencyCode)
3359
3360 def network_code_to_id(self, networkCode: str, currencyCode: Str = None):
3361 if networkCode is None:
3362 return None
3363 if currencyCode is None:
3364 return super(htx, self).network_code_to_id(networkCode)
3365 keys = list(self.options['networkChainIdsByNames'].keys())
3366 keysLength = len(keys)
3367 if keysLength == 0:
3368 raise ExchangeError(self.id + ' networkCodeToId() - markets need to be loaded at first')
3369 uniqueNetworkIds = self.safe_value(self.options['networkChainIdsByNames'], currencyCode, {})
3370 if networkCode in uniqueNetworkIds:
3371 return uniqueNetworkIds[networkCode]
3372 else:
3373 networkTitle = super(htx, self).network_code_to_id(networkCode, currencyCode)
3374 return self.safe_value(uniqueNetworkIds, networkTitle, networkTitle)
3375
3376 def fetch_balance(self, params={}) -> Balances:
3377 """

Callers 15

withdrawMethod · 0.95
parse_currencyMethod · 0.45
fetch_deposit_addressMethod · 0.45
withdrawMethod · 0.45
withdrawMethod · 0.45
fetch_deposit_addressMethod · 0.45
withdrawMethod · 0.45
fetch_transaction_feeMethod · 0.45
fetch_deposit_addressMethod · 0.45

Calls 2

ExchangeErrorClass · 0.90
safe_valueMethod · 0.80

Tested by

no test coverage detected