Preview a swap
Reads preview(inputToken, amount) on the Superstate swap contract and returns the quote: the input amount to pay, the fee charged on it and the output amount to receive.
Authorizations
OAuth 2.0 authorization and token endpoints
Query Parameters
The swap contract address
"0x742d35cc6634c0532925a3b844bc9e7595f0beb1"
The EVM chain to read from, e.g. ethereum_mainnet, ethereum_sepolia, base_mainnet or base_sepolia
"ethereum_sepolia"
The input token contract address
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Amount of the input token to swap, as a uint256 decimal string in the input token's smallest unit
"1000000"
Response
Successful response.
Quote for swapping an amount of an input token on a swap contract.
Fee charged on the swap, as a uint256 decimal string in the input token's smallest unit
"1000"
String representing the object's type. Objects of the same type share the same value.
swap_preview Amount of the input token to pay, as a uint256 decimal string in the input token's smallest unit
"1000000"
Amount of the output token to receive, as a uint256 decimal string in the output token's smallest unit
"999000"