POST
/
price

Body

application/json
amount
string
required

Amount to swap as the base amount (can be switched to exact input/output using the dedicated flag), denoted in the smallest unit of the specified currency (e.g., wei for ETH)

destinationChainId
number
required
destinationCurrency
string
required
originChainId
number
required
originCurrency
string
required
tradeType
enum<string>
required

Whether to use the amount as the output or the input for the basis of the swap

Available options:
EXACT_INPUT,
EXACT_OUTPUT,
EXPECTED_OUTPUT
user
string
required

Address that is depositing funds on the origin chain and submitting transactions or signatures

appFees
object[]
recipient
string

Address that is receiving the funds on the destination chain, if not specified then this will default to the user address

referrer
string
refundOnOrigin
boolean

Always refund on the origin chain in case of any issues

refundTo
string

Address to send the refund to in the case of failure, if not specified then the recipient address or user address is used

slippageTolerance
string

Slippage tolerance for the swap, if not specified then the slippage tolerance is automatically calculated to avoid front-running. This value is in basis points (1/100th of a percent), e.g. 50 for 0.5% slippage

txs
object[]
useDepositAddress
boolean

Enable this to use a deposit address when bridging, in scenarios where calldata cannot be sent alongside the transaction. only works on native currency bridges.

useExternalLiquidity
boolean

Enable this to use canonical+ bridging, trading speed for more liquidity

usePermit
boolean

Enable this to use permit (eip3009) when bridging, only works on supported currency such as usdc

useReceiver
boolean
default:
true

Enable this to route payments via a receiver contract. This contract will emit an event when receiving payments before forwarding to the solver. This is needed when depositing from a smart contract as the payment will be an internal transaction and detecting such a transaction requires obtaining the transaction traces.

Response

200 - application/json
details
object

A summary of the swap and what the user should expect to happen given an input

fees
object