Quote a trade
quoteExact quote from the contract's own math: the amount out, price, fees per hop and price impact. Give amount (what is sold) or buy_amount (what should come out; the quote finds the input). Pass account to check its balances, trustlines and whether the trade would push it over the Event Horizon.
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": {
"sell": "<sell>",
"buy": "<buy>"
},
"name": "quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | HITZ, XLM, USDC (any case), or a token contract address (C…). | |
| sell | Yes | HITZ, XLM, USDC (any case), or a token contract address (C…). | |
| amount | No | Amount of sell to trade, e.g. "100". | |
| account | No | Optional: the account that would trade. | |
| buy_amount | No | Instead of amount: how much of buy to receive. |