> ## 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 all of the GraphQL queries, mutations, and types available in the Codex API

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/).</Tip>

## 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`](/api-reference/queries/filtertokens) · [`onFilterTokensUpdated`](/api-reference/subscriptions/onfiltertokensupdated) for live updates                              |
| Token charts (OHLCV bars)                                                                                   | [`getTokenBars`](/api-reference/queries/gettokenbars) · [`onTokenBarsUpdated`](/api-reference/subscriptions/ontokenbarsupdated) for live updates                                    |
| Token holder filtering with wallet PnL data                                                                 | [`filterTokenWallets`](/api-reference/queries/filtertokenwallets)                                                                                                                   |
| Live-streamed token prices                                                                                  | [`onPricesUpdated`](/api-reference/subscriptions/onpricesupdated)                                                                                                                   |
| All transactions for a wallet                                                                               | [`getTokenEventsForMaker`](/api-reference/queries/gettokeneventsformaker)                                                                                                           |
| Holder list and balance                                                                                     | [`holders`](/api-reference/queries/holders)                                                                                                                                         |
| Live transactions for a token                                                                               | [`onTokenEventsCreated`](/api-reference/subscriptions/ontokeneventscreated) · [`onEventsCreatedByMaker`](/api-reference/subscriptions/oneventscreatedbymaker) for a specific wallet |
| Newly launched tokens                                                                                       | [`onLaunchpadTokenEventBatch`](/api-reference/subscriptions/onlaunchpadtokeneventbatch)                                                                                             |
| Wallet balances                                                                                             | [`balances`](/api-reference/queries/balances) · [`onBalanceUpdated`](/api-reference/subscriptions/onbalanceupdated) for live updates                                                |
| Prediction market data                                                                                      | See the [Discover prediction markets](/recipes/discover-prediction-markets) recipe                                                                                                  |

<Tip>Many queries have a real-time subscription counterpart. See [Queries vs Subscriptions](/extra/queries-vs-subscriptions) for the full endpoint mapping and guidance on when to use each.</Tip>

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

### Top 10 Subscriptions

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

<Tip>Check out our [Recipes](/recipes) for more in-depth walkthroughs of popular Codex use cases.</Tip>

<Card title="GraphQL Explorer" icon="magnifying-glass" href="/explore">
  Try out queries interactively in our GraphQL Explorer.
</Card>
