Get a swap quote
Swap
Get Quote
Get the best swap quote for a token pair
GET
Get a swap quote
Returns the best available quote for swapping tokens between chains. Hypermid compares routes across all available providers and returns the optimal one.Documentation Index
Fetch the complete documentation index at: https://docs.hypermid.io/llms.txt
Use this file to discover all available pages before exploring further.
Source chain ID (e.g.,
1 for Ethereum).Destination chain ID (e.g.,
42161 for Arbitrum).Source token contract address. Use
0x0000000000000000000000000000000000000000 for native tokens on EVM chains.Destination token contract address.
Amount to swap in the smallest unit (e.g., wei for ETH). Must be a string to handle large numbers.
Sender wallet address on the source chain.
Recipient wallet address on the destination chain. Defaults to
fromAddress if not provided.Maximum acceptable slippage as a decimal (e.g.,
0.03 for 3%). Default: 0.03.Comma-separated list of tools to consider (e.g.,
stargate,hop). Default: all available tools.Comma-separated list of tools to exclude (e.g.,
across).Preferred tool to use if available (e.g.,
stargate).PulseChain Swaps
PulseChain (chain ID369) works with the same endpoint — no special configuration. Just set fromChain or toChain to 369.
Some routes return a steps array instead of a single transactionRequest. Check the Execute Swap page for how to handle both.
For examples and a walkthrough, see the PulseChain Swaps guide.
SuperSwap Refunds & Fallback
Quotes for PulseChain destinations can returnprovider: "superswap" in either a direct or multi-step shape. If the DEX leg later fails at execution time, the protocol automatically returns the bridged USDCh to the user’s wallet — the user always ends up with spendable funds on PulseChain, even in the failure case.
See the Safety & Fallback guide for the state machine, all failure modes, and what to display on each terminal state.Authorizations
Partner API key. Optional for public endpoints, required for /v1/partner/*.
Query Parameters
Source chain ID
Source token address (use 'native' or the zero address for native tokens)
Amount in base units (wei, lamports, etc.)
Destination chain ID
Destination token address
Sender wallet address
Recipient wallet address. Omit for a dry (indicative) quote.
Slippage tolerance. Values < 1 are treated as decimal (0.005 = 0.5%), otherwise as basis points. Default: 50 bps (0.5%).
Route ranking preference
Available options:
RECOMMENDED, FASTEST, CHEAPEST