get_exchange_rate
Retrieve the exchange rate between two tokens, showing how much of the destination token you receive for 1 unit of the source token.
Instructions
Get the exchange rate between two tokens. Returns the rate for swapping 1 unit of from_token to to_token.
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": {
"from_token": "<from_token>",
"to_token": "<to_token>"
},
"name": "get_exchange_rate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_token | Yes | Destination token address | |
| from_token | Yes | Source token address | |
| to_decimals | No | Decimals of destination token (default: 18) | |
| from_decimals | No | Decimals of source token (default: 18) |