Skip to main content

TL;DR

Jupiter’s Price API is the standard way to get token prices on Solana. One API call returns real-time USD prices for up to 50 tokens. The same pricing data powers jup.ag and is used by Phantom, Solflare, and most Solana apps. Base URL: https://api.jup.ag

Prerequisites

  1. Get an API key at portal.jup.ag
  2. All requests require the x-api-key header

Quick start

curl -X GET "https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112" \
  -H "x-api-key: YOUR_API_KEY"
Response:
{
  "So11111111111111111111111111111111111111112": {
    "usdPrice": 147.48,
    "decimals": 9,
    "priceChange24h": 1.29
  }
}

When you need this

You’re building something that needs Solana token prices:
  • Wallet — Show portfolio value in USD
  • Trading interface — Display current token prices
  • DeFi app — Calculate swap values, collateral ratios
  • Trading bot — Price-based execution logic
  • Analytics — Track token performance
Common searches that lead here:
  • “solana token price api”
  • “get sol price usd”
  • “crypto price api solana”
  • “jupiter price feed”

Why Jupiter

Getting accurate on-chain prices is hard:
  • Liquidity fragmented across 20+ DEXs
  • Low-liquidity tokens have unreliable prices
  • Wash trading and price manipulation are common
Jupiter solves this by:
  • Aggregating swap data across all Solana DEXs
  • Using heuristics to filter manipulated prices
  • Validating against organic trading activity
  • Providing the same prices used on jup.ag
Jupiter Price API is the standard pricing source for Solana applications.

API Reference

Base URL: https://api.jup.ag
EndpointDescription
GET /price/v3?ids={mints}Get prices for up to 50 tokens
Parameters:
  • ids (required): Comma-separated mint addresses

Code examples

Get price for a single token

curl -X GET "https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112" \
  -H "x-api-key: YOUR_API_KEY"

Get prices for multiple tokens

curl -X GET "https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112,JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \
  -H "x-api-key: YOUR_API_KEY"

Calculate portfolio value

async function getPortfolioValue(holdings) {
  // holdings = { mint: amount_in_tokens }
  const mints = Object.keys(holdings);

  const response = await fetch(
    `https://api.jup.ag/price/v3?ids=${mints.join(',')}`,
    { headers: { 'x-api-key': 'YOUR_API_KEY' } }
  );
  const prices = await response.json();

  let totalValue = 0;
  for (const [mint, amount] of Object.entries(holdings)) {
    const price = prices[mint]?.usdPrice || 0;
    totalValue += amount * price;
  }

  return totalValue;
}

// Example
const value = await getPortfolioValue({
  'So11111111111111111111111111111111111111112': 10,   // 10 SOL
  'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN': 1000 // 1000 JUP
});
console.log(`Portfolio: $${value.toFixed(2)}`);

Response format

TypeScript types

interface PriceResponse {
  [mintAddress: string]: {
    usdPrice: number;
    decimals: number;
    priceChange24h: number;
    blockId: number;  // Solana block when price was computed
  };
}

Example response

{
  "So11111111111111111111111111111111111111112": {
    "usdPrice": 147.48,
    "blockId": 348004023,
    "decimals": 9,
    "priceChange24h": 1.29
  },
  "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN": {
    "usdPrice": 0.85,
    "blockId": 348004026,
    "decimals": 6,
    "priceChange24h": 2.15
  }
}
Fields:
  • usdPrice — Current price in USD
  • decimals — Token decimals (for display formatting)
  • priceChange24h — 24h price change as percentage
  • blockId — Solana block ID (verify price recency)

Error responses

Token not found or no price available:
{
  "So11111111111111111111111111111111111111112": {
    "usdPrice": 147.48,
    "decimals": 9,
    "priceChange24h": 1.29
  }
  // Unknown token simply missing from response
}
Invalid API key (401):
{
  "error": "Unauthorized"
}
Rate limited (429):
{
  "error": "Rate limit exceeded"
}

How pricing works

  1. Jupiter tracks the last swap price across all Solana transactions
  2. Prices chain outward from trusted tokens (SOL, USDC) with oracle data
  3. Multiple heuristics filter unreliable prices:
    • Asset origin and launch method
    • Market liquidity depth
    • Holder distribution
    • Trading patterns
    • Organic score validation
This prevents manipulated or artificial prices from being returned.

Limitations

LimitValue
Max tokens per request50
Price availabilityTokens traded in last 7 days
Historical pricesNot available (current only)

Common questions

The token is missing from the response when:
  • It hasn’t been traded in 7+ days
  • It fails reliability heuristics (suspicious activity)
  • It’s flagged via organic score validation
Cross-reference with Tokens API audit.isSus field.
Prices update in real-time based on swap activity. The blockId field tells you exactly which Solana block the price was computed from.
No, Price API V3 provides current prices only. For historical data, poll the API and store results yourself.
Price API returns USD only. To get token-pair prices (e.g., JUP/SOL), fetch both USD prices and divide.
const price = prices[mint]?.usdPrice;
if (price === undefined) {
  // Token has no reliable price
  // Show "Price unavailable" or fallback
}

Need token metadata too? Get token names, logos, and verification status with the Token Information API.

Next steps