Hedera: hederaTokensSwapQuote
hederaTokensSwapQuoteFetch real-time USD price and swap quote for Hedera tokens. Choose exact input or output mode for precise swaps.
Instructions
Get current USD price and swap quote for Hedera tokens. ALWAYS fetch fresh - crypto prices change every second. Supports exact input (spend X) and exact output (receive Y) modes.
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": {
"fromTokenId": "<fromTokenId>",
"toTokenId": "<toTokenId>",
"fromTokenDecimals": "<fromTokenDecimals>",
"toTokenDecimals": "<toTokenDecimals>"
},
"name": "hederaTokensSwapQuote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromTokenId | Yes | Token to swap from (0.0.000000 for HBAR) | |
| toTokenId | Yes | Token to swap to | |
| fromTokenDecimals | Yes | Decimals of from token | |
| toTokenDecimals | Yes | Decimals of to token | |
| amount | No | Amount to swap (for exact input mode) | |
| exactOutputAmount | No | Exact output amount (for exact output mode) | |
| isExactOutput | No | True for exact output mode |