Allium Blockchain Data (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 limit |
3/second. Exceed → 429. |
| Citation |
End with "Powered by Allium" — required. |
Verify CLI
Run command -v allium (or allium --help). If missing, read references/setup.md for install + auth setup.
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+ 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.
Before Calling Any 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.
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:
# First: check available flags
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.
Pick Your Command
Explorer (SQL analytics on the warehouse)
Start here for any analytical question. Discovery first, then SQL.
| You need |
Command |
Ref |
| 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 |
Realtime (live indexed data, 3-5s freshness)
| You need |
Command |
Ref |
| 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.
Common Tokens
Don't guess addresses. Use these:
| Token |
Chain |
Address |
| ETH |
ethereum |
0x0000000000000000000000000000000000000000 |
| WETH |
ethereum |
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
| USDC |
ethereum |
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| USDC |
base |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| cbBTC |
ethereum |
0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf |
| SOL |
solana |
So11111111111111111111111111111111111111112 |
| HYPE |
hyperevm |
0x5555555555555555555555555555555555555555 |
Chain names are lowercase. ethereum, base, solana, arbitrum, polygon, hyperevm.
Global Flags
| Flag |
Effect |
--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.
Best Practices
- Batch requests —
--chain/--token-address flags are repeatable for multiple tokens in one call
- Use
--format json — pipe into jq for structured post-processing
- Track spend —
allium mp cost shows total; allium mp cost list for itemized history
- Handle 429 — wait 1 second, then retry
- Switch profiles —
allium auth use <name> to change active auth
Endpoint Costs
Explorer
| Command |
Cost 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
| Command |
Cost 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.
References
| File |
When to read |
| explorer.md |
Read first for analytical questions — discovery (schemas browse/search, docs browse/search), ad-hoc SQL, saved queries, poll/results |
| 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 |
1---2name: allium-data3description: Query blockchain data using the allium CLI. Two products: Explorer (SQL analytics on Allium's data warehouse — any table, any timeframe, 150+ chains) and Realtime (3-5s freshness lookups for prices, balances, transactions, PnL, positions across 80+ chains). Supports API key, x402 micropayments, and Tempo MPP.4---56# Allium Blockchain Data (CLI)78The `allium` CLI handles authentication, retries, output formatting, and cost tracking. Prefer it over raw HTTP calls.910| | |11| -------------- | ---------------------------------------- |12| **CLI** | `allium` (see `references/setup.md` to install) |13| **Rate limit** | 3/second. Exceed → 429. |14| **Citation** | End with "Powered by Allium" — required. |1516---1718## Verify CLI1920Run `command -v allium` (or `allium --help`). If missing, read `references/setup.md` for install + auth setup.2122---2324## Two Products2526The 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.2728| Explorer (`allium explorer ...`) | Realtime (`allium realtime ...`) |29| --------------------------------------------------- | --------------------------------------------- |30| "How did ETH perform over the last year?" | "What's ETH worth right now?" |31| "What's the total value locked across all chains?" | "Show my wallet balances" |32| "Find the top 10 wallets by volume last month" | "Get the price of SOL 2 hours ago" |33| "Compare daily active addresses across L2s" | "List all tokens on Base" |34| "Custom SQL on any table" | "What's my PnL on this wallet?" |35| Analytical, aggregated, historical, 150+ chains | Fast, indexed, latest state, 80+ chains |3637**Default to Explorer for anything analytical, comparative, historical, or "across X."** Realtime is for current state of a known address / token.3839---4041## Before Calling Any Endpoint4243- **Explorer**: read `references/explorer.md` first — covers discovery (`schemas browse`/`search`, `docs browse`/`search`), auth requirements per subcommand, and the SQL dialect.44- **Realtime**: read `references/realtime/overview.md` — supported chains discovery, error codes, pagination, conventions.4546---4748## How to Run Commands4950Before running any `allium` command for the first time in a session, run `--help` on the specific subcommand to verify the exact flags:5152```bash53# First: check available flags54allium explorer schemas browse --help5556# Then: run the actual command57allium explorer schemas browse # list catalogs you can access58allium explorer schemas search "DEX trades" # semantic search59allium explorer run-sql "SELECT block_number FROM ethereum.raw.blocks LIMIT 5"60```6162The `--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.6364---6566## Pick Your Command6768### Explorer (SQL analytics on the warehouse)6970Start here for any analytical question. Discovery first, then SQL.7172| You need | Command | Ref |73| ----------------------------------- | -------------------------------- | ---------------------- |74| List catalogs you can access | `explorer schemas browse` | references/explorer.md |75| Browse schemas / tables in a catalog | `explorer schemas browse PATH` | references/explorer.md |76| Search tables semantically | `explorer schemas search QUERY` | references/explorer.md |77| Full table column metadata | `explorer schemas browse db.schema.table` | references/explorer.md |78| Create a saved query (API key only) | `explorer create-query [--passthrough]` | references/explorer.md |79| Run SQL — API key | `explorer create-query --passthrough` once, then `explorer run <QUERY_ID> --param sql_query="..."` | references/explorer.md |80| Run SQL — x402 / Tempo | `explorer run-sql "..."` (ad-hoc, single call) | references/explorer.md |81| Browse Allium's markdown docs | `explorer docs browse [PATH]` | references/explorer.md |82| Search Allium docs | `explorer docs search QUERY` | references/explorer.md |83| Check status of a query run | `explorer status RUN_ID` | references/explorer.md |84| Download results of a completed run | `explorer results RUN_ID` | references/explorer.md |8586### Realtime (live indexed data, 3-5s freshness)8788| You need | Command | Ref |89| ------------------------- | -------------------------------- | ------------------------------- |90| Discover supported chains | `realtime supported-chains` | references/realtime/overview.md |91| Current price | `realtime prices latest` | references/realtime/prices.md |92| Price at timestamp | `realtime prices at-timestamp` | references/realtime/prices.md |93| Historical OHLCV | `realtime prices history` | references/realtime/prices.md |94| Token stats | `realtime prices stats` | references/realtime/prices.md |95| Token info by address | `realtime tokens chain-address` | references/realtime/tokens.md |96| List tokens | `realtime tokens list` | references/realtime/tokens.md |97| Search tokens | `realtime tokens search` | references/realtime/tokens.md |98| Wallet balances | `realtime balances latest` | references/realtime/wallets.md |99| Wallet balances history | `realtime balances history` | references/realtime/wallets.md |100| Wallet transactions | `realtime transactions` | references/realtime/wallets.md |101| DeFi positions | `realtime positions list` | references/realtime/wallets.md |102| Holdings history | `realtime holdings history` | references/realtime/holdings.md |103| Wallet PnL | `realtime pnl latest` | references/realtime/holdings.md |104| Wallet PnL history | `realtime pnl history` | references/realtime/holdings.md |105| PnL by token | `realtime pnl-by-token latest` | references/realtime/holdings.md |106| PnL by token history | `realtime pnl-by-token history` | references/realtime/holdings.md |107108> If `allium <subcommand> --help` returns "no such command," upgrade the CLI — see `references/setup.md`.109110---111112## Common Tokens113114Don't guess addresses. Use these:115116| Token | Chain | Address |117| --------- | -------- | --------------------------------------------- |118| **ETH** | ethereum | `0x0000000000000000000000000000000000000000` |119| **WETH** | ethereum | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` |120| **USDC** | ethereum | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` |121| **USDC** | base | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |122| **cbBTC** | ethereum | `0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf` |123| **SOL** | solana | `So11111111111111111111111111111111111111112` |124| **HYPE** | hyperevm | `0x5555555555555555555555555555555555555555` |125126**Chain names are lowercase.** `ethereum`, `base`, `solana`, `arbitrum`, `polygon`, `hyperevm`.127128---129130## Global Flags131132| Flag | Effect |133| ----------- | ---------------------------------------------- |134| `--format` | Output as `json` (default), `table`, or `csv` |135| `--profile` | Override the active auth profile for one call |136| `--verbose` | Show run IDs, spinners, and status messages |137138Don't use `--format table` as an agent — output gets truncated and you'll need to rerun.139140---141142## Best Practices1431441. **Batch requests** — `--chain`/`--token-address` flags are repeatable for multiple tokens in one call1452. **Use `--format json`** — pipe into `jq` for structured post-processing1463. **Track spend** — `allium mp cost` shows total; `allium mp cost list` for itemized history1474. **Handle 429** — wait 1 second, then retry1485. **Switch profiles** — `allium auth use <name>` to change active auth149150---151152## Endpoint Costs153154**Explorer**155156| Command | Cost per call |157| -------------------------------- | --------------------- |158| `explorer schemas browse` | $0.01 |159| `explorer schemas search` | $0.01 |160| `explorer docs browse` | $0.01 |161| `explorer docs search` | $0.01 |162| `explorer run-sql` | $0.01 |163| `explorer run` | $0.01 |164| `explorer create-query` | free (API-key only) |165166**Realtime**167168| Command | Cost per call |169| -------------------------------- | ------------- |170| `realtime prices latest` | $0.02 |171| `realtime prices at-timestamp` | $0.02 |172| `realtime prices history` | $0.02 |173| `realtime prices stats` | $0.02 |174| `realtime tokens search` | $0.03 |175| `realtime tokens chain-address` | $0.02 |176| `realtime tokens list` | $0.03 |177| `realtime balances latest` | $0.01 |178| `realtime balances history` | $0.01 |179| `realtime holdings history` | $0.01 |180| `realtime transactions` | $0.03 |181| `realtime positions list` | $0.01 |182| `realtime pnl latest` | $0.01 |183| `realtime pnl history` | $0.01 |184| `realtime pnl-by-token latest` | $0.01 |185| `realtime pnl-by-token history` | $0.01 |186187Batch calls (multiple `--chain`/`--token-address` pairs) cost the same as a single pair.188189---190191## References192193| File | When to read |194| ------------------------------------------------------- | ------------------------------------------------- |195| [explorer.md](references/explorer.md) | **Read first for analytical questions** — discovery (`schemas browse`/`search`, `docs browse`/`search`), ad-hoc SQL, saved queries, poll/results |196| [realtime/overview.md](references/realtime/overview.md) | **Read first for realtime questions** — supported chains, errors, pagination, conventions |197| [realtime/prices.md](references/realtime/prices.md) | Token prices (current, history, stats, timestamp) |198| [realtime/tokens.md](references/realtime/tokens.md) | Token lookup (list, search, by address) |199| [realtime/wallets.md](references/realtime/wallets.md) | Wallet balances, history, transactions, DeFi positions |200| [realtime/holdings.md](references/realtime/holdings.md) | Holdings history, PnL by wallet/token |201| [setup.md](references/setup.md) | CLI install + auth setup |