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

Method network_id_to_code

python/ccxt/async_support/htx.py:3352–3359  ·  view source on GitHub ↗
(self, networkId: Str = None, currencyCode: Str = None)

Source from the content-addressed store, hash-verified

3350 })
3351
3352 def network_id_to_code(self, networkId: Str = None, currencyCode: Str = None):
3353 # here network-id is provided pair of currency & chain(i.e. trc20usdt)
3354 keys = list(self.options['networkNamesByChainIds'].keys())
3355 keysLength = len(keys)
3356 if keysLength == 0:
3357 raise ExchangeError(self.id + ' networkIdToCode() - markets need to be loaded at first')
3358 networkTitle = self.safe_value(self.options['networkNamesByChainIds'], networkId, networkId)
3359 return super(htx, self).network_id_to_code(networkTitle, currencyCode)
3360
3361 def network_code_to_id(self, networkCode: str, currencyCode: Str = None):
3362 if networkCode is None:

Callers 15

parse_currencyMethod · 0.95
parse_deposit_addressMethod · 0.95
parse_transactionMethod · 0.95
parse_deposit_addressMethod · 0.45
parse_currencyMethod · 0.45
parse_transactionMethod · 0.45
parse_currencyMethod · 0.45
parse_deposit_addressMethod · 0.45
parse_transactionMethod · 0.45

Calls 2

ExchangeErrorClass · 0.90
safe_valueMethod · 0.80

Tested by 2

test_options_networksFunction · 0.36
test_options_networksFunction · 0.36