> ## Documentation Index
> Fetch the complete documentation index at: https://developers.jup.ag/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Price API

> Jupiter's Solana Price API: one GET /price/v3 request returns the current USD price of up to 50 Solana tokens, derived from onchain swaps.

The Price API is Jupiter's REST API for Solana token prices, served at `https://api.jup.ag/price/v3`. It is the price source behind Jupiter's own interfaces, and one request returns the current USD price of up to 50 tokens:

* Prices come from the last onchain swap of each token, anchored on a small set of oracle-priced tokens such as SOL, and pass liquidity, holder and trading-activity heuristics before they are returned.
* Each price carries the Solana `blockId` it was computed at, the token `decimals` and the 24-hour change.
* One API key covers every Jupiter API, and the endpoint answers without a key for testing.

Wallets, trading applications, portfolio trackers and onchain analytics use it to display token values and compute balances in USD.

## Quick start

Get the price of SOL. No API key is needed:

```bash Request theme={null}
curl "https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112"
```

```json Response theme={null}
{
  "So11111111111111111111111111111111111111112": {
    "usdPrice": 117.940701034589,
    "blockId": 454185009,
    "decimals": 9,
    "priceChange24h": -1.281584448758467,
    "liquidity": 981211365.6060404,
    "createdAt": "2024-06-05T08:55:25.527Z"
  }
}
```

```js JavaScript theme={null}
const price = await (
  await fetch(
    'https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112,JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
    {
      headers: {
        'x-api-key': 'your-api-key',
      },
    }
  )
).json();
console.log(JSON.stringify(price, null, 2));
```

Comma-separate up to 50 mint addresses in `ids` to price several tokens in one request. The full walkthrough is in [How to Get Token Prices on Solana](https://developers.jup.ag/docs/guides/how-to-get-token-price.md).

> [!TIP]
>
> Keyless requests are limited to 0.5 requests per second. For production, pass an API key in the `x-api-key` header. See [Rate Limits](https://developers.jup.ag/docs/portal/rate-limits.md).

## Where price data comes from

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 use 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](https://developers.jup.ag/docs/tokens.md#organic-score)

> [!WARNING]
>
> When using the Price API, do note that you may face many tokens where a price is not available.
>
> This is because we use the [heuristics above](#where-price-data-comes-from) to determine the price of a token and whether the price is reliable. If certain combinations of these factors indicate potential issues with price reliability or market health, the token is flagged and not provided a price.
>
> This is to safeguard users and prevent an inaccurate price from being returned.

### Pricing challenges on Solana

Accurately pricing tokens onchain is deceptively complex. Unlike traditional markets with centralised pricing mechanisms and consistent liquidity, decentralised 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 decentralised 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. |

## Price response

Here is the sample response, notice a few details here:

* The `usdPrice` is the only price.
* The `decimals` response is helpful to display price information on the UI.
* The `blockId` can be used to verify the recency of the price.
* The `priceChange24h` is the 24-hour price change as a percentage (e.g. `1.29` means +1.29%, `-3.47` means -3.47%), not a 0-1 fraction.
* The `liquidity` is the total liquidity in USD across all pools, and `createdAt` is when the token was created (a fixed date for tokens that predate the API, like SOL and USDC).

```js theme={null}
{
  "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN": {
    "usdPrice": 0.4056018512541055,
    "blockId": 348004026,
    "decimals": 6,
    "priceChange24h": 0.5292887924920519
  },
  "So11111111111111111111111111111111111111112": {
    "usdPrice": 147.4789340738336,
    "blockId": 348004023,
    "decimals": 9,
    "priceChange24h": 1.2907622140620008
  }
}
```

## Limitations

**Query limits**

* You can query up to 50 `ids` at once.

**If the price of a token cannot be found**

Tokens without a reliable price are **omitted entirely** from the response. The mint has no key in the returned object, rather than a key with a `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:

```js theme={null}
const ids = [
  'So11111111111111111111111111111111111111112',
  'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
];

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

const missing = ids.filter((id) => !(id in price));
```

A token is typically omitted when:

* It has not been traded recently, in the last 7 days.
* The [heuristics](#where-price-data-comes-from) flag the price as unreliable, where certain combinations of factors indicate potential issues with price reliability or market health.

For additional context, you can cross reference a token's `audit.isSus` field in the [Tokens API V2](https://developers.jup.ag/docs/tokens.md). 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](#where-price-data-comes-from) that eliminate outliers, providing one stable price source.
* If you need the additional data that V2 provided, use a quote from the [Swap API](https://developers.jup.ag/docs/swap/order-and-execute.md) (`GET /order` without `taker`) to derive equivalent values ([see how Price API V2 pricing was derived](https://www.jupresear.ch/t/introducing-the-price-v2-api/22175)).

## Common use cases

> [card] [Wallets and portfolio trackers](https://developers.jup.ag/docs/guides/how-to-get-token-price.md)
>
> Price a wallet's holdings in one request of up to 50 mints, and use `decimals` to convert raw balances into USD values.

> [card] [Token pages and analytics](https://developers.jup.ag/docs/tokens.md)
>
> Combine `usdPrice`, `priceChange24h` and `liquidity` with the metadata, holder count and Organic Score from the Token API.

> [card] [Trading applications](https://developers.jup.ag/docs/swap.md)
>
> Show a reference price before a trade, then get the executable quote and transaction from the Swap API.

> [card] [AI agents and scripts](https://developers.jup.ag/docs/ai/cli.md)
>
> Keyless calls for prototyping, the Jupiter CLI for the terminal, and a Markdown version of this page at `.md` for agents.

## FAQ

> [accordion] How does the Solana Price API filter out price manipulation and wash trading?
>
> Every price starts from the last onchain swap, priced outwards from oracle-anchored tokens such as SOL. Before it is returned, the token passes heuristics on asset origin and launch method, market liquidity, market behaviour patterns, holder distribution, trading activity and [Organic Score](https://developers.jup.ag/docs/tokens.md#organic-score). Wash trading and circular swaps show up in those signals. A token whose price looks unreliable is omitted from the response instead of being returned with a manipulated value.

> [accordion] What query parameters does the /price/v3 endpoint accept?
>
> One parameter: `ids`, a comma-separated list of up to 50 token mint addresses. The optional `x-api-key` header raises the rate limit above the keyless 0.5 requests per second. There is no parameter for currency, interval or historical data: the endpoint returns the current USD price only. See the [API reference](https://developers.jup.ag/docs/api-reference/price.md).

> [accordion] How do I get the current SOL price in USD?
>
> `GET https://api.jup.ag/price/v3?ids=So11111111111111111111111111111111111111112`. The response is keyed by mint address and `usdPrice` is the current price in USD; `decimals` (9 for SOL) converts raw lamport balances into SOL. The [Quick start](#quick-start) above shows the full response.

> [accordion] How do I fetch prices for multiple Solana tokens in one request?
>
> Comma-separate the mint addresses in `ids`, up to 50 per request: `?ids=<mint1>,<mint2>,...`. Each priced token comes back as a key of the response object. Tokens without a reliable price are left out, so compare the returned keys with the mints you asked for.

> [accordion] What is the difference between a token price and a swap quote?
>
> A price is a reference value: the USD value of one token derived from its last swap and the reliability heuristics, with no amount attached. A swap quote is executable: `GET /order` on the [Swap API](https://developers.jup.ag/docs/swap/order-and-execute.md) returns the exact output amount for a given input amount, route and moment, including price impact and fees. Use the Price API to display values and the Swap API to trade.

> [accordion] Does the Price API provide historical prices?
>
> No. `/price/v3` returns the current price and the 24-hour change (`priceChange24h`) only. For a price at a past block, record `usdPrice` and `blockId` yourself at the time you need them.

> [accordion] Why is a token missing from the response?
>
> The response contains a key for each mint that has a reliable price, and nothing for the others: no `null`, no error. A token is typically dropped when it has not traded in the last 7 days or when the heuristics flag its price as unreliable. Compare your requested `ids` with the returned keys to find the missing ones, and cross-check `audit.isSus` in the [Token API](https://developers.jup.ag/docs/tokens.md) if you need a reason.

> [accordion] How fresh is a price, and how do I verify it?
>
> A price reflects the last swap of the token, and `blockId` is the Solana block at which it was computed; compare it with the current slot to judge recency. Prices update with swap activity rather than on a fixed interval, and a token that has not traded in 7 days is omitted.

> [accordion] Is priceChange24h a fraction or a percentage?
>
> A percentage. `1.29` means +1.29% over the last 24 hours and `-3.47` means -3.47%. Do not multiply it by 100.

> [accordion] Do I need an API key?
>
> Not to try it: keyless requests work at 0.5 requests per second. For production, pass an API key in the `x-api-key` header; the free plan starts at 1 request per second and paid plans go higher. One key covers every Jupiter API. See [Rate Limits](https://developers.jup.ag/docs/portal/rate-limits.md) and [Plans and Pricing](https://developers.jup.ag/docs/portal/plans.md).

> [accordion] Which tokens does the Price API cover?
>
> Any Solana token that has traded in the last 7 days and passes the reliability heuristics. Tokens are not registered manually: a token gets a price once it trades and its market passes the heuristics. Tokens that fail them are omitted, see [Limitations](#limitations).

> [accordion] What changed from Price API V2?
>
> V3 returns one `usdPrice` per token instead of V2's several price fields, which were interpreted inconsistently across platforms. V2 is no longer maintained. If you relied on V2's derived values, request a quote from the [Swap API](https://developers.jup.ag/docs/swap/order-and-execute.md) (`GET /order` without `taker`) and compute them from the quoted amounts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.