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

# Launchpads

> Filter through launchpad data and get realtime updates.

In this recipe we'll show you how to use the Codex api to create a 3 column launchpad view, complete with filtering, sorting, and realtime updates. This data directly powers the launchpads view on [defined.fi](https://defined.fi/tokens/launchpads). The websocket pushes data on every new token creation and event through the lifetime of the bonding curve and for an additional 6 hours post-migration (graduation).

<Tip>
  New to launchpad tokens? See the [Launchpad Lifecycle](/recipes/launchpad-lifecycle) guide for how tokens progress through stages — from bonding curve to graduation to migration.
</Tip>

The supported launchpads include Pump.fun, Four.meme, Launchlab, Meteora, and more. See [Supported Launchpads](https://docs.codex.io/launchpads) for the complete list with each launchpad's `launchpadName` and `protocol` filter values.

<Danger>
  It is a requirement to proxy launchpad data through your backend to serve multiple users from a single subscription. Failure to do so may result in additional charges and termination of your connection.
</Danger>

<Frame>
  <img width="100%" src="https://mintcdn.com/codex-dfdf2708/sIg_rUgIrhUCd0wd/images/launchpads-defined.png?fit=max&auto=format&n=sIg_rUgIrhUCd0wd&q=85&s=ce06e586f6a8d52c6fff3c30a8b8b3c1" alt="Launchpads" data-path="images/launchpads-defined.png" />
</Frame>

## Initial Fetch

Start by implementing the following query to fetch the launchpad data, one query for each column.

<AccordionGroup>
  <Accordion title="New">
    [Test this query in the Explorer →](/explore)

    ```graphql theme={null} theme={null}
    query LaunchpadsNew {
      filterTokens(
        filters: { launchpadCompleted: false, launchpadMigrated: false }
        rankings: { attribute: createdAt, direction: DESC }
      ) {
        results {
          createdAt
          marketCap
          priceUSD
          token {
            name
            symbol
            address
            networkId
            launchpad {
              graduationPercent
              launchpadName
              launchpadProtocol
              migrated
              completed
              completedAt
            }
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Completing">
    [Test this query in the Explorer →](/explore)

    ```graphql theme={null} theme={null}
    query LaunchpadsCompleting {
      filterTokens(
        filters: {
          launchpadCompleted: false
          launchpadMigrated: false
          launchpadGraduationPercent: { gt: 80, lt: 100 }
        }
        rankings: { attribute: graduationPercent, direction: DESC }
      ) {
        results {
          createdAt
          marketCap
          priceUSD
          token {
            name
            symbol
            address
            networkId
            launchpad {
              graduationPercent
              launchpadName
              launchpadProtocol
              migrated
              completed
              completedAt
            }
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Completed">
    [Test this query in the Explorer →](/explore)

    ```graphql theme={null} theme={null}
    query LaunchpadsCompleted {
      filterTokens(
        filters: {
          launchpadMigrated: true
          launchpadGraduationPercent: { gte: 100 }
        }
        rankings: { attribute: launchpadMigratedAt, direction: DESC }
      ) {
        results {
          createdAt
          marketCap
          priceUSD
          token {
            name
            symbol
            address
            networkId
            launchpad {
              graduationPercent
              launchpadName
              launchpadProtocol
              migrated
              completed
              completedAt
            }
          }
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

Now you have the data for the initial render for each column.  You can adjust the filters with the remaining of the arguments to the [filterTokens](/api-reference/queries/filtertokens) query. See the [TokenFilters](/api-reference/input-objects/tokenfilters) type for more details.

<Tip>
  By default `filterTokens` will return all tokens from a launchpad, across all networks, if you want to scope down to a specific launchpad, use the `launchpadName` or `launchpadProtocol` filters, if you want to narrow down just to specific network, use the `network` filter.
</Tip>

## Realtime Updates

To get realtime updates, you can use the [onLaunchpadTokenEventBatch](/api-reference/subscriptions/onlaunchpadtokeneventbatch) subscription. This gives you every update for each launchpad token.

[Test this query in the Explorer →](/explore)

```graphql theme={null} theme={null}
subscription OnLaunchpadTokenEventBatch(
  $input: OnLaunchpadTokenEventBatchInput
) {
  onLaunchpadTokenEventBatch(input: $input) {
    eventType
    marketCap
    price
    token {
      address
      decimals
      id
      name
      networkId
      symbol
      createdAt
      launchpad {
        graduationPercent
        poolAddress
        completedAt
        completed
        migratedAt
        migrated
        migratedPoolAddress
      }
    }
    devWallet {
      address
      displayName
      category
      tokensCreatedCount
      tokensMigratedCount
    }
  }
}
```

Now you've got all you need to build a fully functional launchpad view.

<Tip>
  Each launchpad event carries `devWallet`, the token creator resolved to a full [`Wallet`](/api-reference/types/wallet). Select it to show the dev's display name, [category](/api-reference/enums/walletcategory), identity labels, and how many tokens they've created and migrated — inline, without a separate lookup per launch.
</Tip>

<Warning>
  Launchpad events are extremely high-frequency and will send a large number of requests. We offer a monthly flat-rate option with unlimited requests for this subscription. [Contact us](mailto:hello@codex.io?subject=Launchpad%20Events%20Subscription) for more information.
</Warning>

## Further Reading

<AccordionGroup>
  <Accordion title="Launchpad Token Progression">
    Launchpads that utilize bonding curves, like pump.fun, have structured token progression from 0-100% before "graduating." Some launchpad protocols like Zora, Base, and Clanker do not implement bonding curves, and lack the distinct graduation phases. Tokens on protocols without bonding curves will simply be 'New', without going through the further phases of completing, completed, or migrating. In these cases the associated attributes like `migrated`/`completed`, `migratedAt`/`completedAt`, `migratedSlot`, and `graduationPercent` will be absent.
  </Accordion>

  <Accordion title="Metadata, Charts & Trading">
    All the metadata in the launchpad subscription is available through the launchpad model in EnhancedToken ([https://docs.codex.io/api-reference/types#launchpaddata](https://docs.codex.io/api-reference/types#launchpaddata)). The volume/liquidity/etc metrics are then available through a variety of different endpoints for each token.

    Data for charts and trading events would need to be fetched separately, as those aren’t included in the subscription.
  </Accordion>
</AccordionGroup>

Check out other similar queries and subscriptions in the GraphQL [reference](/api-reference/introduction)

* [filterTokens](/api-reference/queries/filtertokens)
* [onLaunchpadTokenEventBatch](/api-reference/subscriptions/onlaunchpadtokeneventbatch)
* [onLaunchpadTokenEvent](/api-reference/subscriptions/onlaunchpadtokenevent)
