Skip to content
API overview

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

API reference

API overview

Base URL, conventions, and the full endpoint list.

Base URL

https://swap-api.lcx.com

Every endpoint below sits under /v1. The version is in the path, and a breaking change gets a new path. /v1 will not change shape underneath you.

Conventions

  • Amounts in, human. Pass "1.5" with decimals.
  • Amounts out, raw. Base units as strings, because an 18-decimal integer does not survive a JavaScript number.
  • Addresses are checksummed on the way out and case-insensitive on the way in.
  • Everything is JSON, including errors. See Errors.

All endpoints

EndpointPurpose
POST /v1/quoteBest route and expected output.
POST /v1/swapQuote and signable calldata in one call.
POST /v1/buildCalldata for a quoteId you already hold.
POST /v1/submitBroadcast a signed swap through the path most likely to fill it.
GET /v1/allowanceDoes this taker need to approve, and of whom.
POST /v1/permitEIP-2612 typed data for a gasless approval.
GET /v1/tokensToken list and search for a chain.
GET /v1/priceUSD price for one token.
POST /v1/pricesUSD prices for many tokens.
GET /v1/chainsSupported chains and index health. Never counts.
GET /v1/swapsA wallet's swap history, every chain.
GET /v1/swaps/healthPer-chain indexer state behind that history.
GET /v1/statsIndex size and engine benchmark.
GET /v1/usageYour plan, calls used and remaining. Never counts.
GET /v1/plansEvery plan and its limits. Never counts.