sodax_get_solver_quote
Get a swap quote from the SODAX solver on Sonic chain. Provide source and destination token addresses and amount to receive a quoted amount for exact input or exact output.
Instructions
Get a swap quote from the SODAX solver. tokenSrc/tokenDst MUST be hub-chain (Sonic, chainId 146) asset addresses — look them up with sodax_get_solver_oracle (chainId='146'). Working example: tokenSrc='0xeb0393893b5bf98a50073d6740738b08e575058b' (BTC_BTC_ASSET) → tokenDst='0xaeafa26e43f46cd83efe89b1e57c858eb5685a24' (ETH_ASSET), amount='99800', quoteType='exact_input' returns a quoted_amount. exact_input quotes the destination amount you'd receive; exact_output quotes the source amount you'd need. There are two distinct HTTP-400 failures, both naming the two addresses: (1) 'not compatible with the quote service' = an address isn't a recognized hub asset (a spoke-chain or otherwise non-chainId-146 address was passed) → use a chainId-146 address from sodax_get_solver_oracle, and for a reliable pick prefer a canonical bridged *_ASSET hub token or major stablecoin (chainId 146 alone doesn't guarantee a route). (2) 'No path was found between X and Y' = both tokens are valid hub assets but the solver couldn't route this pair for this amount → routing is pair/amount/liquidity-dependent, so retry with a smaller amount or a more liquid counterparty (a canonical bridged *_ASSET token, or a major stablecoin like SONIC_USDC_ASSET). Many wrapped/derivative entries (e.g. WBTC, waLocBTC, SONIC_SODA_ASSET) are oracle-priced but frequently have no route — prefer canonical bridged *_ASSET hub tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | REQUIRED: Amount in the smallest unit of the input token (for exact_input) or output token (for exact_output). String to preserve precision. Note: a very large amount can exceed available liquidity and return 'No path was found' even for an otherwise-valid pair — reduce it if that happens. | |
| format | No | Response format: 'json' for raw data or 'markdown' for formatted text | markdown |
| tokenDst | Yes | REQUIRED: Destination token address (the token you want to receive). Hub-chain (Sonic, chainId 146) asset address from sodax_get_solver_oracle (e.g. ETH_ASSET 0xaeafa26e43f46cd83efe89b1e57c858eb5685a24). Prefer canonical bridged *_ASSET tokens or a major stablecoin for a routable pair. | |
| tokenSrc | Yes | REQUIRED: Source token address (the token you're spending). Hub-chain (Sonic, chainId 146) asset address from sodax_get_solver_oracle. Prefer canonical bridged *_ASSET tokens (e.g. BTC_BTC_ASSET 0xeb0393893b5bf98a50073d6740738b08e575058b); wrapped/derivative entries like WBTC are priced but frequently have no route. | |
| quoteType | No | 'exact_input' (default): given input amount, quote output amount. 'exact_output': given output amount, quote input amount required. | exact_input |