Skip to main content
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. 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). The supported launchpads include Pump.fun, Four.meme, Launchlab, Meteora, and more. You can find a complete list of supported launchpad protocols here, and a list of filterable launchpad names here.
Launchpads

Initial Fetch

Start by implementing the following query to fetch the launchpad data, one query for each column.
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 query. See the TokenFilters type for more details.
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.

Realtime Updates

To get realtime updates, you can use the onLaunchpadTokenEventBatch subscription. This gives you every update for each launchpad token.
Now you’ve got all you need to build a fully functional launchpad view.
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 for more information.

Further Reading

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.
All the metadata in the launchpad subscription is available through the launchpad model in EnhancedToken (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.
Check out other similar queries and subscriptions in the GraphQL reference