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.
Limitations
Query limits- You can query up to 50
idsat once.
- Typically, it is likely that the token has not been traded recently - in the last 7 days.
- Additionally, we also use the aforementioned heuristics to determine the price of a token and if the price is reliable - if certain combinations of these factors indicate potential issues with price reliability or market health, the token will be flagged and not provided a price.
- The token is flagged as suspicious and this can be cross referenced with the Token API V2’s
audit.isSusfield.
- 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).
