Quote a swap into gas without gas
quote_swapQuote a swap of stablecoins into the chain's gas coin or another stablecoin so a wallet without gas can pay fees again. Creates a free 2-minute quote; nothing moves until signing.
Instructions
Prices swapping a stablecoin into the chain's gas coin (ETH, POL, AVAX, SOL, HYPE) or another stablecoin, for a wallet without gas, so it can pay its own fees again. The result always goes back to the same wallet; use quote_send to pay someone else. Not available on Tron. Creates a free quote, valid for 2 minutes because prices move; nothing moves on chain until the wallet signs it. Returns { summary, transfer } with the transfer id, fees, the expected output and the minimum output (below it the swap reverts and nothing moves). Show the summary to the user and get approval before signing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain key from gasrescue_info, e.g. "base", "arbitrum", "ethereum", "polygon", "avalanche", "bsc", "hyperevm", "robinhood", "solana", "tron". | |
| token | Yes | Stablecoin symbol, e.g. "USDC", "USDC.e", "USDT", "USDT0", "USDG", "USD1" or "FDUSD". gasrescue_info lists what each chain supports. | |
| amount | Yes | Amount of the token, as a decimal string, e.g. "25" or "12.5". Fees come out of it. | |
| sender | Yes | Wallet address: 0x… for EVM chains, base58 for Solana, T… for Tron. | |
| tokenOut | Yes | What to get: the gas coin ("ETH", "POL", "AVAX", "SOL", "HYPE") or another stablecoin. gasrescue_info lists what each chain can buy. |