Skip to content
Introduction

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

Getting started

Introduction

What the LCX Liberty DEX API is, where its prices come from, and what it does not do.

What it is

The LCX DeFi product line. Nothing in this API changes who holds your assets: it prices, and it hands back calldata for you to sign yourself.

LCX Liberty DEX is a DEX aggregator, and this is its API. Give it a chain, a pair and an amount. It returns the best route it can find across the pools it indexes, plus the calldata to execute that route if you ask for it.

What separates it from most swap APIs is where the answer comes from. LCX Liberty DEX runs its own pool index: more than 1,500,000 pools and 2,400,000 tokens across every chain we index and 80+ venues, read from chain state rather than bought from another aggregator and resold. A quote is computed against pool reserves we hold, so the route we return is the route that executes.

Quoting and execution both cover every chain we index. GET /v1/chains carries routerDeployed per chain: branch on that field rather than on a list you keep yourself, and a chain we add later needs no change on your side.

Coverage

Two addresses, each the same on every chain it serves: one on Ethereum, Base, Arbitrum and OP Mainnet, and one on Robinhood Chain, BNB Chain, Polygon, Avalanche, Unichain, Monad, HyperEVM, Arc and World Chain. Each is a UUPS proxy, so it is stable across upgrades. The router on a chain is the address an ERC-20 approval is granted to there, and it is what /v1/quote returns as spender; /v1/chains names it per chain as router. Read it from the quote rather than pinning it here: a quote that ever named a different spender is the one that is right, and code that trusts this page instead would approve the wrong contract.

80+ venues are indexed, and a quote names the ones it used in venues: Uniswap V2, V3 and V4 and their forks (SushiSwap, PancakeSwap, ShibaSwap, QuickSwap, Pangolin); the Solidly family and its concentrated pools (Aerodrome and Slipstream on Base, Velodrome on OP Mainnet); Algebra (Camelot on Arbitrum, QuickSwap V3 on Polygon, THENA on BNB Chain); Curve StableSwap and CryptoSwap; Balancer; WOOFi; Fluid; Liquidity Book (LFJ) on Avalanche; and on the newest networks, Uniswap V3 and V4 and Velodrome's concentrated pools on Unichain, Uniswap V3 and V4, PancakeSwap V3 and Curve on Monad, HyperSwap, Hybra, KittenSwap, Project X, Ramses, Nest, HyperLynx, HyperTrade, UltraSolid, Upheaval and WOOFi on HyperEVM, Uniswap V2 and V3, Aero Lite and Archery on Arc and Uniswap V3 and V4 on World Chain. A wrapper with a rate of its own (wstETH, sDAI, sUSDe and the like) is indexed as a venue too, so a route can step through one.

Behind those keys sit far fewer families of pool math: constant product, concentrated liquidity, Solidly stable and volatile, Curve StableSwap and CryptoSwap, Balancer weighted, WOOFi’s oracle pools and Fluid, and Liquidity Book bins. Uniswap V4, Slipstream and Algebra are keys rather than families: their curve is V3’s, so they reuse that tick walk, and what differs is where the state and the fee are read from.

V4 is routed like any other venue. It settles through the singleton’s unlock callback rather than a pool address, because a V4 pool does not have one since every pool lives inside a single PoolManager. The router implements that callback, so a V4 hop quotes and executes exactly as a V3 hop does.

includeUnexecutable adds the venues the router cannot settle to a quote, for price discovery only. Ekubo is one today: it is indexed and priced, and no router carries its settlement yet. A family is usually indexed before it is executable, and a quote should never be an offer we cannot honour, so the default leaves them out.

GET /v1/chains returns the live list with per-chain index freshness, and it never counts against your quota. See Chains & status.

What it does not do

  • It does not hold funds. There is no deposit, no custody and no account balance. You send the transaction from your own wallet.
  • It does not sign or broadcast. The API returns { to, data, value }; signing and sending stay entirely on your side.
  • It does not send the approval for you. We return the exact spender; the approve is yours to send. See Approvals.
  • It takes no cut of the swap. LCX charges nothing on a trade and captures no positive slippage: you pay for API calls, not for volume. An integrator that has registered a fee of its own on the router has it taken from the output and stated in the quote's fee block, which is zero for everyone else.
  • It executes only where a router is deployed. One is live on every chain in the table above, and routerDeployed on /v1/chains is the field to read. On a chain without one a quote comes back with spender: null and there is nothing to sign.

Where to go next

  • Quickstart gets you a priced route in about a minute, with a free key.
  • Quotes & execution is the model to have in your head before you write the integration.
  • API reference lists every endpoint and every field it returns.