Quote
API Path
POST https://api.rabbitswap.xyz/quote Request Interface
interface QuoteRequest {
tokenInChainId: number,
tokenIn: string, // token address or "ETH" for native
tokenOutChainId: number,
tokenOut: string, // token address or "ETH" for native
amount: string, // in wei (bigint in string form)
type: "EXACT_INPUT" | "EXACT_OUTPUT",
swapper: string | undefined, // wallet address to use the swap
slippageTolerance: string, // in percentage
deadline: number, // seconds
withPoolFee: boolean | undefined, // to calculate pool fee from server (slower response)
}example
{
"tokenInChainId": 88,
"tokenIn": "ETH", // VIC
"tokenOutChainId": 88,
"tokenOut": "0x0fd0288aaae91eaf935e2ec14b23486f86516c8c", // C98
"type": "EXACT_INPUT",
"amount": "1000000000000000000", // 1 VIC as input, to swap to C98
"slippageTolerance": "0.5", // 0.5%
"deadline": 600, // 10 mins
"withPoolFee": true
}Response Interface
Another Response Example For Swaooer Defined
Last updated