Challenges
Accurately pricing tokens on-chain is deceptively complex. Unlike traditional markets with centralized pricing mechanisms and consistent liquidity, decentralized finance (DeFi) presents a set of dynamic and often adversarial conditions. The Price API V3 is built with these realities in mind, abstracting away challenges to deliver accurate, real-time token prices with integrity and consistency.| Challenge | Description |
|---|---|
| Gamification of Price | In decentralized environments, token prices can be manipulated or “gamed” for appearances or exploitative purposes. Common patterns include: * Wash trading to inflate volume or imply activity * Circular swaps to fabricate higher valuations |
| Fragmented, Volatile or Imbalanced Liquidity Across Venues | Liquidity on Solana (and other chains) is spread across numerous protocols and AMMs. No single source can represent the entire market. Different pools might have wildly different pricing and can change very quickly. |
| Low Liquidity Tokens | Some tokens trade rarely or only within shallow pools. In such cases, even small orders can cause large price swings, making pricing unreliable. |
How Price is Derived
Price API V3 prices tokens by using the last swapped price (across all transactions). The swaps are priced by working outwards from a small set of reliable tokens (like SOL) whose price we get from external oracle sources. While and also after deriving the last swap price, we also utilize a number of heuristics to ensure the accuracy of the price and eliminate any outliers:- Asset origin and launch method
- Market liquidity metrics
- Market behaviour patterns
- Holder distribution statistics
- Trading activity indicators
- Organic Score
Get Price
Simply request via the base URL with the query parameters of your desired mint addresses. You can also comma-separate them to request for multiple prices.Price Response
Here is the sample response, notice a few details here:- The
usdPriceis the only price. - The
decimalsresponse is helpful to display price information on the UI. - The
blockIdcan be used to verify the recency of the price. - The
priceChange24his the 24-hour price change as a percentage (e.g.1.29means +1.29%,-3.47means -3.47%), not a 0-1 fraction.
Limitations
Query limits- You can query up to 50
idsat once.
null value, and there is no error or per-mint reason. To find which of your requested mints were dropped, compare your requested ids against the keys that were returned:
- It has not been traded recently, in the last 7 days.
- The aforementioned heuristics flag the price as unreliable, where certain combinations of factors indicate potential issues with price reliability or market health.
audit.isSus field in the Tokens API V2. Note that audit.isSus is only present when a token has been flagged suspicious, so its absence is not a guarantee of safety. Most tokens omitted from the price response are simply untraded or illiquid rather than flagged.
V3 simplifies pricing
- V3 returns a single accurate price per token, eliminating ambiguity from V2’s multiple price fields that led to inconsistent interpretations across platforms.
- Price accuracy is maintained through heuristics that eliminate outliers, providing one stable price source.
- If you need the additional data that V2 provided, use the
/quoteendpoint of the Swap API to derive equivalent values (see how Price API V2 pricing was derived).
