allium-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAllium Blockchain Data (CLI)
Allium 区块链数据(CLI)
The CLI handles authentication, retries, output formatting, and cost tracking. Prefer it over raw HTTP calls.
allium| CLI | |
| Rate limit | 3/second. Exceed → 429. |
| Citation | End with "Powered by Allium" — required. |
allium| CLI | |
| 速率限制 | 3/秒。超过限制 → 429。 |
| 署名 | 以“Powered by Allium”结尾——必需。 |
Verify CLI
验证 CLI
Run (or ). If missing, read for install + auth setup.
command -v alliumallium --helpreferences/setup.md运行 (或 )。如果缺少该命令,请阅读 ,了解安装和身份验证设置。
command -v alliumallium --helpreferences/setup.mdTwo Products
两款产品
The CLI exposes Explorer (SQL analytics on Allium's full data warehouse) and Realtime (3-5s freshness lookups). Both are first-class — pick by the question.
Explorer ( | Realtime ( |
|---|---|
| "How did ETH perform over the last year?" | "What's ETH worth right now?" |
| "What's the total value locked across all chains?" | "Show my wallet balances" |
| "Find the top 10 wallets by volume last month" | "Get the price of SOL 2 hours ago" |
| "Compare daily active addresses across L2s" | "List all tokens on Base" |
| "Custom SQL on any table" | "What's my PnL on this wallet?" |
| Analytical, aggregated, historical, 150+ chains | Fast, indexed, latest state, 80+ chains |
Default to Explorer for anything analytical, comparative, historical, or "across X." Realtime is for current state of a known address / token.
CLI 提供 Explorer(基于 Allium 完整数据仓库的 SQL 分析)和 Realtime(3-5 秒新鲜度查询)。两者均为一级能力——应根据具体问题选择。
Explorer( | Realtime( |
|---|---|
| “过去一年 ETH 的表现如何?” | “ETH 现在值多少钱?” |
| “所有链上的总锁定价值是多少?” | “显示我的钱包余额” |
| “找出上个月交易量排名前 10 的钱包” | “获取两小时前的 SOL 价格” |
| “比较各 L2 的日活跃地址数” | “列出 Base 上的所有 Token” |
| “对任意表执行自定义 SQL” | “这个钱包的 PnL 是多少?” |
| 分析、聚合、历史数据、150+ 条链 | 快速、索引、最新状态、80+ 条链 |
对于任何分析性、对比性、历史性或“跨 X”的问题,默认使用 Explorer。 Realtime 适用于已知地址或 Token 的当前状态。
Before Calling Any Endpoint
调用任何 Endpoint 前
- Explorer: read first — covers discovery (
references/explorer.md/schemas browse,search/docs browse), auth requirements per subcommand, and the SQL dialect.search - Realtime: read — supported chains discovery, error codes, pagination, conventions.
references/realtime/overview.md
- Explorer:先阅读 ——其中介绍了资源发现(
references/explorer.md/schemas browse、search/docs browse)、各子命令的身份验证要求以及 SQL 方言。search - Realtime:阅读 ——其中介绍了支持的链、错误代码、分页和约定。
references/realtime/overview.md
How to Run Commands
如何运行命令
Before running any command for the first time in a session, run on the specific subcommand to verify the exact flags:
allium--helpbash
undefined在会话中首次运行任何 命令之前,请对特定子命令运行 ,以确认准确的参数:
allium--helpbash
undefinedFirst: check available flags
首先:检查可用参数
allium explorer schemas browse --help
allium explorer schemas browse --help
Then: run the actual command
然后:运行实际命令
allium explorer schemas browse # list catalogs you can access
allium explorer schemas search "DEX trades" # semantic search
allium explorer run-sql "SELECT block_number FROM ethereum.raw.blocks LIMIT 5"
The `--help` output is always authoritative — flag names and required parameters vary per subcommand, and reference docs may not cover every option. Do this once per subcommand and reuse.
---allium explorer schemas browse # 列出可访问的 catalog
allium explorer schemas search "DEX trades" # 语义搜索
allium explorer run-sql "SELECT block_number FROM ethereum.raw.blocks LIMIT 5"
`--help` 输出始终是权威依据——参数名称和必填参数会因子命令而异,参考文档可能未涵盖每个选项。每个子命令执行一次即可,然后复用。
---Pick Your Command
选择命令
Explorer (SQL analytics on the warehouse)
Explorer(数据仓库上的 SQL 分析)
Start here for any analytical question. Discovery first, then SQL.
| You need | Command | Ref |
|---|---|---|
| List catalogs you can access | | references/explorer.md |
| Browse schemas / tables in a catalog | | references/explorer.md |
| Search tables semantically | | references/explorer.md |
| Full table column metadata | | references/explorer.md |
| Create a saved query (API key only) | | references/explorer.md |
| Run SQL — API key | | references/explorer.md |
| Run SQL — x402 / Tempo | | references/explorer.md |
| Browse Allium's markdown docs | | references/explorer.md |
| Search Allium docs | | references/explorer.md |
| Check status of a query run | | references/explorer.md |
| Download results of a completed run | | references/explorer.md |
对于任何分析类问题,请从这里开始。先进行资源发现,再执行 SQL。
| 需求 | 命令 | 参考 |
|---|---|---|
| 列出可访问的 catalog | | references/explorer.md |
| 浏览 catalog 中的 schema 或 table | | references/explorer.md |
| 语义搜索 table | | references/explorer.md |
| 获取完整的 table 列元数据 | | references/explorer.md |
| 创建已保存的查询(仅限 API key) | | references/explorer.md |
| 运行 SQL——API key | 先执行一次 | references/explorer.md |
| 运行 SQL——x402 / Tempo | | references/explorer.md |
| 浏览 Allium 的 Markdown 文档 | | references/explorer.md |
| 搜索 Allium 文档 | | references/explorer.md |
| 检查查询运行状态 | | references/explorer.md |
| 下载已完成运行的结��� | | references/explorer.md |
Realtime (live indexed data, 3-5s freshness)
Realtime(实时索引数据,3-5 秒新鲜度)
| You need | Command | Ref |
|---|---|---|
| Discover supported chains | | references/realtime/overview.md |
| Current price | | references/realtime/prices.md |
| Price at timestamp | | references/realtime/prices.md |
| Historical OHLCV | | references/realtime/prices.md |
| Token stats | | references/realtime/prices.md |
| Token info by address | | references/realtime/tokens.md |
| List tokens | | references/realtime/tokens.md |
| Search tokens | | references/realtime/tokens.md |
| Wallet balances | | references/realtime/wallets.md |
| Wallet balances history | | references/realtime/wallets.md |
| Wallet transactions | | references/realtime/wallets.md |
| DeFi positions | | references/realtime/wallets.md |
| Holdings history | | references/realtime/holdings.md |
| Wallet PnL | | references/realtime/holdings.md |
| Wallet PnL history | | references/realtime/holdings.md |
| PnL by token | | references/realtime/holdings.md |
| PnL by token history | | references/realtime/holdings.md |
Ifreturns "no such command," upgrade the CLI — seeallium <subcommand> --help.references/setup.md
| 需求 | 命令 | 参考 |
|---|---|---|
| 发现支持的链 | | references/realtime/overview.md |
| 当前价格 | | references/realtime/prices.md |
| 某个时间点的价格 | | references/realtime/prices.md |
| 历史 OHLCV | | references/realtime/prices.md |
| Token 统计信息 | | references/realtime/prices.md |
| 按地址获取 Token 信息 | | references/realtime/tokens.md |
| 列出 Token | | references/realtime/tokens.md |
| 搜索 Token | | references/realtime/tokens.md |
| 钱包余额 | | references/realtime/wallets.md |
| 钱包余额历史 | | references/realtime/wallets.md |
| 钱包交易 | | references/realtime/wallets.md |
| DeFi 仓位 | | references/realtime/wallets.md |
| 持仓历史 | | references/realtime/holdings.md |
| 钱包 PnL | | references/realtime/holdings.md |
| 钱包 PnL 历史 | | references/realtime/holdings.md |
| 按 Token 计算的最新 PnL | | references/realtime/holdings.md |
| 按 Token 计算的 PnL 历史 | | references/realtime/holdings.md |
如果返回“no such command”,请升级 CLI——参见allium <subcommand> --help。references/setup.md
Common Tokens
常用 Token
Don't guess addresses. Use these:
| Token | Chain | Address |
|---|---|---|
| ETH | ethereum | |
| WETH | ethereum | |
| USDC | ethereum | |
| USDC | base | |
| cbBTC | ethereum | |
| SOL | solana | |
| HYPE | hyperevm | |
Chain names are lowercase. , , , , , .
ethereumbasesolanaarbitrumpolygonhyperevm不要猜测地址。请使用以下地址:
| Token | Chain | Address |
|---|---|---|
| ETH | ethereum | |
| WETH | ethereum | |
| USDC | ethereum | |
| USDC | base | |
| cbBTC | ethereum | |
| SOL | solana | |
| HYPE | hyperevm | |
链名称均为小写。 、、、、、。
ethereumbasesolanaarbitrumpolygonhyperevmGlobal Flags
全局参数
| Flag | Effect |
|---|---|
| Output as |
| Override the active auth profile for one call |
| Show run IDs, spinners, and status messages |
Don't use as an agent — output gets truncated and you'll need to rerun.
--format table| 参数 | 效果 |
|---|---|
| 输出格式为 |
| 在一次调用中覆盖当前生效的身份验证 profile |
| 显示 run ID、spinner 和状态消息 |
不要将 作为 Agent 使用——输出会被截断,之后还需要重新运行。
--format tableBest Practices
最佳实践
- Batch requests — /
--chainflags are repeatable for multiple tokens in one call--token-address - Use — pipe into
--format jsonfor structured post-processingjq - Track spend — shows total;
allium mp costfor itemized historyallium mp cost list - Handle 429 — wait 1 second, then retry
- Switch profiles — to change active auth
allium auth use <name>
- 批量请求——/
--chain参数可重复传入,以便在一次调用中处理多个 Token--token-address - 使用 ——通过管道传给
--format json,以进行结构化后处理jq - 追踪费用——显示总费用;
allium mp cost显示明细历史allium mp cost list - 处理 429——等待 1 秒后重试
- 切换 profile——使用 更改当前生效的身份验证 profile
allium auth use <name>
Endpoint Costs
Endpoint 费用
Explorer
| Command | Cost per call |
|---|---|
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| free (API-key only) |
Realtime
| Command | Cost per call |
|---|---|
| $0.02 |
| $0.02 |
| $0.02 |
| $0.02 |
| $0.03 |
| $0.02 |
| $0.03 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.03 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
Batch calls (multiple / pairs) cost the same as a single pair.
--chain--token-addressExplorer
| 命令 | 每次调用费用 |
|---|---|
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| 免费(仅限 API key) |
Realtime
| 命令 | 每次调用费用 |
|---|---|
| $0.02 |
| $0.02 |
| $0.02 |
| $0.02 |
| $0.03 |
| $0.02 |
| $0.03 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.03 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
| $0.01 |
批量调用(多组 /)与单个参数对的费用相同。
--chain--token-addressReferences
参考资料
| File | When to read |
|---|---|
| explorer.md | Read first for analytical questions — discovery ( |
| realtime/overview.md | Read first for realtime questions — supported chains, errors, pagination, conventions |
| realtime/prices.md | Token prices (current, history, stats, timestamp) |
| realtime/tokens.md | Token lookup (list, search, by address) |
| realtime/wallets.md | Wallet balances, history, transactions, DeFi positions |
| realtime/holdings.md | Holdings history, PnL by wallet/token |
| setup.md | CLI install + auth setup |
| 文件 | 阅读时机 |
|---|---|
| explorer.md | 分析类问题先阅读——资源发现( |
| realtime/overview.md | 实时类问题先阅读——支持的链、错误、分页、约定 |
| realtime/prices.md | Token 价格(当前、历史、统计、时间戳) |
| realtime/tokens.md | Token 查询(列表、搜索、按地址) |
| realtime/wallets.md | 钱包余额、历史、交易、DeFi 仓位 |
| realtime/holdings.md | 持仓历史、按钱包或 Token 统计的 PnL |
| setup.md | CLI 安装和身份验证设置 |