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 (2s) and IP rate-limited (120/min). API key holders get fresh data and 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 — Token symbol (SOL, BTC, JUP) or mint address

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"
}

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

Token aliases: BTC → WBTC, ETH → WETH, DOGE → wDOGE, SHIB → wSHIB, NEAR → wNEAR

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

Batch price for multiple tokens in one request.

Query parameters:

  • tokens — Comma-separated token symbols or mint addresses (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
}

Tokens without active pools return { "status": "unavailable" } instead of being omitted.

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 API key | Unlimited | Fresh (no cache) |