Documentation Index
Fetch the complete documentation index at: https://docs.codex.io/llms.txt
Use this file to discover all available pages before exploring further.
This data powers the token pages on Defined.fi:

Step 1: Token Metadata & Safety
Token metadata with safety fields
Token metadata with safety fields
isScam rather than isVerified for token safety. isScam: false is the equivalent of a token being “verified.” For Solana tokens, also check mintable and freezable — if these return an address, the token’s supply can be increased or holdings can be frozen.Step 2: Price & Pair Data
pairMetadata. This gives you the price stats panel for your dashboard.Price and volume from pairMetadata
Price and volume from pairMetadata
Finding the pair ID with listPairsWithMetadataForToken
Finding the pair ID with listPairsWithMetadataForToken
listPairsWithMetadataForToken to find it. Results are sorted by liquidity so the first result is the most active pair.Step 3: Holders & Top Traders
holders for the top holder list and tokenTopTraders for the most active traders with PnL data.Top holders
Top holders
Top traders with PnL
Top traders with PnL
Step 4: Trade History
getTokenEvents for the initial load and paginate with cursor for older trades.Recent trades
Recent trades
Filtered by buys only with minimum size
Filtered by buys only with minimum size
Step 5: Chart Data
OHLCV bars for chart
OHLCV bars for chart
Step 6: Real-Time Updates
Live price & volume updates
Live price & volume updates
onPairMetadataUpdated to keep price, volume, and liquidity current without polling.Live trades
Live trades
onTokenEventsCreated to stream new trades as they happen.Live chart bars
Live chart bars
onTokenBarsUpdated to keep the chart updating in real time.Live holder updates
Live holder updates
onHoldersUpdated to keep the holders list current.Putting It All Together
On page load (queries):
token— metadata, safety, social linkspairMetadata— price, volume, liquidityholders+tokenTopTraders— holder and trader tabsgetTokenEvents— recent trade historygetTokenBars— chart OHLCV data
onPairMetadataUpdated— live price and volumeonTokenEventsCreated— live trade feedonTokenBarsUpdated— live chart updatesonHoldersUpdated— live holder changes
Subscriptions vs Queries Quick Reference
| Data | Query (historical) | Subscription (real-time) |
|---|---|---|
| Price & volume | pairMetadata | onPairMetadataUpdated |
| Trades | getTokenEvents | onTokenEventsCreated |
| Chart bars | getBars / getTokenBars | onBarsUpdated / onTokenBarsUpdated |
| Holders | holders | onHoldersUpdated |
| Token prices | getTokenPrices | onPricesUpdated |