Skip to content
Build

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

API reference

Build

POST /v1/build turns a quoteId the user already accepted into calldata.

Request

POST/v1/build
quoteId*string

From a prior /v1/quote.

recipient*string

Where the output goes. Usually the taker.

slippageBpsnumber

Must match what the quote was priced at. A different value returns slippage_mismatch rather than being clamped.

deadlineSecsnumber

Seconds until the on-chain deadline. Defaults to 300, caps at 3600, and must be greater than zero: 0 or a negative value returns bad_deadline, because a deadline of "now" can only revert after the user has paid for it.

* required

json
{ "quoteId": "q_1_2_1785331092", "recipient": "0x…" }

The minimum-out floor is derived from the output the user was shown, never from a fresh price. If the market moved past it, the build is refused with price_moved instead of quietly lowering the bar. Taking the smaller of the two would not help, because in the one case the floor exists for the fresh number is always the smaller one.

The build is also refused with store_unavailable when our index for that chain is outside its freshness window. A quote is advisory and a caller can weigh stale for themselves. Calldata is not advisory: it gets signed and broadcast. During a 32-hour Base ingest freeze the engine produced a route whose real output sat 0.69% below its own minimumAmount, which would have reverted and cost the user gas for nothing.