Skip to main content
Version: 2.2

Get Token Price

GEThttps://solana-gateway.moralis.io/token/:network/:address/price

Gets the token price (usd and native) for a given contract address and network. Currently, this API only support fetching token price listed on Raydium DEX.

💡USD Price Decimal

Currently, this API only support at most 4 decimal places results on usdPrice output field. This implies that the smallest unit return will be 0.0001. Any token price below $0.0001 on Raydium will be rounded down and presented at 0.

PATH PARAMS
networkstringrequired
The network to query
addressstringrequired
The address of the token contract
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = Moralis.SolApi.token.getTokenPrice({
"network": "mainnet",
"address": "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"nativePrice": {
"value": "",
"decimals": "",
"name": "",
"symbol": ""
},
"usdPrice": "",
"exchangeAddress": "",
"exchangeName": ""
}