LCX Liberty. American DeFi. Your keys. Your assets. Your control.
Quote
POST /v1/quote prices a pair and returns the route, with nothing built to sign.
Request
/v1/quote| Field | Type | Description |
|---|---|---|
| chainId* | number | A chain ID from GET /v1/chains. |
| tokenIn* | string | Address of the token being sold. |
| tokenOut* | string | Address of the token being bought. |
| amount* | string | Human amount of tokenIn, e.g. "1.5". |
| decimals* | number | Decimals of tokenIn, so the amount can be scaled. |
| slippageBps | number | Basis points. Sets the minimumAmount floor. Defaults to 50, caps at 2000. |
| toChainId | number | Deliver the output on a DIFFERENT chain. The response is then shaped as a journey rather than a trade (shape, legs, endToEndMinOut, etaSec) and is not atomic. See Crossing chains. |
| recipient | string | Who receives the output. Required alongside toChainId: the delivery is made to an address on the destination chain, so it has to be priced against a known one. |
| includeUnexecutable | boolean | Include venues the router cannot settle. Defaults to false. There are none today (Uniswap V4 became executable on 1 Aug 2026), so this currently changes nothing. When a venue is indexed ahead of router support, a quote priced with this is indicative and /v1/buildrefuses it with quote_not_executable. |
chainId*numberA chain ID from GET /v1/chains.
tokenIn*stringAddress of the token being sold.
tokenOut*stringAddress of the token being bought.
amount*stringHuman amount of tokenIn, e.g. "1.5".
decimals*numberDecimals of tokenIn, so the amount can be scaled.
slippageBpsnumberBasis points. Sets the minimumAmount floor. Defaults to 50, caps at 2000.
toChainIdnumberDeliver the output on a DIFFERENT chain. The response is then shaped as a journey rather than a trade (shape, legs, endToEndMinOut, etaSec) and is not atomic. See Crossing chains.
recipientstringWho receives the output. Required alongside toChainId: the delivery is made to an address on the destination chain, so it has to be priced against a known one.
includeUnexecutablebooleanInclude venues the router cannot settle. Defaults to false. There are none today (Uniswap V4 became executable on 1 Aug 2026), so this currently changes nothing. When a venue is indexed ahead of router support, a quote priced with this is indicative and /v1/buildrefuses it with quote_not_executable.
* required
{
"chainId": 1,
"tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1",
"decimals": 18,
"slippageBps": 50
}Response
| Field | Type | Description |
|---|---|---|
| quoteId | string | Pass to /v1/build to execute this route. |
| input | object | { amount, token }. The amount is raw. |
| output | object | { amount, minimumAmount, token }. Both amounts are raw. |
| blockNumber | number | The chain state this price was computed against. |
| expiresAt | number | Unix seconds, 120 after the quote was made. |
| priceImpactPct | number? | Percent of input USD value lost. Positive means the user loses. Absent when one side cannot be priced, which is a reason to warn rather than proceed. |
| usdValueIn / usdValueOut | number | null | Our oracle's USD valuation of each side, the same figures priceImpactPct was computed from, so the numbers you show match the numbers we judged. Null when a side cannot be priced from our own pools. Never externally sourced: a quotable token has pools by definition, so these are always our own index. |
| gasEstimateWei | string | null | Swap gas only. The approval is not included. null when we have no gas price for the chain: unknown, never 0. |
| gasFeeUSD | number | null | The same estimate, priced. Null on the same terms. |
| spender | string | null | The router contract to approve. Null only on a chain with no router deployed; read routerDeployed from GET /v1/chains rather than assuming which. |
| nativeIn / nativeOut | boolean | The router wraps or unwraps for you. |
| venues | string[]? | Adapter keys the route touches, lowercase and hyphenated. |
| routes | RouteLeg[]? | The split, one entry per leg, each with its own hops. Every hop carries tokenInSymbol / tokenOutSymbol and tokenInDecimals / tokenOutDecimals alongside the addresses, so a route renders without a second lookup. For a token we cannot name, decimals come back null rather than a guessed 18. |
| stale | boolean? | The index was behind the head. |
quoteIdstringPass to /v1/build to execute this route.
inputobject{ amount, token }. The amount is raw.
outputobject{ amount, minimumAmount, token }. Both amounts are raw.
blockNumbernumberThe chain state this price was computed against.
expiresAtnumberUnix seconds, 120 after the quote was made.
priceImpactPctnumber?Percent of input USD value lost. Positive means the user loses. Absent when one side cannot be priced, which is a reason to warn rather than proceed.
usdValueIn / usdValueOutnumber | nullOur oracle's USD valuation of each side, the same figures priceImpactPct was computed from, so the numbers you show match the numbers we judged. Null when a side cannot be priced from our own pools. Never externally sourced: a quotable token has pools by definition, so these are always our own index.
gasEstimateWeistring | nullSwap gas only. The approval is not included. null when we have no gas price for the chain: unknown, never 0.
gasFeeUSDnumber | nullThe same estimate, priced. Null on the same terms.
spenderstring | nullThe router contract to approve. Null only on a chain with no router deployed; read routerDeployed from GET /v1/chains rather than assuming which.
nativeIn / nativeOutbooleanThe router wraps or unwraps for you.
venuesstring[]?Adapter keys the route touches, lowercase and hyphenated.
routesRouteLeg[]?The split, one entry per leg, each with its own hops. Every hop carries tokenInSymbol / tokenOutSymbol and tokenInDecimals / tokenOutDecimals alongside the addresses, so a route renders without a second lookup. For a token we cannot name, decimals come back null rather than a guessed 18.
staleboolean?The index was behind the head.