Skip to content
Tokens & prices

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

API reference

Tokens & prices

Resolving symbols to addresses, and USD prices from real pool depth.

Tokens

GET/v1/tokens?chainId=1&search=usdc&offset=0&limit=50

Token list for a chain: the tokens we list first, then everything the indexer knows, ranked by pool count so the deepest match comes first. Search matches symbol, name or address. This is how you turn a ticker a user typed into an address you can quote.

One ordered sequence, sliced by offset. limit defaults to 60 and caps at 200. data.hasMore and data.nextOffset tell you whether to ask again. Page until hasMore is false rather than until a page comes back short. A page can be short and still not be the last one; an empty page is always the last one, and a limit below 1 is read as 1, so the loop always makes progress.

Symbols are not unique. Several contracts on a chain can call themselves USDC, and only one of them is what your user means. Rank matters. Prefer the top result, and put the contract address on screen whenever more than one row could be the intended token.
Row fields worth reading
listedboolean

LISTED means LCX Liberty DEX has checked this contract address and vouches that it is the token its symbol claims to be. It is an identity claim, not a safety, quality or liquidity claim. It does not mean the token is audited, endorsed, or a good trade. Unlisted does not mean unsafe. Over 99% of the tokens we index are unlisted, and most are perfectly ordinary. Use it to ORDER a picker, the way we do: listed tokens sort first. We do not render it as a badge. An identity claim gives a user nothing they can act on, and a green mark beside a token reads as a safety rating no matter how it is captioned. Our own measurements run the other way. On a $100 USDC buy the genuine $LCX showed +1.208% impact while three impostor contracts showed -0.094%, -0.134% and +0.157%, so any depth-shaped badge would have decorated the fakes and unlisted the real one. Show the contract address and poolCount instead.

cgListedboolean | null

“CoinGecko lists a coin for this exact contract.” Like listed, an identity claim, not a safety, quality or liquidity claim: a CoinGecko-listed token can still be nearly untradable, and thinLiquidity and depthUsd keep saying so independently. True means our enrichment saw a CoinGecko coin id for the contract; false means we checked and CoinGecko lists none, which is not an accusation, since most ordinary tokens are not on CoinGecko; null means not yet checked. Absent on older deployments. We serve the boolean fact only, never the coin id itself. It is our own derived and stored fact, so keyed requests receive it too, unlike GeckoTerminal-sourced logos and external prices. Do not infer it from a logo: token images exist for impostor and scam pools, and a picture proves nothing about identity.

verifiedboolean

A different claim from the one above. It means the token is one of the chain's routing hubs, or the chain's native currency. Kept because integrators already read it. The two sets provably differ. On Base the hub set holds a DAI contract we deliberately do not list, because a 100-USDC swap into it loses about 16%, while cbBTC and AERO are listed and are not hubs. Do not render verified as a listing badge.

thinLiquidityboolean

Quotable, but so thinly that the fill will not resemble the quote. thinLiquidityNote carries the measurement behind it, such as “$100 moved the price 8.974%”. This is a liquidity warning and nothing else. It says nothing about who issued the token, and it is independent of listed. A token can carry both.

poolCountnumber

Indexed pools holding this token. The ranking is computed from it.

logostring | null

An image URL, or null once we have verified that no logo exists, so you can render a fallback immediately instead of paying a guaranteed 404. For a token we have not checked yet the URL is a best guess and may 404; handle the image error either way.

logoSourcestring | null

Where a verified logo came from: trustwallet or geckoterminal. Null while unchecked and when no logo exists. If you display rows whose logoSource is geckoterminal, display a hyperlinked “Powered by GeckoTerminal” near them; their attribution terms require it. Requests made with an API key never receive GeckoTerminal-sourced logos. Those rows serve logo: null, because CoinGecko's license does not permit us to redistribute their data through a commercial API. See the licensing note under Price.

Price

GET/v1/price?chainId=1&token=0x…
POST/v1/prices

The USD price is derived from our own pool index and reflects real depth, rather than being relayed from a third-party mid-market feed. Use the batch form for a portfolio view. Fifty tokens in one call costs one call against your quota; fifty separate calls cost fifty.

Every answer names its origin. source is index when the figure comes from our own pools, which is every token our index can price. Where it cannot, a cached figure from GeckoTerminal fills the gap with source: "external" and a fetchedAt timestamp in Unix seconds, so you always know which kind of number you are holding. An external figure is never served for a token our index prices.

json
{
  "success": true,
  "data": { "usd": 3421.87, "source": "index", "fetchedAt": null, "stale": false }
}

A token nobody can price answers usd: null. Earlier deployments answered usd: 0.0 there; the change is deliberate, because zero reads as “worthless” and poisons any arithmetic done on it, while null says what is true. If your integration compared usd against zero, it already handles null through the same falsy check; if it does arithmetic on usd, guard for null first. A cold external miss also answers null and queues a background fetch, so a retry moments later usually succeeds.

The batch form returns data.prices exactly as before, values as plain numbers, plus parallel data.sources and data.fetchedAt maps keyed the same way. Tokens the oracle cannot price now also appear when a fresh external figure exists; tokens with neither remain omitted, which still means “we don't know” rather than “worth nothing”.

On both forms, stale describes our own index. It is the same per-chain freshness predicate that gates /v1/build, so it applies to entries whose source is index. An external figure is not subject to that gate; its own age is its fetchedAt. On the batch form the flag is chain-level, so exempt the external entries yourself when applying it per token.

Both forms also carry change24h, the token's move over the last 24 hours, as a RATIO (0.023 is +2.3%), not a percentage. It is null wherever we have no price from 24 hours ago to compare against, which today is most tokens while the history fills in. Null means unknown: render a dash, never a zero, and never assume a missing value means the price held steady.

A literal 0.0 is a measured answer, and one class of tokens produces it every day: the USD stablecoins the index prices everything else from, USDC, USDT and the other stable hubs. They are the anchor, one dollar by definition with no pool state behind the figure (their asOfBlock is null), so the current price and the 24-hour-ago sample are both exactly 1.0 and the ratio is exactly zero. That is neither a rounding artifact nor a missing sample: a stablecoin's wobble around its peg is not something this index measures.

json
{
  "success": true,
  "data": { "usd": 3421.87, "change24h": null, "source": "index", "stale": false }
}
Licensing. External figures and GeckoTerminal-sourced logos are CoinGecko-licensed data, and their terms do not permit us to redistribute that data through a commercial API. Requests made with an API key therefore never receive them: an oracle-unpriceable token answers usd: null and GeckoTerminal-sourced logos serve null. Anonymous evaluation calls may receive them; if a price whose source is external or a GeckoTerminal logo renders in your UI, render a hyperlinked “Powered by GeckoTerminal” near it, and do not re-serve that data through your own API or feeds. Everything labeled index is our own data and carries no such strings.