Skip to content
Quote

LCX Liberty. American DeFi. Your keys. Your assets. Your control.

API reference

Quote

POST /v1/quote prices a pair and returns the route, with nothing built to sign.

Request

POST/v1/quote
Body
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.

slippageBpsnumber

Basis points. Sets the minimumAmount floor. Defaults to 50, caps at 2000.

toChainIdnumber

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.

recipientstring

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.

includeUnexecutableboolean

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.

* required

json
{
  "chainId": 1,
  "tokenIn":  "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "amount": "1",
  "decimals": 18,
  "slippageBps": 50
}

Response

data.quote
quoteIdstring

Pass to /v1/build to execute this route.

inputobject

{ amount, token }. The amount is raw.

outputobject

{ amount, minimumAmount, token }. Both amounts are raw.

blockNumbernumber

The chain state this price was computed against.

expiresAtnumber

Unix 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 | 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.

gasEstimateWeistring | null

Swap gas only. The approval is not included. null when we have no gas price for the chain: unknown, never 0.

gasFeeUSDnumber | null

The same estimate, priced. Null on the same terms.

spenderstring | 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 / nativeOutboolean

The 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.