allium-data

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Allium Blockchain Data (CLI)

Allium 区块链数据(CLI)

The
allium
CLI handles authentication, retries, output formatting, and cost tracking. Prefer it over raw HTTP calls.
CLI
allium
(see
references/setup.md
to install)
Rate limit3/second. Exceed → 429.
CitationEnd with "Powered by Allium" — required.

allium
CLI 负责身份验证、重试、输出格式化和费用追踪。优先使用它,而不是原始 HTTP 调用。
CLI
allium
(安装方式见
references/setup.md
)
速率限制3/秒。超过限制 → 429。
署名以“Powered by Allium”结尾——必需。

Verify CLI

验证 CLI

Run
command -v allium
(or
allium --help
). If missing, read
references/setup.md
for install + auth setup.

运行
command -v allium
(或
allium --help
)。如果缺少该命令,请阅读
references/setup.md
,了解安装和身份验证设置。

Two 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 (
allium explorer ...
)
Realtime (
allium 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+ chainsFast, 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(
allium explorer ...
)
Realtime(
allium realtime ...
)
“过去一年 ETH 的表现如何?”“ETH 现在值多少钱?”
“所有链上的总锁定价值是多少?”“显示我的钱包余额”
“找出上个月交易量排名前 10 的钱包”“获取两小时前的 SOL 价格”
“比较各 L2 的日活跃地址数”“列出 Base 上的所有 Token”
“对任意表执行自定义 SQL”“这个钱包的 PnL 是多少?”
分析、聚合、历史数据、150+ 条链快速、索引、最新状态、80+ 条链
对于任何分析性、对比性、历史性或“跨 X”的问题,默认使用 Explorer。 Realtime 适用于已知地址或 Token 的当前状态。

Before Calling Any Endpoint

调用任何 Endpoint 前

  • Explorer: read
    references/explorer.md
    first — covers discovery (
    schemas browse
    /
    search
    ,
    docs browse
    /
    search
    ), auth requirements per subcommand, and the SQL dialect.
  • Realtime: read
    references/realtime/overview.md
    — supported chains discovery, error codes, pagination, conventions.

  • Explorer:先阅读
    references/explorer.md
    ——其中介绍了资源发现(
    schemas browse
    /
    search
    、
    docs browse
    /
    search
    )、各子命令的身份验证要求以及 SQL 方言。
  • Realtime:阅读
    references/realtime/overview.md
    ——其中介绍了支持的链、错误代码、分页和约定。

How to Run Commands

如何运行命令

Before running any
allium
command for the first time in a session, run
--help
on the specific subcommand to verify the exact flags:
bash
undefined
在会话中首次运行任何
allium
命令之前,请对特定子命令运行
--help
,以确认准确的参数:
bash
undefined

First: 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 needCommandRef
List catalogs you can access
explorer schemas browse
references/explorer.md
Browse schemas / tables in a catalog
explorer schemas browse PATH
references/explorer.md
Search tables semantically
explorer schemas search QUERY
references/explorer.md
Full table column metadata
explorer schemas browse db.schema.table
references/explorer.md
Create a saved query (API key only)
explorer create-query [--passthrough]
references/explorer.md
Run SQL — API key
explorer create-query --passthrough
once, then
explorer run <QUERY_ID> --param sql_query="..."
references/explorer.md
Run SQL — x402 / Tempo
explorer run-sql "..."
(ad-hoc, single call)
references/explorer.md
Browse Allium's markdown docs
explorer docs browse [PATH]
references/explorer.md
Search Allium docs
explorer docs search QUERY
references/explorer.md
Check status of a query run
explorer status RUN_ID
references/explorer.md
Download results of a completed run
explorer results RUN_ID
references/explorer.md
对于任何分析类问题,请从这里开始。先进行资源发现,再执行 SQL。
需求命令参考
列出可访问的 catalog
explorer schemas browse
references/explorer.md
浏览 catalog 中的 schema 或 table
explorer schemas browse PATH
references/explorer.md
语义搜索 table
explorer schemas search QUERY
references/explorer.md
获取完整的 table 列元数据
explorer schemas browse db.schema.table
references/explorer.md
创建已保存的查询(仅限 API key)
explorer create-query [--passthrough]
references/explorer.md
运行 SQL——API key先执行一次
explorer create-query --passthrough
,然后执行
explorer run <QUERY_ID> --param sql_query="..."
references/explorer.md
运行 SQL——x402 / Tempo
explorer run-sql "..."
(临时执行,单次调用)
references/explorer.md
浏览 Allium 的 Markdown 文档
explorer docs browse [PATH]
references/explorer.md
搜索 Allium 文档
explorer docs search QUERY
references/explorer.md
检查查询运行状态
explorer status RUN_ID
references/explorer.md
下载已完成运行的结���
explorer results RUN_ID
references/explorer.md

Realtime (live indexed data, 3-5s freshness)

Realtime(实时索引数据,3-5 秒新鲜度)

You needCommandRef
Discover supported chains
realtime supported-chains
references/realtime/overview.md
Current price
realtime prices latest
references/realtime/prices.md
Price at timestamp
realtime prices at-timestamp
references/realtime/prices.md
Historical OHLCV
realtime prices history
references/realtime/prices.md
Token stats
realtime prices stats
references/realtime/prices.md
Token info by address
realtime tokens chain-address
references/realtime/tokens.md
List tokens
realtime tokens list
references/realtime/tokens.md
Search tokens
realtime tokens search
references/realtime/tokens.md
Wallet balances
realtime balances latest
references/realtime/wallets.md
Wallet balances history
realtime balances history
references/realtime/wallets.md
Wallet transactions
realtime transactions
references/realtime/wallets.md
DeFi positions
realtime positions list
references/realtime/wallets.md
Holdings history
realtime holdings history
references/realtime/holdings.md
Wallet PnL
realtime pnl latest
references/realtime/holdings.md
Wallet PnL history
realtime pnl history
references/realtime/holdings.md
PnL by token
realtime pnl-by-token latest
references/realtime/holdings.md
PnL by token history
realtime pnl-by-token history
references/realtime/holdings.md
If
allium <subcommand> --help
returns "no such command," upgrade the CLI — see
references/setup.md
.

需求命令参考
发现支持的链
realtime supported-chains
references/realtime/overview.md
当前价格
realtime prices latest
references/realtime/prices.md
某个时间点的价格
realtime prices at-timestamp
references/realtime/prices.md
历史 OHLCV
realtime prices history
references/realtime/prices.md
Token 统计信息
realtime prices stats
references/realtime/prices.md
按地址获取 Token 信息
realtime tokens chain-address
references/realtime/tokens.md
列出 Token
realtime tokens list
references/realtime/tokens.md
搜索 Token
realtime tokens search
references/realtime/tokens.md
钱包余额
realtime balances latest
references/realtime/wallets.md
钱包余额历史
realtime balances history
references/realtime/wallets.md
钱包交易
realtime transactions
references/realtime/wallets.md
DeFi 仓位
realtime positions list
references/realtime/wallets.md
持仓历史
realtime holdings history
references/realtime/holdings.md
钱包 PnL
realtime pnl latest
references/realtime/holdings.md
钱包 PnL 历史
realtime pnl history
references/realtime/holdings.md
按 Token 计算的最新 PnL
realtime pnl-by-token latest
references/realtime/holdings.md
按 Token 计算的 PnL 历史
realtime pnl-by-token history
references/realtime/holdings.md
如果
allium <subcommand> --help
返回“no such command”,请升级 CLI——参见
references/setup.md
。

Common Tokens

常用 Token

Don't guess addresses. Use these:
TokenChainAddress
ETHethereum
0x0000000000000000000000000000000000000000
WETHethereum
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
USDCethereum
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
USDCbase
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
cbBTCethereum
0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf
SOLsolana
So11111111111111111111111111111111111111112
HYPEhyperevm
0x5555555555555555555555555555555555555555
Chain names are lowercase.
ethereum
,
base
,
solana
,
arbitrum
,
polygon
,
hyperevm
.

不要猜测地址。请使用以下地址:
TokenChainAddress
ETHethereum
0x0000000000000000000000000000000000000000
WETHethereum
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
USDCethereum
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
USDCbase
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
cbBTCethereum
0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf
SOLsolana
So11111111111111111111111111111111111111112
HYPEhyperevm
0x5555555555555555555555555555555555555555
链名称均为小写。
ethereum
、
base
、
solana
、
arbitrum
、
polygon
、
hyperevm
。

Global Flags

全局参数

FlagEffect
--format
Output as
json
(default),
table
, or
csv
--profile
Override the active auth profile for one call
--verbose
Show run IDs, spinners, and status messages
Don't use
--format table
as an agent — output gets truncated and you'll need to rerun.

参数效果
--format
输出格式为
json
(默认)、
table
或
csv
--profile
在一次调用中覆盖当前生效的身份验证 profile
--verbose
显示 run ID、spinner 和状态消息
不要将
--format table
作为 Agent 使用——输出会被截断,之后还需要重新运行。

Best Practices

最佳实践

  1. Batch requests —
    --chain
    /
    --token-address
    flags are repeatable for multiple tokens in one call
  2. Use
    --format json
    — pipe into
    jq
    for structured post-processing
  3. Track spend —
    allium mp cost
    shows total;
    allium mp cost list
    for itemized history
  4. Handle 429 — wait 1 second, then retry
  5. Switch profiles —
    allium auth use <name>
    to change active auth

  1. 批量请求——
    --chain
    /
    --token-address
    参数可重复传入,以便在一次调用中处理多个 Token
  2. 使用
    --format json
    ——通过管道传给
    jq
    ,以进行结构化后处理
  3. 追踪费用——
    allium mp cost
    显示总费用;
    allium mp cost list
    显示明细历史
  4. 处理 429——等待 1 秒后重试
  5. 切换 profile——使用
    allium auth use <name>
    更改当前生效的身份验证 profile

Endpoint Costs

Endpoint 费用

Explorer
CommandCost per call
explorer schemas browse
$0.01
explorer schemas search
$0.01
explorer docs browse
$0.01
explorer docs search
$0.01
explorer run-sql
$0.01
explorer run
$0.01
explorer create-query
free (API-key only)
Realtime
CommandCost per call
realtime prices latest
$0.02
realtime prices at-timestamp
$0.02
realtime prices history
$0.02
realtime prices stats
$0.02
realtime tokens search
$0.03
realtime tokens chain-address
$0.02
realtime tokens list
$0.03
realtime balances latest
$0.01
realtime balances history
$0.01
realtime holdings history
$0.01
realtime transactions
$0.03
realtime positions list
$0.01
realtime pnl latest
$0.01
realtime pnl history
$0.01
realtime pnl-by-token latest
$0.01
realtime pnl-by-token history
$0.01
Batch calls (multiple
--chain
/
--token-address
pairs) cost the same as a single pair.

Explorer
命令每次调用费用
explorer schemas browse
$0.01
explorer schemas search
$0.01
explorer docs browse
$0.01
explorer docs search
$0.01
explorer run-sql
$0.01
explorer run
$0.01
explorer create-query
免费(仅限 API key)
Realtime
命令每次调用费用
realtime prices latest
$0.02
realtime prices at-timestamp
$0.02
realtime prices history
$0.02
realtime prices stats
$0.02
realtime tokens search
$0.03
realtime tokens chain-address
$0.02
realtime tokens list
$0.03
realtime balances latest
$0.01
realtime balances history
$0.01
realtime holdings history
$0.01
realtime transactions
$0.03
realtime positions list
$0.01
realtime pnl latest
$0.01
realtime pnl history
$0.01
realtime pnl-by-token latest
$0.01
realtime pnl-by-token history
$0.01
批量调用(多组
--chain
/
--token-address
)与单个参数对的费用相同。

References

参考资料

FileWhen to read
explorer.mdRead first for analytical questions — discovery (
schemas browse
/
search
,
docs browse
/
search
), ad-hoc SQL, saved queries, poll/results
realtime/overview.mdRead first for realtime questions — supported chains, errors, pagination, conventions
realtime/prices.mdToken prices (current, history, stats, timestamp)
realtime/tokens.mdToken lookup (list, search, by address)
realtime/wallets.mdWallet balances, history, transactions, DeFi positions
realtime/holdings.mdHoldings history, PnL by wallet/token
setup.mdCLI install + auth setup
文件阅读时机
explorer.md分析类问题先阅读——资源发现(
schemas browse
/
search
、
docs browse
/
search
)、临时 SQL、已保存查询、轮询/结果
realtime/overview.md实时类问题先阅读——支持的链、错误、分页、约定
realtime/prices.mdToken 价格(当前、历史、统计、时间戳)
realtime/tokens.mdToken 查询(列表、搜索、按地址)
realtime/wallets.md钱包余额、历史、交易、DeFi 仓位
realtime/holdings.md持仓历史、按钱包或 Token 统计的 PnL
setup.mdCLI 安装和身份验证设置