SuperAPI AI 工具集

zerion-analyze

数据与分析

查看项目

更新于 10-16 02:03

技能介绍

用途

Zerion 钱包分析用于对一个加密钱包做只读洞察,覆盖 14 条 EVM 链和 Solana。所有命令接受 0x... 地址、ENS 名称(例如 vitalik.eth)、本地钱包名称或已关注的地址。它适合回答“这个钱包里有什么”、查询组合价值、代币持仓、DeFi 头寸、交易历史与盈亏,以及查看钱包活跃于哪些链,或对某个地址进行长期跟踪。

注意分工:需要执行操作(swap/桥接/转账)时使用 zerion-trading;创建钱包使用 zerion-wallet。

主要能力

完整分析(推荐起点)

zerion analyze <address|name>
zerion analyze <address|name> --chain <chain>
zerion analyze <address|name> --positions all|simple|defi
zerion analyze <address|name> --limit <n>           # txs to sample (default 10)
zerion analyze <address|name> --x402                # pay-per-call

该命令并行拉取组合、头寸、交易与 PnL,返回摘要,包含组合总额与链分布及 1 日变化、按价值排名的前 10 头寸、最近 5 笔交易以及 PnL 汇总。

定向读取

# Portfolio value + top positions + 1-day change
zerion portfolio <address|name>
zerion portfolio --wallet <name>
zerion portfolio --watch <name>                     # use watched wallet by name

# Token + DeFi positions
zerion positions <address|name>
zerion positions <address|name> --positions all     # default: tokens + DeFi
zerion positions <address|name> --positions simple  # tokens only
zerion positions <address|name> --positions defi    # DeFi protocols only (flat list)
zerion positions <address|name> --defi              # DeFi grouped by protocol (recommended for DeFi analysis)
zerion positions <address|name> --chain <chain>

# Transaction history
zerion history <address|name>
zerion history <address|name> --limit <n>           # default 10
zerion history <address|name> --chain <chain>

# Profit & loss
zerion pnl <address|name>

以上命令均接受 --x402(或 --mpp)以按调用付费而无需 API key。

--defi 输出结构

zerion positions <addr> --defi 返回按协议分组、贷款已轧差后的头寸:

{
  "wallet": {...},
  "filter": "defi",
  "summary": { "total_value": 4200, "gross_value": 4500, "protocols": 2, "positions": 4 },
  "protocols": [
    {
      "dapp": "Aave V3",
      "module": "lending",
      "net_value": 3700,
      "gross_value": 4000,
      "groups": [
        { "position_type": "deposit", "value": 4000, "tokens": [...] },
        { "position_type": "loan",    "value": 300,  "tokens": [...] }
      ]
    }
  ]
}

关键行为:

  • 贷款在 net_value 中与存款轧差(例如某 Aave 钱包存入 4000 USDC、借出 300 DAI,则报告 net_value: 3700)。总敞口使用 gross_value。
  • 具有相同 group_id 的 LP 代币会合并为一个 groups[] 条目(Uniswap 的 USDC/WETH 池返回一个含两个代币的 group,而不是两行互不相关的记录)。
  • position_type 取值包括 deposit | loan | staked | locked | reward | wallet | investment,用于为每行打标,便于下游过滤。
  • --defi 与 --positions all|simple 同时使用会报 conflicting_flags 错误。

代币搜索(查找合约地址)

zerion search <query>                               # by name, symbol, or address
zerion search <query> --chain <chain>
zerion search <query> --limit <n>                   # default 10

自选列表(跟踪非自有地址)

可将地址加入本地自选列表,从而在分析命令中用名称引用(--watch <name>)。

zerion watch <address|ens> --name <label>           # add (e.g. "vitalik.eth" --name vit)
zerion watch list                                   # list all watched
zerion watch remove <name>                          # remove

# Then use the watched name with any analysis command
zerion portfolio --watch vit
zerion analyze --watch vit

使用方式

安装

若 zerion 命令报 command not found,安装一次:

npm install -g zerion-cli

需要 Node.js ≥ 20。鉴权(API key / x402 / MPP)参见 zerion umbrella skill。

典型工作流

  1. 运行 zerion analyze <address> 获得整体概况。
  2. 如需深入具体信息:
    • 按协议分组的 DeFi:zerion positions <address> --defi(贷款已轧差,LP 代币按 group_id 合并)
    • DeFi 平铺列表:zerion positions <address> --positions defi
    • 单链:zerion positions <address> --chain ethereum(或 --chain monad)
    • 更多交易:zerion history <address> --limit 25
  3. 如需重复监控,加入自选列表:zerion watch <addr> --name <label>。

输出

stdout 输出 JSON,stderr 输出结构化错误。错误契约参见 zerion umbrella skill。

按调用付费

--x402(Base / Solana)与 --mpp(Tempo)对本技能中的每个命令均可用。交易类命令不支持按调用付费,始终需要 API key。

常见错误

代码 原因 修复
missing_api_key 没有 ZERION_API_KEY 也没有 --x402/--mpp 设置环境变量或传 flag
unsupported_chain 无效的 --chain 用 zerion chains 获取有效 ID
unsupported_positions_filter 无效的 --positions 使用 all、simple 或 defi
conflicting_flags --defi 与 --positions all simple 同用
api_error 429 触发限流 等待、降低频率或改用 --x402
api_error 400 地址无效或 ENS 解析失败 用解析后的 0x 地址重试

空头寸/空历史通常意味着钱包不活跃或非常新,而非错误。

适用场景

  • 快速了解某钱包的组合价值与链分布。
  • 查看代币持仓与 DeFi 头寸(借贷、质押、LP、借出)。
  • 查看解析后的交易历史(trade、send、receive、mint、approve 等)。
  • 计算盈亏(已实现、未实现、费用)。
  • 查询钱包活跃于哪些链。
  • 通过自选列表随时间跟踪地址。

限制

  • 本技能为只读;执行操作需使用 zerion-trading,钱包创建需使用 zerion-wallet。
  • 需要 Node.js ≥ 20。
  • 鉴权需要 API key 或按调用付费(--x402/--mpp)。
  • 交易类命令不支持按调用付费。
  • 覆盖范围为 14 条 EVM 链与 Solana。
  • 空头寸或空历史不代表错误。

以上未提及的功能、收费、价格、平台与效果,暂未提供。