Skip to main content
GET
Preview a swap

Authorizations

Authorization
string
header
required

OAuth 2.0 authorization and token endpoints

Query Parameters

contract_address
string
required

The swap contract address

Example:

"0x742d35cc6634c0532925a3b844bc9e7595f0beb1"

chain
string
required

The EVM chain to read from, e.g. ethereum_mainnet, ethereum_sepolia, base_mainnet or base_sepolia

Example:

"ethereum_sepolia"

input_token
string
required

The input token contract address

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

amount
string
required

Amount of the input token to swap, as a uint256 decimal string in the input token's smallest unit

Example:

"1000000"

Response

Successful response.

Quote for swapping an amount of an input token on a swap contract.

fee
string
required

Fee charged on the swap, as a uint256 decimal string in the input token's smallest unit

Example:

"1000"

object
enum<string>
required

String representing the object's type. Objects of the same type share the same value.

Available options:
swap_preview
pay_input_amount
string
required

Amount of the input token to pay, as a uint256 decimal string in the input token's smallest unit

Example:

"1000000"

receive_output_amount
string
required

Amount of the output token to receive, as a uint256 decimal string in the output token's smallest unit

Example:

"999000"