Get Quote
Last updated
Was this helpful?
Last updated
Was this helpful?
This endpoint will return currently available routes with estimated target token amount for your quote. You can also designate specific bridges or aggregator to customize the route. If there is no available route, it will return an error_code, which you can reference to get error detail.
Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
as the address for the native token in your parameter.
If you would like to know more about commissionRate fields and fee collection function, please refer to Monetization / Take Fees
If you would like to know latest supported bridge provider and swap provider, please refer to Supported Blockchains/Bridges/DEXs
This request is asking a quote of 1 ETH on Optimism to ETH on Arbitrum Chain and designate yBridge as bridgeProvider.
IMPORTANT:
Note that the amount parameter should be padded with zeroes. For example, pass
100000000
instead of
100
if the decimals of the token is 6.
The estimatedGas
field in the API response is an estimated value. For now, please use a method similar to RPC, such as , to re-estimate the actual gas limit. You can refer to the following sample code to do that:
Here you can find our full
Source chain ID.
Source chain quote token address.
Source chain quote token amount.
Destination chain ID.
Destination chain quote token address.
Percentage of slippage tolerance.
Affiliate address.
Commission rate of affiliate, denominator is 1000000. Affiliate must be provided when passing commissionRate.
Designated providers for source chain swap. Separate by comma. Will use all available providers if empty.
Designated providers for bridge operation. Separate by comma. Will use all available providers if empty.
Designated providers for destination chain swap. Separate by comma. Will use all available providers if empty.
Successful Response