/price REST API Endpoint
Please note that this method is only available for paid subscribers of Metis - Jupiter V6 Swap API.
Solana Web3.js 2.0 includes the ability to customize RPC methods and transports, allowing you to seamlessly integrate QuickNode Marketplace add-ons into your applications. For more information on how to use QuickNode Marketplace add-ons with Solana Web3.js 2.0, check out these guides: How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 1) and How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 2)
Query Parameters
ids
string
REQUIRED
Supports symbol or address of a token. You can also pass in an array of ids with a comma as a separator. Address and symbol modes both are case-sensitive
vsToken
string
The token to compare price versus (supports symbol or address of a token). The default value is set to USDC
useQNMarketCache
boolean
When set to true, the response includes your added pools/markets
restrictIntermediateTokens
boolean
Default is false. Restrict intermediate tokens to a top token set that has stable liquidity. This will help improve latency on /price requests.
Returns
data
object
The data object which contains the following fields:
token
object
The token object which contains the following fields:
id
string
The address of a token
mintSymbol
string
The symbol of id token
vsToken
string
The address of vs token
vsTokenSymbol
string
The symbol of vs token
price
number
The price of the token.
timeTaken
number
The API internal compute response time
Request
1curl --location 'https://docs-demo.solana-mainnet.quiknode.pro/price?ids=SOL'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free