Skip to content

Prices

Real-time DEX token prices derived from on-chain pool state. Zero RPC — pure in-memory math.

Free, no auth required. Anonymous requests are cached briefly. Free, Starter, and Pro API keys bypass the anonymous cache and get higher limits.

Pricing Strategy

Prices are computed using a two-strategy approach:

  1. Direct: Token has USDC or USDT pools → price computed directly from pool state
  2. Multi-hop: Token has no stablecoin pools → price derived via an intermediate token (e.g. BTC/SOL × SOL/USDC). The best intermediate is selected automatically, preferring SOL for liquidity.

The route field in the response tells you which strategy was used.

GET /v1/price/:token

Get the current DEX price for a single token.

Parameters:

  • :token — Tracked token symbol (SOL, WBTC, JUP)

Response (success):

json
{
  "token": "SOL",
  "priceUsd": 80.31,
  "bestBid": 80.07,
  "bestAsk": 80.54,
  "bestBidPool": "BmXVhzBHTawt5stWKBtFdjM8n33G5RoUDECE5FrRvayq",
  "bestAskPool": "AhhoxZDmsg2snm85vPjqzYzEYESoKfb4KmTj4HrBBNwY",
  "bestBidDex": "orca-whirlpool",
  "bestAskDex": "orca-whirlpool",
  "bestBidFeeBps": 1,
  "bestAskFeeBps": 1,
  "poolCacheAgeMs": 150,
  "confidence": "confirmed",
  "poolCount": 31,
  "timestamp": 1712000000000,
  "route": "direct",
  "change24h": -1.42
}

Response (multi-hop):

json
{
  "token": "TRUMP",
  "priceUsd": 2.83,
  "bestBid": 2.82,
  "bestAsk": 2.84,
  "bestBidPool": "...",
  "bestAskPool": "...",
  "bestBidDex": "raydium-clmm",
  "bestAskDex": "raydium-clmm",
  "bestBidFeeBps": 10,
  "bestAskFeeBps": 10,
  "poolCacheAgeMs": 55000,
  "poolCount": 1,
  "timestamp": 1712000000000,
  "route": "TRUMP/SOL × SOL/USDC"
}

Response (unavailable — 404):

json
{
  "token": "UNKNOWN",
  "status": "unavailable",
  "reason": "No active pools found for this token"
}

Fields:

FieldDescription
priceUsdMid-market price (average of bestBid and bestAsk)
bestBidBest price to sell token → stablecoin (after pool fees)
bestAskBest price to buy token with stablecoin (after pool fees)
bestBidFeeBpsFee (basis points) of the pool providing the best bid
bestAskFeeBpsFee (basis points) of the pool providing the best ask
poolCacheAgeMsAge of freshest pool data used. -1 = no recent updates.
confidence"confirmed" (verified on-chain state) or "optimistic" (predicted state, ~200ms fresher than confirmed)
optimisticAgeMsOnly present when confidence === "optimistic". Milliseconds since the prediction was applied. Optimistic prices are typically confirmed within 400ms.
poolCountNumber of valid pools checked (outliers excluded)
route"direct" or "TOKEN/X × X/USDC" — how the price was derived
change24h24h price change in percent (e.g. -2.34 = down 2.34 %). Sourced from DefiLlama, refreshed every few minutes server-side. Omitted when DefiLlama has no data for the symbol yet (e.g. very new listings).

GET /v1/prices?tokens=SOL,BTC,ETH

Batch price for multiple tokens in one request.

Query parameters:

  • tokens — Comma-separated tracked token symbols (max 50)

Response:

json
{
  "prices": {
    "SOL": {
      "token": "SOL",
      "priceUsd": 80.31,
      "bestBid": 80.07,
      "bestAsk": 80.54,
      "poolCacheAgeMs": 150,
      "poolCount": 31,
      "route": "direct",
      ...
    },
    "BTC": {
      "token": "BTC",
      "priceUsd": 66854.19,
      "poolCacheAgeMs": 24000,
      "poolCount": 1,
      "route": "direct",
      ...
    },
    "WIF": {
      "status": "unavailable",
      "reason": "No active pools found"
    }
  },
  "timestamp": 1712000000000
}

Tracked tokens without active pools return { "status": "unavailable" } instead of being omitted. Unknown symbols are ignored.

Notes

  • Unlike pool, pair, quote, and swap endpoints, the prices endpoints currently resolve tracked symbols only, not arbitrary mint addresses.
  • Free, Starter, and Pro API keys bypass the anonymous cache on this endpoint.

Rate Limits

See Plans & Rate Limits for full tier details.

Anonymous: 30/min (cached 2s). Free: 60/min. Starter: 300/min. Pro: 1000/min. Internal: unlimited (fresh, no cache).