> ## 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.

# API Reference

> Explore every GraphQL query, mutation, subscription, and type in the Codex API: arguments, response fields, and worked examples for each.

In this section, you'll find a comprehensive list of all the GraphQL queries, mutations, and types available in the Codex API.

> [!TIP]
>
> If you need to learn more about GraphQL itself, we recommend reading the [GraphQL documentation](https://graphql.org/learn/).

## Pick your endpoint

Use this table to find the right endpoint for the data you need. Each entry links to its full reference page.

| The data you need | Find it with this |
| - | - |
| Filtered list of tokens based on specific input variables, available with extensive and enhanced token data | [`filterTokens`](https://docs.codex.io/api-reference/queries/filtertokens) · [`onFilterTokensUpdated`](https://docs.codex.io/api-reference/subscriptions/onfiltertokensupdated) for live updates |
| Token charts (OHLCV bars) | [`getTokenBars`](https://docs.codex.io/api-reference/queries/gettokenbars) · [`onTokenBarsUpdated`](https://docs.codex.io/api-reference/subscriptions/ontokenbarsupdated) for live updates |
| Token holder filtering with wallet PnL data | [`filterTokenWallets`](https://docs.codex.io/api-reference/queries/filtertokenwallets) |
| Live-streamed token prices | [`onPricesUpdated`](https://docs.codex.io/api-reference/subscriptions/onpricesupdated) |
| All transactions for a wallet | [`getTokenEventsForMaker`](https://docs.codex.io/api-reference/queries/gettokeneventsformaker) |
| Holder list and balance | [`holders`](https://docs.codex.io/api-reference/queries/holders) |
| Live transactions for a token | [`onTokenEventsCreated`](https://docs.codex.io/api-reference/subscriptions/ontokeneventscreated) · [`onEventsCreatedByMaker`](https://docs.codex.io/api-reference/subscriptions/oneventscreatedbymaker) for a specific wallet |
| Newly launched tokens | [`onLaunchpadTokenEventBatch`](https://docs.codex.io/api-reference/subscriptions/onlaunchpadtokeneventbatch) |
| Wallet balances | [`balances`](https://docs.codex.io/api-reference/queries/balances) · [`onBalanceUpdated`](https://docs.codex.io/api-reference/subscriptions/onbalanceupdated) for live updates |
| Prediction market data | See the [Discover prediction markets](https://docs.codex.io/recipes/predictions/discover-markets.md) recipe |

> [!TIP]
>
> Many queries have a real-time subscription counterpart. See [Queries vs Subscriptions](https://docs.codex.io/extra/queries-vs-subscriptions.md) for the full endpoint mapping and guidance on when to use each.

## Popular Endpoints

To help you get started with Codex, here are the top 10 queries and subscriptions used by customers.

### Top 10 Queries

1. [**filterTokens**](https://docs.codex.io/api-reference/queries/filtertokens.md): Filter and search tokens based on a variety of criteria
2. [**getBars**](https://docs.codex.io/api-reference/queries/getbars.md): Get bar chart data (OHLCV) to track price changes over time
3. [**getTokenEvents**](https://docs.codex.io/api-reference/queries/gettokenevents.md): Get transactions (buys, sells) for a pair
4. [**pairMetadata**](https://docs.codex.io/api-reference/queries/pairmetadata.md): Get metadata and stats for a trading pair
5. [**filterTokenWallets**](https://docs.codex.io/api-reference/queries/filtertokenwallets.md): Get wallets with stats for a specific token
6. [**holders**](https://docs.codex.io/api-reference/queries/holders.md): Get wallets holding a token, ordered by balance
7. [**getTokenEventsForMaker**](https://docs.codex.io/api-reference/queries/gettokeneventsformaker.md): Get token events for a specific wallet address
8. [**top10HoldersPercent**](https://docs.codex.io/api-reference/queries/top10holderspercent.md): Get the percentage of supply held by the top 10 holders
9. [**listPairsWithMetadataForToken**](https://docs.codex.io/api-reference/queries/listpairswithmetadatafortoken.md): Get all trading pairs for a token with metadata
10. [**getTokenPrices**](https://docs.codex.io/api-reference/queries/gettokenprices.md): Get real-time or historical prices for a list of tokens

### Top 10 Subscriptions

1. [**onPairMetadataUpdated**](https://docs.codex.io/api-reference/subscriptions/onpairmetadataupdated.md): Live stat updates for a token within a pair
2. [**onLaunchpadTokenEventBatch**](https://docs.codex.io/api-reference/subscriptions/onlaunchpadtokeneventbatch.md): Live launchpad token events, batched for efficiency
3. [**onBarsUpdated**](https://docs.codex.io/api-reference/subscriptions/onbarsupdated.md): Live bar chart data for price tracking
4. [**onFilterTokensUpdated**](https://docs.codex.io/api-reference/subscriptions/onfiltertokensupdated.md): The subscription version of our most popular query, filterTokens
5. [**onHoldersUpdated**](https://docs.codex.io/api-reference/subscriptions/onholdersupdated.md): Live holder count and balance changes for a token
6. [**onDetailedStatsUpdated**](https://docs.codex.io/api-reference/subscriptions/ondetailedstatsupdated.md): Live bucketed stats for a token within a pair
7. [**onEventsCreated**](https://docs.codex.io/api-reference/subscriptions/oneventscreated.md): Live transactions for a token
8. [**onPricesUpdated**](https://docs.codex.io/api-reference/subscriptions/onpricesupdated.md): Live price updates for multiple tokens
9. [**onTokenBarsUpdated**](https://docs.codex.io/api-reference/subscriptions/ontokenbarsupdated.md): Live bar chart data for a token across all its pools
10. [**onTokenEventsCreated**](https://docs.codex.io/api-reference/subscriptions/ontokeneventscreated.md): Live events for a token across all its pools

> [!TIP]
>
> Check out our [Recipes](https://docs.codex.io/recipes/discover-tokens.md) for more in-depth walkthroughs of popular Codex use cases.

> [card] [GraphQL Explorer](https://docs.codex.io/explore.md)
>
> Try out queries interactively in our GraphQL Explorer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.