spotMeta - HyperCore Info Endpoint
Get comprehensive spot trading asset metadata including token information, decimal precision, and trading pair details for Hyperliquid's spot markets.
Get metadata for all available spot trading assets on Hyperliquid, including token details, decimal precision, and trading pair information.
Authenticate HyperCore Info requests by sending your Dwellir API key in the x-api-key header to https://api-hyperliquid-mainnet-info.n.dwellir.com/info.
When to Use This Endpoint
The spotMeta endpoint is essential for:
- Spot Trading Interfaces — Display available spot markets with correct token information
- Token Discovery — List all tradeable spot assets
- Decimal Handling — Format token amounts with correct precision
- Token Validation — Verify token addresses and canonical status
Common Use Cases
1. Format Token Amounts
function formatTokenAmount(tokenName, amount, spotMeta) {
const token = spotMeta.tokens.find(t => t.name === tokenName);
if (!token) return amount.toString();
return amount.toFixed(token.szDecimals);
}
// Usage
const spotMeta = await getSpotMeta();
console.log(formatTokenAmount('USDC', 1000.123456, spotMeta)); // "1000.12345600"2. Build Token Selector
async function getTokenList() {
const spotMeta = await getSpotMeta();
return spotMeta.tokens
.filter(t => t.isCanonical)
.map(token => ({
symbol: token.name,
fullName: token.fullName,
tokenId: token.tokenId,
decimals: token.szDecimals
}));
}3. Validate Token
function isValidToken(tokenName, spotMeta) {
return spotMeta.tokens.some(t => t.name === tokenName);
}Best Practices
- Cache spot metadata for extended periods as it changes infrequently
- Use correct decimals when formatting token amounts
- Filter canonical tokens when presenting token lists to users
- Validate tokens before attempting trades
Related Endpoints
- meta — Get perpetual trading pair metadata
- spotClearinghouseState — Get spot account balances
Access Hyperliquid spot market metadata with Dwellir's HyperCore Info Endpoint. Get your API key →