Parameters
Returns
TokenMetadata
Token metadata if found, undefined otherwise
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function getTokenBySymbol(symbol, environment): TokenMetadata;
| Parameter | Type | Description |
|---|---|---|
symbol | string | The token symbol (e.g., ‘USDC’) |
environment | "sandbox" | "production" | The environment (‘sandbox’ for devnet, ‘production’ for mainnet) |
TokenMetadata
Token metadata if found, undefined otherwise
const metadata = getTokenBySymbol('USDC', 'production');
console.log(metadata?.mintAddress);
Was this page helpful?