How to get a Solana token price from an API
Look the token up by its mint address, not its symbol: DexScreener (/tokens/v1/solana/<mint>) and GeckoTerminal (/networks/solana/tokens/<mint>) both return a USD price for free. Symbols on Solana aren't unique, so a search for a popular name often returns copycats. Our Crypto Token Report API takes a name or mint, returns price, liquidity and pairs, and flags look-alike tokens for $0.01.
Try it free Crypto Token Report API — price, liquidity, volume, top pairs · $0.01 / call
Why the mint address matters
Anyone can create a Solana token called USDC or BONK in a minute. The mint address is the only real identity. Wrapped SOL is So11111111111111111111111111111111111111112 and Circle's USDC is EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.
If your app takes a symbol from a user, resolve it to a mint once, show the user which one you picked, and store the mint.
Two free endpoints that take a mint
DexScreener returns a list of pairs, each with its own priceUsd and liquidity. Use the price from the most liquid pair; thin pools can show odd prices.
# DexScreener: all pairs for the token on Solana
curl "https://api.dexscreener.com/tokens/v1/solana/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
# GeckoTerminal: token data including a USD price
curl "https://api.geckoterminal.com/api/v2/networks/solana/tokens/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Other Solana price sources
| Source | What it's good at | Keep in mind |
|---|---|---|
| Jupiter price API | Prices from Solana's main swap aggregator | Endpoint versions change; check their docs |
| Birdeye | Solana-focused token data and history | Needs an API key; paid plans for heavy use |
| DexScreener / GeckoTerminal | Free, many chains, pair-level data | Rate-limited; you judge the pairs yourself |
| Token Report API (iamai.markets) | Name or mint in, checked summary out | $0.01 per call, USDC on Base to pay |
Get a checked report in one call
Pass the chain so the search stays on Solana. The answer includes the top 5 pairs, the oldest pair date (a brand-new token is a different risk from one trading for years) and warnings about look-alike tokens.
const r = await payFetch("https://iamai.markets/api/x402/services/09RTVgqPZqKj", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", chain: "solana" }),
});
const { result } = await r.json();
console.log(result.price_usd);
// payFetch: the fetch from your x402 v2 client. It pays $0.01 in USDC on Base.
Limits to know
- Current data only: no candles or price history.
- The data comes from DexScreener, with GeckoTerminal as backup. If the source refuses the request, the call fails and you aren't charged.
- Payment is on Base, not Solana. You need USDC on Base, even for Solana tokens.
- Market data only, not financial advice.
The product
Questions
Can I get the price from the Solana RPC directly?
Not as a USD price. The RPC gives balances and accounts; a price comes from pool reserves or an aggregator, which is what the APIs above do for you.
Why do two APIs show slightly different prices?
They read different pools or update at different moments. Small, thin tokens can differ a lot; liquidity tells you how much to trust a number.
Does it work for pump.fun tokens?
If the token has a DEX pair that DexScreener or GeckoTerminal lists, yes. A token with no pair yet has no market price to report.
Related
Updated 2026-12-01
