Get a price estimate
Get a price estimate for a swap between two tokens on an EVM network.
Query Parameters
The network on which to perform the swap.
base
, ethereum
"base"
The 0x-prefixed contract address of the token to receive.
"0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
The 0x-prefixed contract address of the token to send.
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
The amount of the fromToken
to send in atomic units of the token. For example, 1000000000000000000
when sending ETH equates to 1 ETH, 1000000
when sending USDC equates to 1 USDC, etc.
"1000000000000000000"
The 0x-prefixed address that holds the fromToken
balance and has the Permit2
allowance set for the swap.
"0xAc0974bec39a17e36ba4a6b4d238ff944bacb478"
The 0x-prefixed Externally Owned Account (EOA) address that will sign the Permit2
EIP-712 permit message. This is only needed if taker
is a smart contract.
"0x922f49447d8a07e3bd95bd0d56f35241523fbab8"
The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the maxFeePerGas
value. If not provided, the API will use an estimate based on the current network conditions.
"1000000000"
The maximum acceptable slippage of the toToken
in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).
0 <= x <= 10000
100
Response
A price estimate for the swap.
A wrapper for the response of a swap price operation.
A wrapper for the response of a swap price operation.
A wrapper for the response of a swap price operation.