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

Method networkIdToCode

ts/src/htx.ts:3473–3482  ·  view source on GitHub ↗
(networkId: Str = undefined, currencyCode: Str = undefined)

Source from the content-addressed store, hash-verified

3471 }
3472
3473 networkIdToCode (networkId: Str = undefined, currencyCode: Str = undefined) {
3474 // here network-id is provided as a pair of currency & chain (i.e. trc20usdt)
3475 const keys = Object.keys (this.options['networkNamesByChainIds']);
3476 const keysLength = keys.length;
3477 if (keysLength === 0) {
3478 throw new ExchangeError (this.id + ' networkIdToCode() - markets need to be loaded at first');
3479 }
3480 const networkTitle = this.safeValue (this.options['networkNamesByChainIds'], networkId, networkId);
3481 return super.networkIdToCode (networkTitle, currencyCode);
3482 }
3483
3484 networkCodeToId (networkCode: string, currencyCode: Str = undefined) { // here network-id is provided as a pair of currency & chain (i.e. trc20usdt)
3485 if (networkCode === undefined) {

Callers 15

parseCurrencyMethod · 0.95
parseDepositAddressMethod · 0.95
parseTransactionMethod · 0.95
parseCurrencyMethod · 0.45
parseCurrencyMethod · 0.45
parseCurrencyMethod · 0.45
parseCurrencyMethod · 0.45
parseTransactionMethod · 0.45

Calls 1

safeValueMethod · 0.45

Tested by

no test coverage detected