Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Get Multiple Token Prices on Solana Mainnet Only

POSThttps://solana-gateway.moralis.io/token/mainnet/prices

Returns price information for multiple Solana tokens in a single request

BODY PARAM
addressesarrayrequired
Array of token addresses to fetch prices for
addresses[0]
string
addresses[1]
string
Responses
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
"addresses": [
"6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux"
]
})
};

fetch('https://solana-gateway.moralis.io/token/mainnet/prices', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
[
{
"tokenAddress": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"pairAddress": "71HuFmuYAFEFUna2x2R4HJjrFNQHGuagW3gUMFToL9tk",
"exchangeName": "Meteora DLMM",
"exchangeAddress": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo",
"nativePrice": {
"value": "90899405",
"symbol": "WSOL",
"name": "Wrapped Solana",
"decimals": 9
},
"usdPrice": 13.403560961,
"usdPrice24h": 12.405562499,
"usdPrice24hrUsdChange": 0.9959895529999994,
"usdPrice24hrPercentChange": 8.028572288280238,
"logo": "https://d23exngyjlavgo.cloudfront.net/solana_6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"name": "OFFICIAL TRUMP",
"symbol": "TRUMP"
}
]