LCX Liberty. American DeFi. Your keys. Your assets. Your control.
Quickstart
Create a free key, then get a priced route in one request.
Get a key
Sign in with a one-time code sent to your email, or with Google. Either creates the account. Answer four short questions, create a key, and the Free plan is active right away: 150,000 calls a month at 5 requests a second, no card.
Make an authenticated call
curl -X POST https://swap-api.lcx.com/v1/quote \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"chainId": 1,
"tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountIn": "1000000000000000000",
"slippageBps": 50
}'Authorization header, never in a query string. Query strings end up in browser history, proxy logs and referrer headers.Reading the response
{
"success": true,
"data": {
"quote": {
"quoteId": "q_1_2_1785331092",
"chainId": 1,
"blockNumber": 25638739,
"expiresAt": 1785331212,
"input": { "amount": "1000000000000000000", "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
"output": {
"amount": "1900850015",
"minimumAmount": "1891345764",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
"priceImpactPct": 0.05,
"usdValueIn": 1901.8,
"usdValueOut": 1900.85,
"slippageBps": 50,
"gasEstimateWei": "51205426350000",
"gasFeeUSD": 0.0974,
"venues": ["uniswap-v3"],
"spender": "0x…",
"stale": false
}
}
}Amounts go in human and come back raw, as strings; see conventions. minimumAmount is the floor your slippageBps implies. Below it the swap reverts on-chain.
blockNumber pins the chain state this price was computed from, and expiresAt is 120 seconds after the quote was made. venues carries adapter keys in the spelling the engine uses internally, lowercase and hyphenated.
Next: Quotes & execution covers turning this into a transaction.