Get a quote
get_quoteThe best price for a token swap on one network, or a transfer to another network (bridge), and the transaction that makes it, through our contract. Returns toAmount, toAmountMin (enforced on-chain), the fees, approvalAddress (approve it for exactly fromAmount first unless fromToken is the coin) and transactionRequest for the user to sign. Needs an API key.
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": {
"fromChainId": "<fromChainId>",
"fromToken": "<fromToken>",
"toToken": "<toToken>",
"fromAmount": "<fromAmount>",
"fromAddress": "<fromAddress>"
},
"name": "get_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toToken | Yes | Token bought | |
| fromToken | Yes | Token sold; the coin is 0x0000000000000000000000000000000000000000 | |
| toAddress | No | Where the tokens go; defaults to fromAddress | |
| toChainId | No | Where the recipient receives: fromChainId for a swap (the default), or another of the router's networks to bridge there (toToken an asset the bridge carries, like USDC or ETH; any fromToken is swapped first when needed) | |
| fromAmount | Yes | Amount sold, an integer string in the token's smallest unit | |
| fromAddress | Yes | The wallet that pays and signs | |
| fromChainId | Yes | Network chain id, e.g. 8453 for Base (see get_networks) | |
| slippageBps | No | Max price move in basis points, 1 to 5000 (default 50) | |
| integratorBps | No | Your own fee in basis points, up to your key's limit |