EVM swap price preview
swap_evm_pricePAID ($0.002/call). EVM swap price preview: expected and minimum output for a pair/amount before committing to a firm quote — the cheap look-before-you-swap call. Call once WITHOUT x402_payment to receive the x402 payment requirements (an accepts array); pay one of them with any x402 client/wallet, then call again with x402_payment set to the base64 X-PAYMENT payload. You are only charged when a result actually comes back.
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": {
"chainId": "<chainId>",
"sellToken": "<sellToken>",
"buyToken": "<buyToken>",
"sellAmount": "<sellAmount>"
},
"name": "swap_evm_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | EVM chain id (e.g. 8453 = Base) | |
| buyToken | Yes | 'native' or the 0x… address of the token being bought | |
| sellToken | Yes | 'native' or the 0x… address of the token being sold | |
| sellAmount | Yes | integer amount in the sell token's base units | |
| x402_payment | No | base64 X-PAYMENT payload |