Request Quote
Path parameters
chainIdintegerRequiredExample:
Example: 42161
42161protocolIdstringRequiredExample:
Example: uniswap-v3
uniswap-v3logicIdstringRequiredExample:
Example: swap-token
swap-tokenBody
slippageintegerOptionalExample:
100Responses
200
OK
application/json
tradeTypestringOptionalExample:
exactInpathstringOptionalExample:
0xaf88d065e77c8cc2239327c5edb3a432268e5831000064fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9000bb882af49447d8a07e3bd95bd0d56f35241523fbab1slippageintegerOptionalExample:
100post
/v1/protocols/{chainId}/{protocolId}/{logicId}/quote200
OK
const getQuote = async (chainId, protocol, logicId, logicParams) => {
const result = await client.post(`/v1/protocols/${chainId}/${protocol}/${logicId}/quote`, {
body: logicParams,
});
return result.data;
}
const chainId = 1;
const protocol = "uniswap-v3";
const logicId = "swap-token";
const logicParams = {
input: {
token: USDC,
amount: '1000'
},
tokenOut: WBTC,
slippage: 100, // 1%
};
const swapQuote = await getQuote(chainId, protocol, logicId, logicParams);Logic Params (default)
Compound Logics Params
Last updated