fx_convert
Convert an amount between two currencies at the reference rate. Costs $0.002 USDC per call, paid via x402 on Base.
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": "<from>",
"to": "<to>"
},
"name": "fx_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target currency, ISO 4217 code, e.g. IDR | |
| from | Yes | Source currency, ISO 4217 code, e.g. USD | |
| amount | No | Amount to convert; must be > 0 and <= 1e12 (default 1) |