Request Quote
Path parameters
chainIdintegerRequiredExample:
Example: 42161
42161protocolIdstringRequiredExample:
Example: uniswap-v3
uniswap-v3logicIdstringRequiredExample:
Example: swap-token
swap-tokenBody
slippageintegerOptionalExample:
100Responses
200
OK
application/json
post
/v1/protocols/{chainId}/{protocolId}/{logicId}/quote200
OK
Provides quote of a Logic, depending on the chain and protocol. See Networks & Protocols.
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);Quote is used in fields of Logic data. It can be used after building Logic according to the following format:
Logic Params (default)
The result contains a list of chains that looks the following:
Compound Logics Params
The result contains a list of chains that looks the following:
Last updated