get https://api.jup.ag/price/v1
Get simple price for a given input mint, output mint and amount
Retrieve simple price for any token pair
Price API v1 Deprecation Notice
Price API v1 will be deprecated on November 30, 2024.
Please migrate to Price V2 to ensure uninterrupted service.
- More Info on Price V2: here
- Get unit buy price for the token specified with the
ids
parameter. - The price is based on the best pricing data available across all DEXes queried.
vsToken
is defaulted to USDC when left emptied.
Parameters:
ids (required, string)
: Supports symbol or address of a token. You can also pass in an array of ids with,
as separator.- Address are case-sensitive
mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So
mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So,So11111111111111111111111111111111111111112
- Address are case-sensitive
vsToken (string)
: Support symbol or address of a token.- Defaults to
USDC
- Symbol are case-sensitive
SOL
,BTC
,mSOL
- Address is case-sensitive
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
- Defaults to
Typings of response data
Field Attribute | Type | Description |
---|---|---|
id | string | Address of the token |
mintSymbol | string | Symbol of the token |
vsToken | string | Address of the VS token |
vsTokenSymbol | string | Symbol of the VS token |
price | number | Default to 1 unit of the token worth in USDC if vsToken is not specified |
timeTaken | number | API internal compute response time |
Example Response
# Unit price of 1 SOL based on the buy amount of USDC
https://api.jup.ag/price/v1?ids=SOL
{
"data": {
"SOL": {
"id": "So11111111111111111111111111111111111111112",
"mintSymbol": "SOL",
"vsToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"vsTokenSymbol": "USDC",
"price": 30.389174403
}
},
"timeTaken": 0.0003002400007972028
}
Rate Limits: This endpoint is rate limited to 600 requests/min.
HTTP Status Code
Code | Error Message |
---|---|
400 |
|
404 | Symbol or address not found for either input or vsToken |
409 | Duplicate symbol found for input or vsToken . The server will respond an error structure which contains the conflict addresses. User will have to use address mode instead. { "error": "Duplicated symbol found for PERP, use one of the address instead", "addresses" ["D68NB5JkzvyNCZAvi6EGtEcGvSoRNPanU9heYTAUFFRa", "9BsnSWDPfbusseZfnXyZ3un14CyPMZYvsKjWY3Y8Gbqn", "EBQ6gWBQNxA2zB4twR5GWP6CkeAhqZZZeDgeP7BTtdM3"]} |