swap_currency
Swap between Hedera tokens with automatic exchange rate calculation. Specify source and target tokens, amount, and optional memo to execute the swap instantly.
Instructions
Swap between two Hedera tokens. Exchange rate calculated automatically.
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>",
"fromAmount": "<fromAmount>",
"toTokenId": "<toTokenId>"
},
"name": "swap_currency"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | Optional memo for the transaction | |
| toTokenId | Yes | Token ID or symbol to swap TO (e.g. "NGNb" or "0.0.456") | |
| fromAmount | Yes | Amount of source token to swap | |
| fromTokenId | Yes | Token ID or symbol to swap FROM (e.g. "USDb" or "0.0.123") |