Codex Supergraph Data
Authentication
Pass $CODEX_API_KEY in the Authorization header if available. 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.
Summary
Use this skill to produce valid Codex GraphQL requests using API key authentication.
| |
|---|
| HTTP endpoint | INLINECODE3 |
| WebSocket endpoint |
wss://graph.codex.io/graphql |
| Schema (SDL) |
https://graph.codex.io/schema/latest.graphql |
| Introspection JSON |
https://graph.codex.io/schema/latest.json |
| API-key auth |
Authorization: <key> or
Authorization: Bearer <token> |
Session preflight (required)
Run once and cache:
CODEBLOCK0
Use network IDs from this result before expensive requests.
Operation selection
| Need | Operation |
|---|
| Networks | INLINECODE9 |
| Token discovery/search |
filterTokens |
| Trending tokens |
filterTokens with
trendingScore24 ranking |
| Token prices |
getTokenPrices |
| Pairs for a token |
listPairsWithMetadataForToken |
| Pair metadata |
pairMetadata |
| Pair OHLCV |
getBars |
| Token OHLCV |
getTokenBars |
| Token events |
getTokenEvents |
| Maker events |
getTokenEventsForMaker |
| Wallet leaders |
filterTokenWallets |
| Wallet chart/stats |
walletChart,
detailedWalletStats |
| Holders |
holders |
| Top-10 concentration |
top10HoldersPercent |
| Live single price |
onPriceUpdated |
| Live multi-price |
onPricesUpdated |
| Live token events |
onTokenEventsCreated,
onEventsCreatedByMaker |
| Live bars/pairs |
onBarsUpdated,
onPairMetadataUpdated,
onTokenBarsUpdated |
| Launchpad streams |
onLaunchpadTokenEventBatch,
onLaunchpadTokenEvent |
| Unconfirmed Solana events |
onUnconfirmedEventsCreated |
| Short-lived keys |
createApiTokens,
apiTokens,
apiToken,
deleteApiToken |
| Prediction event discovery |
filterPredictionEvents |
| Prediction market discovery |
filterPredictionMarkets |
| Prediction event detail |
detailedPredictionEventStats |
| Prediction market chart |
predictionMarketBars |
| Prediction multi-market chart |
predictionEventTopMarketsBars |
| Prediction event chart |
predictionEventBars |
| Prediction trades |
predictionTrades |
| Prediction token holders |
predictionTokenHolders |
| Prediction categories |
predictionCategories |
| Prediction trader leaderboard |
filterPredictionTraders |
| Prediction trader profile |
detailedPredictionTraderStats |
| Prediction trader positions |
filterPredictionTraderMarkets |
| Prediction trader chart |
predictionTraderBars |
Default discovery path: start with filterTokens.
Rules
- - Never print raw API keys.
- Validate
networkId first. - Keep selection sets minimal until shape is confirmed.
- Use
onPricesUpdated instead of many single-token subscriptions.
References
Query + websocket templates with examples |
|
references/endpoint-playbook.md | Operation selection heuristics by intent |
|
references/apis.md | Endpoint/auth matrix, pagination, rate limits |
|
references/prediction-markets.md | Prediction market queries — events, markets, traders, charts |
|
references/tooling-and-mcp.md | Codex Docs MCP setup for coding tools |
Codex Supergraph 数据
身份验证
如果可用,在 Authorization 标头中传递 $CODEXAPIKEY。如果服务器返回 402 Payment Required,则使用 codex-gateway 技能处理支付流程。
如果此技能同时存在本地副本和全局副本,则本地副本优先。
摘要
使用此技能通过 API 密钥身份验证生成有效的 Codex GraphQL 请求。
| |
|---|
| HTTP 端点 | https://graph.codex.io/graphql |
| WebSocket 端点 |
wss://graph.codex.io/graphql |
| 模式 (SDL) | https://graph.codex.io/schema/latest.graphql |
| 自省 JSON | https://graph.codex.io/schema/latest.json |
| API 密钥认证 | Authorization:
或 Authorization: Bearer |
会话预检(必需)
运行一次并缓存:
bash
curl -sS https://graph.codex.io/graphql \
-H Content-Type: application/json \
-H Authorization: $CODEXAPIKEY \
--data-binary {query:query GetNetworks { getNetworks { id name } }}
在昂贵请求之前使用此结果中的网络 ID。
操作选择
filterTokens |
| 热门代币 | filterTokens 使用 trendingScore24 排名 |
| 代币价格 | getTokenPrices |
| 代币的交易对 | listPairsWithMetadataForToken |
| 交易对元数据 | pairMetadata |
| 交易对 OHLCV | getBars |
| 代币 OHLCV | getTokenBars |
| 代币事件 | getTokenEvents |
| 做市商事件 | getTokenEventsForMaker |
| 钱包领导者 | filterTokenWallets |
| 钱包图表/统计 | walletChart, detailedWalletStats |
| 持有者 | holders |
| 前十集中度 | top10HoldersPercent |
| 实时单价格 | onPriceUpdated |
| 实时多价格 | onPricesUpdated |
| 实时代币事件 | onTokenEventsCreated, onEventsCreatedByMaker |
| 实时柱状图/交易对 | onBarsUpdated, onPairMetadataUpdated, onTokenBarsUpdated |
| 启动板流 | onLaunchpadTokenEventBatch, onLaunchpadTokenEvent |
| 未确认的 Solana 事件 | onUnconfirmedEventsCreated |
| 短期密钥 | createApiTokens, apiTokens, apiToken, deleteApiToken |
| 预测事件发现 | filterPredictionEvents |
| 预测市场发现 | filterPredictionMarkets |
| 预测事件详情 | detailedPredictionEventStats |
| 预测市场图表 | predictionMarketBars |
| 预测多市场图表 | predictionEventTopMarketsBars |
| 预测事件图表 | predictionEventBars |
| 预测交易 | predictionTrades |
| 预测代币持有者 | predictionTokenHolders |
| 预测类别 | predictionCategories |
| 预测交易者排行榜 | filterPredictionTraders |
| 预测交易者资料 | detailedPredictionTraderStats |
| 预测交易者持仓 | filterPredictionTraderMarkets |
| 预测交易者图表 | predictionTraderBars |
默认发现路径:从 filterTokens 开始。
规则
- - 切勿打印原始 API 密钥。
- 首先验证 networkId。
- 在确认形状之前保持选择集最小。
- 使用 onPricesUpdated 替代多个单代币订阅。
参考
查询 + WebSocket 模板及示例 |
| references/endpoint-playbook.md | 按意图的操作选择启发式方法 |
| references/apis.md | 端点/认证矩阵、分页、速率限制 |
| references/prediction-markets.md | 预测市场查询 — 事件、市场、交易者、图表 |
| references/tooling-and-mcp.md | 用于编码工具的 Codex Docs MCP 设置 |