XY Finance
Search
K
1⃣

Get Quote

This endpoint will return currently available routes with destination token amount for your quote. If there is no available route, it will return an error_code, which you can reference here to get error detail.
get
https://aggregator-api.xy.finance/v1
/quote
Get Quote

Example Request

$ curl https://aggregator-api.xy.finance/v1/quote?srcChainId=10&srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&srcQuoteTokenAmount=1000000000000000000&dstChainId=56&dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&slippage=1
This request is asking a quote of 1 ETH on Optimism to BNB on BNB Chain.
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.
If you would like to know more about "commissionRate" fields and fee collection function, please refer to Monetization / Take Fees
Here you can find our full API reference