Codex provides real-time on-chain data — token prices, charts, holders, and prediction markets — via a single GraphQL API. Full documentation: docs.codex.io.
Pass $CODEX_API_KEY in the Authorization header if available. Get a free API key at dashboard.codex.io/signup. If the server returns 402 Payment Required, use the codex-gateway skill to handle the payment flow.
If both a local and global copy of this skill exist, the local copy takes precedence.
Use this skill to produce valid Codex GraphQL requests using API key authentication.
HTTP endpointhttps://graph.codex.io/graphqlWebSocket endpointwss://graph.codex.io/graphqlSchema (SDL)https://graph.codex.io/schema/latest.graphqlIntrospection JSONhttps://graph.codex.io/schema/latest.jsonAPI-key authAuthorization: <key> or Authorization: Bearer <token>
Run once and cache:
bash
curl -sS https://graph.codex.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $CODEX_API_KEY" \
--data-binary '{"query":"query GetNetworks { getNetworks { id name } }"}'
Use network IDs from this result before expensive requests.
NeedOperationNetworksgetNetworksToken discovery/searchfilterTokensTrending tokensfilterTokens with trendingScore24 rankingToken pricesgetTokenPricesPairs for a tokenlistPairsWithMetadataForTokenPair metadatapairMetadataPair OHLCVgetBarsToken OHLCVgetTokenBarsToken eventsgetTokenEventsMaker eventsgetTokenEventsForMakerWallet leadersfilterTokenWalletsWallet chart/statswalletChart, detailedWalletStatsHoldersholdersTop-10 concentrationtop10HoldersPercentLive single priceonPriceUpdatedLive multi-priceonPricesUpdatedLive token eventsonTokenEventsCreated, onEventsCreatedByMakerLive bars/pairsonBarsUpdated, onPairMetadataUpdated, onTokenBarsUpdatedLaunchpad streamsonLaunchpadTokenEventBatch, onLaunchpadTokenEventUnconfirmed Solana eventsonUnconfirmedEventsCreatedShort-lived keyscreateApiTokens, apiTokens, apiToken, deleteApiTokenWebhooks (server-side alerts)createWebhooks, deleteWebhooks, getWebhooksWindowed token change statsgetDetailedTokenStatsPrediction event discoveryfilterPredictionEventsPrediction market discoveryfilterPredictionMarketsPrediction event detaildetailedPredictionEventStatsPrediction market chartpredictionMarketBarsPrediction multi-market chartpredictionEventTopMarketsBarsPrediction event chartpredictionEventBarsPrediction tradespredictionTradesPrediction token holderspredictionTokenHoldersPrediction categoriespredictionCategoriesPrediction trader leaderboardfilterPredictionTradersPrediction trader profiledetailedPredictionTraderStatsPrediction trader positionsfilterPredictionTraderMarketsPrediction trader chartpredictionTraderBars
Default discovery path: start with filterTokens.
networkId first.onPricesUpdated instead of many single-token subscriptions.FilePurposereferences/gotchas.mdCommon failure points — check here firstreferences/query-templates.mdQuery + websocket templates with examplesreferences/endpoint-playbook.mdOperation selection heuristics by intentreferences/apis.mdEndpoint/auth matrix, pagination, rate limitsreferences/prediction-markets.mdPrediction market queries — events, markets, traders, chartsreferences/tooling-and-mcp.mdCodex Docs MCP setup for coding tools