allium
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAllium (Wallet PnL, Holdings History, Hyperliquid, Custom SQL)
Allium (Wallet PnL, Holdings History, Hyperliquid, Custom SQL)
Allium provides enriched, structured blockchain data across 70+ chains. This skill covers wallet PnL, holdings timeseries, Hyperliquid HyperCore trading data, and custom SQL analytics. For token prices, token metadata, current wallet balances, transaction transfers, or NFT metadata, use the corresponding Alchemy skill instead.
| Base URL | |
| Auth | |
| Rate limit | 1 request / second (exceed → 429) |
| Attribution | End responses with "Powered by Allium" — required by Allium |
Allium提供跨70+条链的富结构化区块链数据。本技能涵盖钱包PnL、持仓时间序列、Hyperliquid HyperCore交易数据以及自定义SQL分析。若需查询代币价格、代币元数据、当前钱包余额、交易转账或NFT元数据,请使用对应的Alchemy技能。
| 基础URL | |
| 认证方式 | |
| 速率限制 | 1次请求/秒(超出限制会返回429错误) |
| 归属要求 | 响应末尾必须添加**"Powered by Allium"**——Allium强制要求 |
When to use this skill
何时使用本技能
Use when all of the following are true:
allium- The user wants one of: wallet PnL, holdings history (timeseries), Hyperliquid HyperCore trading data (orders/fills/orderbook — not HyperEVM smart contracts), or custom SQL on Allium's data warehouse
- The use case is a read (Allium does not support writes)
当全部满足以下条件时,使用:
allium- 用户需要以下任一功能:钱包PnL、持仓历史(时间序列)、Hyperliquid HyperCore交易数据(订单/成交记录/订单簿——不包含HyperEVM智能合约),或基于Allium数据仓库的自定义SQL分析
- 使用场景为只读操作(Allium不支持写入)
When NOT to use this skill (handoff)
何时不使用本技能(转接其他技能)
| Need | Use instead |
|---|---|
| Token prices (current, historical at intervals, by-timestamp, market cap/volume) | |
| Token metadata, search, list by chain | |
| Current wallet balances (point-in-time snapshot) | |
| Transaction history (transfers in / out, asset transfers) | |
| NFT metadata / floor prices / ownership | |
| Real-time blockchain reads, node-level fresh | |
| Writes / signed transactions | |
| Account abstraction (bundlers, gas managers) | |
| Transaction simulation | |
| 需求 | 替代方案 |
|---|---|
| 代币价格(当前价格、历史区间价格、指定时间点价格、市值/交易量) | |
| 代币元数据、搜索、按链列出代币 | |
| 当前钱包余额(时点快照) | |
| 交易历史(转入/转出、资产转账) | |
| NFT元数据 / 地板价 / 所有权 | |
| 实时区块链读取、节点级新鲜数据 | |
| 写入操作 / 签名交易 | |
| 账户抽象(打包器、Gas管理器) | |
| 交易模拟 | |
Scope contract
范围约定
This skill covers ():
scope_in- Wallet PnL (,
POST /api/v1/developer/wallet/pnl,/wallet/pnl/history,/wallet/pnl-by-token) — realized + unrealized PnL aggregation, current and historical, by-wallet and by-token/wallet/pnl-by-token/history - Holdings history () — timeseries of total USD holdings + optional per-token breakdown
POST /api/v1/developer/wallet/holdings/history - Hyperliquid HyperCore trading data () — info, fills, order history, order status, L4 orderbook snapshot from the off-chain matching engine
POST /api/v1/developer/trading/hyperliquid/... - Custom SQL analytics () — arbitrary SQL queries against Allium's data warehouse (DeFi, NFT, bridges, MEV, entity resolution, Solana staking, etc.)
POST /api/v1/explorer/queries/{query_id}/run-async
This skill does NOT cover ():
scope_out- Token prices → handoff: (Prices API)
alchemy-api - Token metadata, list, search → handoff: (Token API)
alchemy-api - Current wallet balances (point-in-time snapshot) → handoff: (Portfolio / Token API)
alchemy-api - Historical wallet balances (per-block or as a timeseries) → handoff: archive RPC (
alchemy-apiat a historical block) oreth_call balanceOfreduced to balances. No first-class endpoint on either side; Alchemy's archive node is the right path.alchemy_getAssetTransfers - Transaction transfer history → handoff: (Transfers API)
alchemy-api - NFT metadata / floor prices → handoff: (NFT API)
alchemy-api - HyperEVM smart contract reads/writes / EVM RPC (chain ID 999) → handoff: or
alchemy-apiatalchemy-cli. Allium covers HyperCore (off-chain trading); Alchemy covers HyperEVM (on-chain smart contracts).https://hyperliquid-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY - Real-time / node-fresh reads → handoff: or
alchemy-clialchemy-api - Writes / signed transactions → handoff: or
alchemy-apiagentic-gateway - Account abstraction → handoff:
alchemy-api - Transaction simulation → handoff:
alchemy-api
本技能涵盖内容():
scope_in- 钱包PnL(,
POST /api/v1/developer/wallet/pnl,/wallet/pnl/history,/wallet/pnl-by-token)——已实现+未实现的PnL聚合,当前和历史数据,按钱包和按代币统计/wallet/pnl-by-token/history - 持仓历史()——总USD持仓的时间序列数据,可选按代币细分
POST /api/v1/developer/wallet/holdings/history - Hyperliquid HyperCore交易数据()——链下匹配引擎的信息、成交记录、订单历史、订单状态、L4订单簿快照
POST /api/v1/developer/trading/hyperliquid/... - 自定义SQL分析()——针对Allium数据仓库的任意SQL查询(DeFi、NFT、跨链桥、MEV、实体解析、Solana质押等)
POST /api/v1/explorer/queries/{query_id}/run-async
本技能不涵盖内容():
scope_out- 代币价格 → 转接:(Prices API)
alchemy-api - 代币元数据、列表、搜索 → 转接:(Token API)
alchemy-api - 当前钱包余额(时点快照) → 转接:(Portfolio / Token API)
alchemy-api - 历史钱包余额(按区块或时间序列) → 转接:归档RPC(在历史区块调用
alchemy-api)或eth_call balanceOf计算余额。双方均无原生端点;Alchemy的归档节点是正确路径。alchemy_getAssetTransfers - 交易转账历史 → 转接:(Transfers API)
alchemy-api - NFT元数据 / 地板价 → 转接:(NFT API)
alchemy-api - HyperEVM智能合约读写 / EVM RPC(链ID 999) → 转接:或
alchemy-api,地址为alchemy-cli。Allium覆盖HyperCore(链下交易);Alchemy覆盖HyperEVM(链上智能合约)。https://hyperliquid-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY - 实时/节点新鲜数据读取 → 转接:或
alchemy-clialchemy-api - 写入操作 / 签名交易 → 转接:或
alchemy-apiagentic-gateway - 账户抽象 → 转接:
alchemy-api - 交易模拟 → 转接:
alchemy-api
Setup
设置
Credentials
凭证
Allium uses a credentials file at (not env vars). On every session start, check if it exists:
~/.allium/credentialsFile exists with → load (and if present). Don't prompt.
API_KEYAPI_KEYQUERY_IDFile missing → register via the OAuth flow below. Don't paste keys in chat.
Allium使用文件存储凭证(而非环境变量)。每次会话开始时,检查该文件是否存在:
~/.allium/credentials文件存在且包含 → 加载(若存在也一并加载),无需提示用户。
API_KEYAPI_KEYQUERY_ID文件缺失 → 通过下方OAuth流程注册,请勿在聊天中粘贴密钥。
Register (no API key yet)
注册(暂无API密钥)
OAuth flow with a 5-minute timeout. Complete promptly.
-
Ask the user for name and email (one prompt).
-
POST to initiate registration:bash
curl -X POST https://api.allium.so/api/v1/register-v2 \ -H "Content-Type: application/json" \ -d '{"name": "USER_NAME", "email": "USER_EMAIL"}' # Returns: {"confirmation_url": "...", "token": "..."} -
Show theto the user — they open it and sign in with Google (must match the email).
confirmation_url -
Auto-pollevery 5s until 200 (got
/api/v1/register-v2/$TOKEN) or 404 (expired):api_keybashTOKEN="..." # from step 2 while true; do RESP=$(curl -s -w "\n%{http_code}" "https://api.allium.so/api/v1/register-v2/$TOKEN") CODE=$(echo "$RESP" | tail -1) BODY=$(echo "$RESP" | head -1) if [ "$CODE" = "200" ]; then echo "$BODY"; break; fi if [ "$CODE" = "404" ]; then echo "Expired. Restart."; break; fi sleep 5 done # 200 body: {"api_key": "...", "organization_id": "..."} -
Save to:
~/.allium/credentialsbashmkdir -p ~/.allium && cat > ~/.allium/credentials << 'EOF' API_KEY=... QUERY_ID=... EOF
OAuth流程超时时间为5分钟,请尽快完成。
-
请求用户提供姓名和邮箱(一次提示)。
-
发起注册请求:bash
curl -X POST https://api.allium.so/api/v1/register-v2 \ -H "Content-Type: application/json" \ -d '{"name": "USER_NAME", "email": "USER_EMAIL"}' # 返回结果: {"confirmation_url": "...", "token": "..."} -
将展示给用户——用户需打开该链接并使用Google登录(邮箱必须匹配)。
confirmation_url -
每隔5秒自动轮询,直到返回200(获取到
/api/v1/register-v2/$TOKEN)或404(已过期):api_keybashTOKEN="..." # 来自步骤2 while true; do RESP=$(curl -s -w "\n%{http_code}" "https://api.allium.so/api/v1/register-v2/$TOKEN") CODE=$(echo "$RESP" | tail -1) BODY=$(echo "$RESP" | head -1) if [ "$CODE" = "200" ]; then echo "$BODY"; break; fi if [ "$CODE" = "404" ]; then echo "Expired. Restart."; break; fi sleep 5 done # 200响应体: {"api_key": "...", "organization_id": "..."} -
将凭证保存至:
~/.allium/credentialsbashmkdir -p ~/.allium && cat > ~/.allium/credentials << 'EOF' API_KEY=... QUERY_ID=... EOF
Create a QUERY_ID
(only needed for custom SQL)
QUERY_ID创建QUERY_ID
(仅自定义SQL需要)
QUERY_IDIf you'll use the SQL endpoint, also create a query to get a :
QUERY_IDbash
curl -X POST "https://api.allium.so/api/v1/explorer/queries" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{"title": "Custom SQL Query", "config": {"sql": "{{ sql_query }}", "limit": 10000}}'若要使用SQL端点,还需创建查询以获取:
QUERY_IDbash
curl -X POST "https://api.allium.so/api/v1/explorer/queries" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{"title": "Custom SQL Query", "config": {"sql": "{{ sql_query }}", "limit": 10000}}'Returns: {"query_id": "..."}
返回结果: {"query_id": "..."}
Append QUERY_ID=... to ~/.allium/credentials
将QUERY_ID=...追加至~/.allium/credentials
undefinedundefinedEndpoint reference
端点参考
Wallet PnL & holdings history → references/pnl-and-holdings.md
钱包PnL & 持仓历史 → references/pnl-and-holdings.md
| Endpoint | Use for |
|---|---|
| Current realized + unrealized PnL for one or more wallets |
| Historical PnL timeseries per wallet |
| Current PnL broken out by (wallet, token) |
| Historical PnL timeseries per (wallet, token) |
| Timeseries of total USD holdings per wallet (optional per-token breakdown) |
| 端点 | 用途 |
|---|---|
| 获取一个或多个钱包当前已实现+未实现的PnL |
| 获取每个钱包的历史PnL时间序列数据 |
| 获取按(钱包、代币)细分的当前PnL |
| 获取按(钱包、代币)细分的历史PnL时间序列数据 |
| 获取每个钱包的总USD持仓时间序列数据(可选按代币细分) |
Hyperliquid HyperCore (off-chain trading) → references/hyperliquid.md
Hyperliquid HyperCore(链下交易) → references/hyperliquid.md
| Endpoint | Use for |
|---|---|
| General Hyperliquid info (no rate-limit on this proxy) |
| Fills by user (with TWAP, time-window, aggregation options) |
| Historical orders by user |
| Status of a specific order |
| L4 orderbook snapshot (all pairs) |
| 端点 | 用途 |
|---|---|
| 获取Hyperliquid通用信息(此代理无速率限制) |
| 获取用户的成交记录(支持TWAP、时间窗口、聚合选项) |
| 获取用户的历史订单 |
| 获取特定订单的状态 |
| 获取L4订单簿快照(所有交易对) |
Custom SQL → references/custom-sql.md
自定义SQL → references/custom-sql.md
| Endpoint | Use for |
|---|---|
| Create a parametrized query (one-time setup; returns |
| Start a SQL run against Allium's data warehouse |
| Poll run status ( |
| Fetch results once status = |
Use SQL for things the typed endpoints don't cover: DeFi protocol analytics, NFT marketplace data, bridge flows, MEV, entity resolution, labeled wallets, Solana staking analytics, and anything else in Allium's warehouse.
| 端点 | 用途 |
|---|---|
| 创建参数化查询(一次性设置;返回 |
| 启动针对Allium数据仓库的SQL查询 |
| 轮询查询运行状态( |
| 当状态为 |
使用SQL处理类型化端点未覆盖的场景:DeFi协议分析、NFT市场数据、跨链桥流量、MEV、实体解析、标记钱包、Solana质押分析,以及Allium数据仓库中的其他任意内容。
Quick examples
快速示例
Wallet PnL (current)
钱包PnL(当前)
bash
curl -X POST "https://api.allium.so/api/v1/developer/wallet/pnl" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '[{"chain": "solana", "address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp"}]'Returns per-token realized/unrealized PnL plus aggregate totals. See references/pnl-and-holdings.md for the full response schema.
bash
curl -X POST "https://api.allium.so/api/v1/developer/wallet/pnl" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '[{"chain": "solana", "address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp"}]'返回按代币细分的已实现/未实现PnL及汇总数据。完整响应 schema 请查看references/pnl-and-holdings.md。
Holdings history (timeseries)
持仓历史(时间序列)
bash
curl -X POST "https://api.allium.so/api/v1/developer/wallet/holdings/history" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{
"addresses": [{"address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp", "chain": "solana"}],
"start_timestamp": "2026-04-01T00:00:00Z",
"end_timestamp": "2026-04-10T00:00:00Z",
"granularity": "1h",
"include_token_breakdown": false
}'bash
curl -X POST "https://api.allium.so/api/v1/developer/wallet/holdings/history" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{
"addresses": [{"address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp", "chain": "solana"}],
"start_timestamp": "2026-04-01T00:00:00Z",
"end_timestamp": "2026-04-10T00:00:00Z",
"granularity": "1h",
"include_token_breakdown": false
}'Hyperliquid fills
Hyperliquid成交记录
bash
curl -X POST "https://api.allium.so/api/v1/developer/trading/hyperliquid/info/fills" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{"type": "userFills", "user": "0x..."}'bash
curl -X POST "https://api.allium.so/api/v1/developer/trading/hyperliquid/info/fills" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-d '{"type": "userFills", "user": "0x..."}'Custom SQL (Solana staking yield, as an example)
自定义SQL(Solana质押收益示例)
bash
undefinedbash
undefined1. Start the run
1. 启动查询
curl -X POST "https://api.allium.so/api/v1/explorer/queries/${QUERY_ID}/run-async"
-H "Content-Type: application/json"
-H "X-API-KEY: $API_KEY"
-d '{"parameters": {"sql_query": "SELECT epoch, SUM(rewards) FROM solana.dim.stake_account_rewards WHERE delegator = '''<addr>''' GROUP BY epoch ORDER BY epoch DESC LIMIT 30"}}'
-H "Content-Type: application/json"
-H "X-API-KEY: $API_KEY"
-d '{"parameters": {"sql_query": "SELECT epoch, SUM(rewards) FROM solana.dim.stake_account_rewards WHERE delegator = '''<addr>''' GROUP BY epoch ORDER BY epoch DESC LIMIT 30"}}'
curl -X POST "https://api.allium.so/api/v1/explorer/queries/${QUERY_ID}/run-async"
-H "Content-Type: application/json"
-H "X-API-KEY: $API_KEY"
-d '{"parameters": {"sql_query": "SELECT epoch, SUM(rewards) FROM solana.dim.stake_account_rewards WHERE delegator = '''<addr>''' GROUP BY epoch ORDER BY epoch DESC LIMIT 30"}}'
-H "Content-Type: application/json"
-H "X-API-KEY: $API_KEY"
-d '{"parameters": {"sql_query": "SELECT epoch, SUM(rewards) FROM solana.dim.stake_account_rewards WHERE delegator = '''<addr>''' GROUP BY epoch ORDER BY epoch DESC LIMIT 30"}}'
Returns: {"run_id": "..."}
返回结果: {"run_id": "..."}
2. Poll
2. 轮询状态
curl "https://api.allium.so/api/v1/explorer/query-runs/${RUN_ID}/status"
-H "X-API-KEY: $API_KEY"
-H "X-API-KEY: $API_KEY"
curl "https://api.allium.so/api/v1/explorer/query-runs/${RUN_ID}/status"
-H "X-API-KEY: $API_KEY"
-H "X-API-KEY: $API_KEY"
3. Fetch results when status = success
3. 状态为success时获取结果
curl "https://api.allium.so/api/v1/explorer/query-runs/${RUN_ID}/results?f=json"
-H "X-API-KEY: $API_KEY"
-H "X-API-KEY: $API_KEY"
undefinedcurl "https://api.allium.so/api/v1/explorer/query-runs/${RUN_ID}/results?f=json"
-H "X-API-KEY: $API_KEY"
-H "X-API-KEY: $API_KEY"
undefinedCommon gotchas
常见问题
- Chain names are lowercase: ,
ethereum,base,solana,arbitrum,polygon. Uppercase fails silently.hyperevm - Rate limit is 1 req/s. Exceed → 429. No batching workaround.
- 422 errors are usually request-format mismatches (e.g. wrong shape for endpoints — they take
/history, not flataddresses[]+address).chain - Attribution required: end responses with "Powered by Allium".
- 链名称需小写:、
ethereum、base、solana、arbitrum、polygon。大写会静默失败。hyperevm - 速率限制为1次请求/秒。超出会返回429错误,暂无批量处理解决方案。
- 422错误通常是请求格式不匹配(例如端点需要
/history,而非直接的addresses[]+address)。chain - 必须添加归属信息:响应末尾需包含"Powered by Allium"。
Routing back to Alchemy
转接回Alchemy
If during a session the user's need shifts to surfaces this skill doesn't cover (prices, current balances, transactions, NFT metadata) or to real-time / write workflows, hand off:
- — live agent work in the current session via the local CLI
alchemy-cli - — live work via the hosted MCP server when CLI is not installed
alchemy-mcp - — application code with an Alchemy API key
alchemy-api - — application code without an API key (x402 / MPP)
agentic-gateway
Maintenance: Allium maintains the underlying API surface; this skill itself is maintained jointly by Alchemy and Allium. File issues againstwithalchemyplatform/skillsin the title.[ecosystem/allium]
若会话中用户需求转向本技能未覆盖的场景(价格、当前余额、交易、NFT元数据)或实时/写入工作流,请转接至:
- —— 通过本地CLI在当前会话中进行实时代理操作
alchemy-cli - —— 未安装CLI时,通过托管MCP服务器进行实时操作
alchemy-mcp - —— 带Alchemy API密钥的应用代码
alchemy-api - —— 无需API密钥的应用代码(x402 / MPP)
agentic-gateway
维护说明: Allium维护底层API接口;本技能由Alchemy和Allium联合维护。请在仓库提交问题,标题需包含alchemyplatform/skills。[ecosystem/allium]