Get Best Route
Find the most optimal route for swapping tokens across chains. This API determines the best path based on source/destination tokens, chains, amount, and user wallet addresses. Check out the getBestRoute API template script for implementation details.
Authorization
x-authorization-secret<token>Trade Service Secret (set this to the value of TRADE_SERVICE_SECRET from .env)
In: header
Request Body
application/jsonRequiredrouteIdstringfromTokenRequiredstringfromChainRequiredstringtoTokenRequiredstringtoChainRequiredstringsameChainFeestringsameChainFeeCollectorstringcrossChainFeestringcrossChainFeeCollectorstringfromAmountRequiredstringslippagestringpermitDeadlinestringfromUserWalletAddressRequiredstringtoUserWalletAddressRequiredstringFetched