Skip to content

API ReferenceTokens and balancesFunction

getTokenMetadata()

function getTokenMetadata(params, options?): Promise<TokenMetadata | undefined>;

Fetches the token metadata (logo URL) for the specified token address. Returns undefined when the asset repo has no logo at the resolved path (either the alias map’s mainnet address has no entry, or the original address has no entry and no alias applies).

The HEAD probe carries an abort signal: it is cancelled when the caller cancels, and otherwise when the SDK’s per-request bound elapses, so this never becomes an unbounded fetch. A caller-cancelled probe rethrows the caller’s abort reason rather than reporting “no logo”; every other failed probe, the per-request bound elapsing included, is still reported as no logo.

Parameters

ParameterTypeDescription
paramsGetTokenMetadataParamsThe parameters identifying the token.
optionsReadExecutionOptionsCancellation controls kept separate from request parameters.

Returns

Promise<TokenMetadata | undefined>

The token metadata, or undefined if not found.