codex-supergraph

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex Supergraph Data

Codex Supergraph 数据

API Key Guard

API密钥校验

This skill requires a valid
CODEX_API_KEY
. When the key is missing or empty, fall back to the codex-mpp skill instead — do not attempt keyless requests or public endpoints unless the user explicitly asks for one. Check for the key before making any network calls.
Switching back: If a user later provides a key and asks to use this skill, re-check at that point. A key simply appearing in the environment does not auto-activate this skill.
If both a local and global copy of this skill exist, the local copy takes precedence.
本技能需要有效的
CODEX_API_KEY
。当密钥缺失或为空时,请切换至codex-mpp技能——除非用户明确要求,否则请勿尝试无密钥请求或使用公开端点。在发起任何网络请求前,请先检查密钥是否存在。
切换回本技能:若用户后续提供了密钥并要求使用本技能,请再次检查密钥。仅当密钥出现在环境中不会自动激活本技能。
若本技能同时存在本地副本和全局副本,本地副本优先。

Summary

概述

Use this skill to produce valid Codex GraphQL requests using API key authentication.
HTTP endpoint
https://graph.codex.io/graphql
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>
使用本技能可生成经过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: <key>
Authorization: Bearer <token>

Authentication

认证方式

  • Use
    Authorization: <key>
    or
    Authorization: Bearer <token>
    for all queries, mutations, and subscriptions.
  • If the user already has a valid key, use this path.
  • 所有查询、变更和订阅请求均需使用
    Authorization: <key>
    Authorization: Bearer <token>
    进行认证。
  • 若用户已持有有效密钥,请使用此方式。

Session preflight (required)

会话预检(必填)

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.
运行一次并缓存结果:
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 } }"}'
在发起高开销请求前,请使用此结果中的网络ID。

Operation selection

操作选择

NeedOperation
Networks
getNetworks
Token discovery/search
filterTokens
Token prices
getTokenPrices
Pair metadata
pairMetadata
Pair OHLCV
getBars
Token OHLCV
getTokenBars
Maker events
getTokenEventsForMaker
Holders
holders
Top-10 concentration
top10HoldersPercent
Live single price
onPriceUpdated
Live multi-price
onPricesUpdated
Live bars/pairs
onBarsUpdated
,
onPairMetadataUpdated
,
onTokenBarsUpdated
Short-lived keys
createApiTokens
,
apiTokens
,
apiToken
,
deleteApiToken
Default discovery path: start with
filterTokens
.
需求操作
网络
getNetworks
代币发现/搜索
filterTokens
代币价格
getTokenPrices
交易对元数据
pairMetadata
交易对OHLCV
getBars
代币OHLCV
getTokenBars
做市商事件
getTokenEventsForMaker
持有者
holders
前10持有者集中度
top10HoldersPercent
实时单代币价格
onPriceUpdated
实时多代币价格
onPricesUpdated
实时K线/交易对
onBarsUpdated
,
onPairMetadataUpdated
,
onTokenBarsUpdated
短期密钥
createApiTokens
,
apiTokens
,
apiToken
,
deleteApiToken
默认发现路径:从
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.
  • 绝不要打印原始API密钥。
  • 先验证
    networkId
    的有效性。
  • 在确认数据结构前,保持选择集最小化。
  • 优先使用
    onPricesUpdated
    而非多个单代币订阅。

References

参考资料

FilePurpose
references/apis.mdEndpoint/auth matrix, constraints, errors
references/query-templates.mdQuery + websocket templates
references/endpoint-playbook.mdOperation selection heuristics by intent
references/tooling-and-mcp.mdCodex Docs MCP setup for coding tools
文件用途
references/apis.md端点/认证矩阵、约束条件、错误信息
references/query-templates.md查询及WebSocket模板
references/endpoint-playbook.md基于需求意图的操作选择指南
references/tooling-and-mcp.md为编码工具配置Codex Docs MCP