onchain_get_token_usd_price
Get the current USD spot price for one or many tokens. Pass contractAddress as comma-separated for batch. Optionally pin to a specific DEX with exchange (uniswap-v2/v3, sushiswap-v2, pancakeswap-v1/v2, quickswap). Returns usdPrice plus token metadata (name, symbol, decimals, logo) and the source exchange. Use before suggesting trades, computing portfolio USD totals, or quoting a swap to a user.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chainId": "<chainId>",
"contractAddress": "<contractAddress>"
},
"name": "onchain_get_token_usd_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | Chain identifier; comma-separated for cross-chain batch | |
| exchange | No | Pin price to a specific DEX | |
| provider | No | ||
| includeRaw | No | ||
| contractAddress | Yes | Token contract address(es), comma-separated for batch |