Quote swap
quote_swapUse for a DEX swap quote with a ready unsigned transaction: best route from Velora (ParaSwap), KyberSwap as fallback, on Base, Arbitrum, Ethereum, Optimism, Polygon, BNB Chain. Returns the paid x402 request for your input (GET /quote/swap, $0.002 per call; schema linked). Call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. Quote only: nothing is signed or sent, and the reply discloses P0's integrator fee. To check balances first use wallet_balance. First call each day returns the data itself, free; later calls return the paid request.
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": {
"chain": "<chain>",
"from": "<from>",
"to": "<to>",
"amount": "<amount>",
"taker": "<taker>"
},
"name": "quote_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | token to buy: symbol or 0x address | |
| from | Yes | token to sell: symbol (USDC, WETH, ETH...) or 0x address | |
| chain | Yes | base, arbitrum, ethereum, optimism, polygon or bsc (or chain id) | |
| taker | Yes | Wallet that will sign and send; the returned calldata and approval are built for it | |
| amount | Yes | Integer string, amount to sell in base units (10 USDC = 10000000) | |
| to_decimals | No | Decimals of the buy token; needed only when it is an address P0 does not know | |
| slippage_bps | No | max slippage in basis points (50 = 0.5%). The alias 'slippage' is read as basis points too (Velora's unit); a 'slippage' below 10 is refused as ambiguous | |
| from_decimals | No | Decimals of the sell token; needed only when it is an address P0 does not know |