zerion

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zerion: Wallet Intelligence for AI Agents

Zerion:面向AI Agent的钱包智能服务

Zerion provides interpreted, enriched crypto wallet data across 41+ chains including Ethereum, Base, Arbitrum, Optimism, Polygon, Solana, and more.
Unlike raw RPC data, Zerion returns:
  • USD values for all positions
  • Protocol labels (Uniswap, Aave, Lido, etc.)
  • Human-readable transaction types (swap, stake, bridge, mint, burn)
  • PnL calculations (realized, unrealized, per-asset, FIFO method)
  • DeFi position breakdowns (deposits, borrows, LP positions with
    group_id
    )
  • NFT portfolios with floor prices and collection metadata
  • Spam filtering built-in
Two ways to access:
  • x402 (no account needed): Pay $0.01 USDC per request on Base. No API key, no signup.
  • API key: Get a free key instantly at dashboard.zerion.io for higher rate limits.
Zerion为41+条公链提供解析后的、经过丰富处理的加密钱包数据,支持的公链包括Ethereum、Base、Arbitrum、Optimism、Polygon、Solana等。
与原始RPC数据不同,Zerion返回的内容包含:
  • 所有头寸的美元估值
  • 协议标签(Uniswap、Aave、Lido等)
  • 人类可读的交易类型(swap、stake、bridge、mint、burn)
  • PnL计算(已实现收益、未实现收益、单资产收益、FIFO会计法)
  • DeFi头寸明细(存款、借款、带
    group_id
    的LP头寸)
  • 带地板价和藏品元数据的NFT投资组合
  • 内置垃圾信息过滤功能
两种访问方式:
  • x402(无需注册账户):在Base链上按请求支付0.01 USDC即可使用,无需API密钥,无需注册。
  • API密钥:访问dashboard.zerion.io即可立即获取免费密钥,享受更高的请求速率限制。

Research → Execute Pattern

研究→执行模式

Zerion is the research layer. Use it to analyze wallets, find opportunities, track PnL. Then hand off to Bankr for execution (swaps, stop-losses, DCA).
Zerion (Research)          Bankr (Execute)
─────────────────         ────────────────
Portfolio analysis   →    Rebalance trades
PnL tracking         →    Stop-loss orders
Position monitoring  →    Take-profit orders
Whale watching       →    Copy trades
Swap quotes          →    Execute best route
NFT floor tracking   →    Buy/sell NFTs
Zerion是研究层,可用于分析钱包、寻找机会、追踪PnL。之后可将数据交给Bankr进行执行(兑换、止损、定期定额投资)。
Zerion (研究层)              Bankr (执行层)
─────────────────         ────────────────
投资组合分析       →      再平衡交易
PnL追踪           →      止损订单
头寸监控           →      止盈订单
巨鲸观察           →      跟单交易
兑换报价           →      执行最优路径
NFT地板价追踪      →      买卖NFT

CLI Quick Start

CLI快速入门

bash
npm install -g zerion-cli
bash
npm install -g zerion-cli

Set API key

设置API密钥

export ZERION_API_KEY="zk_..."
export ZERION_API_KEY="zk_..."

Or use x402 (no key needed)

或使用x402(无需密钥)

zerion-cli wallet portfolio 0x... --x402
zerion-cli wallet portfolio 0x... --x402

Commands

可用命令

zerion-cli wallet portfolio <address> # Total USD value zerion-cli wallet positions <address> # All token positions zerion-cli wallet transactions <address> # Transaction history zerion-cli wallet pnl <address> # Profit & loss zerion-cli wallet analyze <address> # Full analysis zerion-cli chains list # Supported chains

---
zerion-cli wallet portfolio <address> # 总美元估值 zerion-cli wallet positions <address> # 所有代币头寸 zerion-cli wallet transactions <address> # 交易历史 zerion-cli wallet pnl <address> # 盈亏数据 zerion-cli wallet analyze <address> # 完整分析 zerion-cli chains list # 支持的公链列表

---

Wallet Endpoints

钱包端点

GET /v1/wallets/{address}/portfolio

GET /v1/wallets/{address}/portfolio

Returns aggregated portfolio value across all chains.
bash
curl "https://api.zerion.io/v1/wallets/0x.../portfolio?currency=usd" \
  -H "Authorization: Basic $(echo -n $ZERION_API_KEY: | base64)"
Response:
json
{
  "data": {
    "attributes": {
      "total": { "positions": 44469.60 },
      "positions_distribution_by_type": {
        "wallet": 40000,
        "deposited": 3000,
        "staked": 1469.60
      },
      "positions_distribution_by_chain": {
        "base": 27495.06,
        "ethereum": 6216.25,
        "arbitrum": 1234.56
      },
      "changes": {
        "absolute_1d": 305.86,
        "percent_1d": 0.69
      }
    }
  }
}
返回跨所有链的聚合投资组合价值。
bash
curl "https://api.zerion.io/v1/wallets/0x.../portfolio?currency=usd" \
  -H "Authorization: Basic $(echo -n $ZERION_API_KEY: | base64)"
返回示例:
json
{
  "data": {
    "attributes": {
      "total": { "positions": 44469.60 },
      "positions_distribution_by_type": {
        "wallet": 40000,
        "deposited": 3000,
        "staked": 1469.60
      },
      "positions_distribution_by_chain": {
        "base": 27495.06,
        "ethereum": 6216.25,
        "arbitrum": 1234.56
      },
      "changes": {
        "absolute_1d": 305.86,
        "percent_1d": 0.69
      }
    }
  }
}

GET /v1/wallets/{address}/positions

GET /v1/wallets/{address}/positions

Returns all fungible token and DeFi positions.
Query params:
  • filter[positions]
    :
    only_simple
    (tokens only),
    only_defi
    (protocol positions),
    no_filter
    (all)
  • filter[chain_ids]
    : Comma-separated chain IDs (e.g.,
    base,ethereum,arbitrum
    )
  • filter[trash]
    :
    only_non_trash
    (exclude spam),
    only_trash
    ,
    no_filter
  • sort
    :
    value
    or
    -value
Understanding LP Positions: Liquidity pools return multiple positions (one per token) with shared
group_id
. Group by
group_id
to display LP holdings together.
Response includes:
  • Token symbol, name, icon URL
  • Quantity (int, float, decimals, numeric)
  • USD value and price
  • Position type:
    wallet
    ,
    deposited
    ,
    borrowed
    ,
    staked
    ,
    locked
  • Protocol name and DApp relationship
  • group_id
    for LP position grouping
返回所有同质化代币和DeFi头寸。
查询参数:
  • filter[positions]
    only_simple
    (仅代币)、
    only_defi
    (仅协议头寸)、
    no_filter
    (全部)
  • filter[chain_ids]
    :英文逗号分隔的链ID(例如
    base,ethereum,arbitrum
  • filter[trash]
    only_non_trash
    (排除垃圾资产)、
    only_trash
    no_filter
  • sort
    value
    (按价值正序)或
    -value
    (按价值倒序)
LP头寸说明:流动性池会返回多个头寸(每个对应一种代币),共享同一个
group_id
。可通过
group_id
分组,将LP持有的资产合并展示。
返回内容包含:
  • 代币符号、名称、图标URL
  • 数量(整数、浮点数、精度、数值格式)
  • 美元估值和价格
  • 头寸类型:
    wallet
    (钱包持有)、
    deposited
    (已存款)、
    borrowed
    (已借款)、
    staked
    (已质押)、
    locked
    (已锁定)
  • 协议名称和DApp关联信息
  • 用于LP头寸分组的
    group_id

GET /v1/wallets/{address}/transactions

GET /v1/wallets/{address}/transactions

Returns interpreted transaction history.
Query params:
  • filter[chain_ids]
    : Filter by chains
  • filter[asset_types]
    :
    fungible
    ,
    nft
  • filter[trash]
    :
    only_non_trash
    ,
    no_filter
  • page[size]
    : Results per page (default 20)
  • page[after]
    : Cursor for pagination
Each transaction includes:
  • operation_type
    :
    trade
    ,
    send
    ,
    receive
    ,
    approve
    ,
    stake
    ,
    unstake
    ,
    borrow
    ,
    repay
    ,
    bridge
    ,
    mint
    ,
    burn
    ,
    bid
    ,
    execute
  • transfers
    array with direction, token info, quantities, USD values
  • fee
    with gas cost in native token and USD
  • application_metadata
    with contract address and method info
  • Related
    dapp
    and
    chain
    relationships
返回解析后的交易历史。
查询参数:
  • filter[chain_ids]
    :按公链筛选
  • filter[asset_types]
    fungible
    (同质化代币)、
    nft
  • filter[trash]
    only_non_trash
    no_filter
  • page[size]
    :每页返回结果数(默认20)
  • page[after]
    :分页游标
每条交易包含:
  • operation_type
    trade
    (交易)、
    send
    (发送)、
    receive
    (接收)、
    approve
    (授权)、
    stake
    (质押)、
    unstake
    (解押)、
    borrow
    (借款)、
    repay
    (还款)、
    bridge
    (跨链)、
    mint
    (铸造)、
    burn
    (销毁)、
    bid
    (出价)、
    execute
    (执行)
  • transfers
    数组,包含方向、代币信息、数量、美元估值
  • fee
    字段,包含原生代币计价和美元计价的Gas成本
  • application_metadata
    ,包含合约地址和方法信息
  • 关联的
    dapp
    chain
    信息

GET /v1/wallets/{address}/pnl

GET /v1/wallets/{address}/pnl

Returns Profit and Loss using FIFO method.
Query params:
  • currency
    :
    usd
    (default)
  • filter[chain_ids]
    : Comma-separated chain IDs
Response:
json
{
  "data": {
    "attributes": {
      "total_gain": -15076.15,
      "realized_gain": 45328.28,
      "unrealized_gain": -60404.44,
      "relative_total_gain_percentage": -5.65,
      "relative_realized_gain_percentage": 28.08,
      "relative_unrealized_gain_percentage": -57.36,
      "total_fee": 681.81,
      "total_invested": 266672.34,
      "realized_cost_basis": 161370.01,
      "net_invested": 105302.33,
      "received_external": 128217.01,
      "sent_external": 67415.77,
      "sent_for_nfts": 4333.36,
      "received_for_nfts": 423.01
    }
  }
}
使用FIFO会计法返回盈亏数据。
查询参数:
  • currency
    usd
    (默认)
  • filter[chain_ids]
    :英文逗号分隔的链ID
返回示例:
json
{
  "data": {
    "attributes": {
      "total_gain": -15076.15,
      "realized_gain": 45328.28,
      "unrealized_gain": -60404.44,
      "relative_total_gain_percentage": -5.65,
      "relative_realized_gain_percentage": 28.08,
      "relative_unrealized_gain_percentage": -57.36,
      "total_fee": 681.81,
      "total_invested": 266672.34,
      "realized_cost_basis": 161370.01,
      "net_invested": 105302.33,
      "received_external": 128217.01,
      "sent_external": 67415.77,
      "sent_for_nfts": 4333.36,
      "received_for_nfts": 423.01
    }
  }
}

GET /v1/wallets/{address}/chart

GET /v1/wallets/{address}/chart

Returns portfolio balance chart over time.
Query params:
  • currency
    :
    usd
  • filter[chain_ids]
    : Filter by chains
  • period
    : Time period for chart
返回投资组合余额的历史走势图表。
查询参数:
  • currency
    usd
  • filter[chain_ids]
    :按公链筛选
  • period
    :图表时间范围

GET /v1/wallets/{address}/nft-portfolio

GET /v1/wallets/{address}/nft-portfolio

Returns NFT portfolio overview with total estimated value.
返回NFT投资组合概览和总预估价值。

GET /v1/wallets/{address}/nft-positions

GET /v1/wallets/{address}/nft-positions

Returns list of NFT positions held by wallet.
Query params:
  • filter[chain_ids]
    : Filter by chains
  • sort
    : Sort order
  • Pagination supported
返回钱包持有的NFT头寸列表。
查询参数:
  • filter[chain_ids]
    :按公链筛选
  • sort
    :排序方式
  • 支持分页

GET /v1/wallets/{address}/nft-collections

GET /v1/wallets/{address}/nft-collections

Returns NFT collections held by wallet with floor prices.

返回钱包持有的NFT藏品列表,包含地板价。

Fungibles (Token) Endpoints

同质化代币端点

GET /v1/fungibles

GET /v1/fungibles

Returns paginated list of fungible assets. Supports search.
Query params:
  • filter[search_query]
    : Search by name or symbol
  • filter[implementation_chain_id]
    : Filter by chain
  • filter[implementation_address]
    : Filter by contract address
  • sort
    : Sort order
返回分页的同质化资产列表,支持搜索。
查询参数:
  • filter[search_query]
    :按名称或符号搜索
  • filter[implementation_chain_id]
    :按公链筛选
  • filter[implementation_address]
    :按合约地址筛选
  • sort
    :排序方式

GET /v1/fungibles/{fungible_id}

GET /v1/fungibles/{fungible_id}

Returns single fungible asset by ID.
根据ID返回单个同质化资产信息。

GET /v1/fungibles/implementation/{chain}:{address}

GET /v1/fungibles/implementation/{chain}:{address}

Returns fungible by chain:address pair (e.g.,
ethereum:0xa5a4...
).
根据链ID+地址对返回同质化资产(例如
ethereum:0xa5a4...
)。

GET /v1/fungibles/{fungible_id}/chart

GET /v1/fungibles/{fungible_id}/chart

Returns price chart for fungible asset.
Query params:
  • filter[period]
    :
    hour
    ,
    day
    ,
    week
    ,
    month
    ,
    year
    ,
    max

返回同质化资产的价格走势图表。
查询参数:
  • filter[period]
    hour
    (小时)、
    day
    (天)、
    week
    (周)、
    month
    (月)、
    year
    (年)、
    max
    (全部)

NFT Endpoints

NFT端点

GET /v1/nfts

GET /v1/nfts

Returns list of NFTs with metadata.
Query params:
  • Filter and pagination supported
返回NFT列表及元数据。
查询参数:
  • 支持筛选和分页

GET /v1/nfts/{nft_id}

GET /v1/nfts/{nft_id}

Returns single NFT by ID with full metadata, traits, and collection info.

根据ID返回单个NFT的完整元数据、属性和藏品信息。

DApp Endpoints

DApp端点

GET /v1/dapps

GET /v1/dapps

Returns list of DApps (protocols) indexed by Zerion.
返回Zerion收录的DApp(协议)列表。

GET /v1/dapps/{dapp_id}

GET /v1/dapps/{dapp_id}

Returns single DApp with metadata, supported chains, and categories.

返回单个DApp的元数据、支持的公链和分类信息。

Chain Endpoints

公链端点

GET /v1/chains

GET /v1/chains

Returns all 41+ supported chains with metadata.
返回所有41+条支持的公链及元数据。

GET /v1/chains/{chain_id}

GET /v1/chains/{chain_id}

Returns single chain by ID.

根据ID返回单条公链信息。

Gas Prices

Gas价格

GET /v1/gas-prices

GET /v1/gas-prices

Returns real-time gas prices across all supported chains.
Useful for:
  • Estimating transaction costs
  • Choosing optimal chain for execution
  • Timing transactions for lower fees

返回所有支持公链的实时Gas价格。
适用场景:
  • 预估交易成本
  • 选择最优执行公链
  • 选择低手续费的交易时机

Swap & Bridge Quotes

兑换&跨链报价

GET /v1/swap/offers

GET /v1/swap/offers

Returns swap/bridge quotes from multiple providers (aggregator).
Query params:
  • Input/output tokens
  • Amount
  • Slippage tolerance
Returns quotes from 0x, 1inch, Uniswap, and more. Zerion charges 0.5% on L2/alt-L1 trades (waived with Genesis NFT).
Note: Response time is 5-10 seconds due to multi-provider aggregation.
从多个提供商返回兑换/跨链报价(聚合器)。
查询参数:
  • 输入/输出代币
  • 数量
  • 滑点容忍度
返回来自0x、1inch、Uniswap等多个提供商的报价。Zerion对L2/其他Layer1链的交易收取0.5%手续费(持有Genesis NFT可豁免)。
注意:由于需要聚合多个提供商的数据,响应时间为5-10秒。

GET /v1/swap/fungibles

GET /v1/swap/fungibles

Returns fungibles available for bridge exchange (cross-chain swaps).

返回支持跨链兑换的同质化代币列表。

Webhooks (Subscriptions)

Webhook(订阅)

Real-time notifications for wallet activity.
钱包活动的实时通知。

POST /v1/subscriptions/wallet-transactions

POST /v1/subscriptions/wallet-transactions

Create subscription for wallet transactions.
json
{
  "data": {
    "type": "subscriptions",
    "attributes": {
      "wallet_addresses": ["0x...", "0x..."],
      "chain_ids": ["base", "ethereum"],
      "callback_url": "https://your-server/webhook"
    }
  }
}
创建钱包交易订阅。
json
{
  "data": {
    "type": "subscriptions",
    "attributes": {
      "wallet_addresses": ["0x...", "0x..."],
      "chain_ids": ["base", "ethereum"],
      "callback_url": "https://your-server/webhook"
    }
  }
}

GET /v1/subscriptions

GET /v1/subscriptions

List all subscriptions.
列出所有订阅。

GET /v1/subscriptions/{id}

GET /v1/subscriptions/{id}

Get subscription by ID.
根据ID获取订阅信息。

DELETE /v1/subscriptions/{id}

DELETE /v1/subscriptions/{id}

Delete subscription.
删除订阅。

POST /v1/subscriptions/{id}/enable

POST /v1/subscriptions/{id}/enable

Enable a disabled subscription.
启用已禁用的订阅。

POST /v1/subscriptions/{id}/disable

POST /v1/subscriptions/{id}/disable

Disable subscription (pause notifications).
禁用订阅(暂停通知)。

PATCH /v1/subscriptions/{id}/wallets

PATCH /v1/subscriptions/{id}/wallets

Add/remove wallets from subscription.
向订阅中添加/移除钱包。

PUT /v1/subscriptions/{id}/wallets

PUT /v1/subscriptions/{id}/wallets

Replace all wallets in subscription.
替换订阅中的所有钱包。

PUT /v1/subscriptions/{id}/callback-url

PUT /v1/subscriptions/{id}/callback-url

Update callback URL.
更新回调URL。

PUT /v1/subscriptions/{id}/chain-ids

PUT /v1/subscriptions/{id}/chain-ids

Update monitored chains.
更新监控的公链。

GET /v1/subscriptions/{id}/wallets

GET /v1/subscriptions/{id}/wallets

List wallets in subscription.
列出订阅中的钱包。

GET /v1/subscriptions/{id}/wallets/count

GET /v1/subscriptions/{id}/wallets/count

Count wallets in subscription.
Webhook Payload:
  • Signed with X-Signature header (RSA, verify with certificate)
  • Includes X-Timestamp and X-Certificate-URL headers
  • Transaction data with full interpretation
  • Prices are
    null
    in webhooks (query transactions endpoint for prices)
Limits:
  • Dev key: 1 subscription, 5 wallets max
  • Production: Contact api@zerion.io for whitelist

统计订阅中的钱包数量。
Webhook payload说明
  • 使用X-Signature头签名(RSA,可通过证书验证)
  • 包含X-Timestamp和X-Certificate-URL头
  • 包含完整解析后的交易数据
  • Webhook中的价格为
    null
    ,可调用交易接口获取价格
限制
  • 开发密钥:最多1个订阅,最多5个钱包
  • 生产环境:联系api@zerion.io申请白名单

API Key Access

API密钥访问

Get a free API key instantly — no credit card required:
  1. Go to dashboard.zerion.io
  2. Sign up with email or connect wallet
  3. Click "Create API Key" — key starts with
    zk_...
  4. Copy and use immediately
bash
export ZERION_API_KEY="zk_your_api_key"

curl "https://api.zerion.io/v1/wallets/0x.../portfolio" \
  -H "Authorization: Basic $(echo -n $ZERION_API_KEY: | base64)"
立即获取免费API密钥,无需信用卡:
  1. 访问dashboard.zerion.io
  2. 使用邮箱注册或连接钱包
  3. 点击「创建API密钥」,密钥以
    zk_...
    开头
  4. 复制后即可立即使用
bash
export ZERION_API_KEY="zk_your_api_key"

curl "https://api.zerion.io/v1/wallets/0x.../portfolio" \
  -H "Authorization: Basic $(echo -n $ZERION_API_KEY: | base64)"

Rate Limits

速率限制

PlanRequests/SecondRequests/DayPrice
Free1010,000$0
Growth50100,000$99/mo
Scale2001,000,000$499/mo
EnterpriseCustomCustomContact
x402 has no rate limits — pay per request ($0.01 USDC each).

套餐每秒请求数每日请求数价格
免费版1010,000$0
成长版50100,000$99/月
规模化版2001,000,000$499/月
企业版自定义自定义联系销售
x402模式无速率限制,按请求付费(每次0.01 USDC)。

x402 Access (Recommended for Agents)

x402访问(推荐Agent使用)

x402 allows agents to pay per request without API keys. Payment is $0.01 USDC on Base.
typescript
// Using x402 HTTP flow
const response = await fetch('https://api.zerion.io/v1/wallets/0x.../portfolio', {
  headers: {
    'X-402-Payment': signedPaymentHeader // ERC-3009 signature
  }
});
With zerion-cli:
bash
zerion-cli wallet portfolio 0x... --x402

x402模式允许Agent无需API密钥即可按请求付费,需在Base链上支付0.01 USDC/次。
typescript
// 使用x402 HTTP流程
const response = await fetch('https://api.zerion.io/v1/wallets/0x.../portfolio', {
  headers: {
    'X-402-Payment': signedPaymentHeader // ERC-3009签名
  }
});
使用zerion-cli的示例:
bash
zerion-cli wallet portfolio 0x... --x402

Testnet Support

测试网支持

Add
X-Env: testnet
header to get testnet data:
bash
curl "https://api.zerion.io/v1/wallets/0x.../portfolio" \
  -H "Authorization: Basic ..." \
  -H "X-Env: testnet"

添加
X-Env: testnet
请求头即可获取测试网数据:
bash
curl "https://api.zerion.io/v1/wallets/0x.../portfolio" \
  -H "Authorization: Basic ..." \
  -H "X-Env: testnet"

Integration with Bankr

与Bankr集成

Example: PnL Guardian

示例:PnL守护者

Monitor positions and auto-set stop-losses:
bash
#!/bin/bash
监控头寸并自动设置止损:
bash
#!/bin/bash

Research with Zerion

使用Zerion进行研究

positions=$(zerion-cli wallet positions $WALLET --json)
positions=$(zerion-cli wallet positions $WALLET --json)

Find volatile tokens on Base

查找Base链上的高波动代币

risky=$(echo $positions | jq '[.data[] | select(.relationships.chain.data.id == "base") | select(.attributes.value > 500)]')
risky=$(echo $positions | jq '[.data[] | select(.relationships.chain.data.id == "base") | select(.attributes.value > 500)]')

Execute with Bankr

使用Bankr执行

for token in $(echo $risky | jq -r '.[].attributes.fungible_info.symbol'); do bankr "set stop loss on $token at -20%" done
undefined
for token in $(echo $risky | jq -r '.[].attributes.fungible_info.symbol'); do bankr "set stop loss on $token at -20%" done
undefined

Example: Whale Copy Trading

示例:巨鲸跟单交易

Watch a whale wallet and mirror trades:
typescript
// Webhook handler
app.post('/webhook/zerion', async (req, res) => {
  const { type, data } = req.body;

  if (type === 'transaction' && data.operation_type === 'trade') {
    const { transfers } = data;
    const bought = transfers.find(t => t.direction === 'in');

    if (bought && bought.value > 1000) {
      // Mirror the trade via Bankr
      await bankr(`buy $100 of ${bought.fungible_info.symbol}`);
    }
  }
});
监控巨鲸钱包并镜像其交易:
typescript
// Webhook处理逻辑
app.post('/webhook/zerion', async (req, res) => {
  const { type, data } = req.body;

  if (type === 'transaction' && data.operation_type === 'trade') {
    const { transfers } = data;
    const bought = transfers.find(t => t.direction === 'in');

    if (bought && bought.value > 1000) {
      // 通过Bankr镜像交易
      await bankr(`buy $100 of ${bought.fungible_info.symbol}`);
    }
  }
});

Example: Best Swap Route

示例:最优兑换路径

Get quotes from Zerion, execute via Bankr:
typescript
// Get swap quote from Zerion
const quote = await zerion.get('/v1/swap/offers', {
  params: { from: 'USDC', to: 'ETH', amount: '1000' }
});

const bestRate = quote.data[0];
console.log(`Best rate: ${bestRate.rate} from ${bestRate.provider}`);

// Execute via Bankr
await bankr(`swap $1000 USDC to ETH on base`);

从Zerion获取报价,通过Bankr执行:
typescript
// 从Zerion获取兑换报价
const quote = await zerion.get('/v1/swap/offers', {
  params: { from: 'USDC', to: 'ETH', amount: '1000' }
});

const bestRate = quote.data[0];
console.log(`Best rate: ${bestRate.rate} from ${bestRate.provider}`);

// 通过Bankr执行
await bankr(`swap $1000 USDC to ETH on base`);

Supported Chains

支持的公链

All 41+ chains including:
ChainChain ID
Ethereum
ethereum
Base
base
Arbitrum
arbitrum
Optimism
optimism
Polygon
polygon
Solana
solana
zkSync Era
zksync-era
Linea
linea
Scroll
scroll
Blast
blast
Zora
zora
Degen
degen
Berachain
berachain
Monad
monad
Abstract
abstract
...+26 more

全部41+条公链包括:
公链链ID
Ethereum
ethereum
Base
base
Arbitrum
arbitrum
Optimism
optimism
Polygon
polygon
Solana
solana
zkSync Era
zksync-era
Linea
linea
Scroll
scroll
Blast
blast
Zora
zora
Degen
degen
Berachain
berachain
Monad
monad
Abstract
abstract
...还有26条

MCP Server

MCP服务端

Connect Claude, Cursor, or any MCP client:
json
{
  "mcpServers": {
    "zerion": {
      "command": "npx",
      "args": ["zerion-mcp-server"],
      "env": {
        "ZERION_API_KEY": "zk_..."
      }
    }
  }
}

连接Claude、Cursor或任意MCP客户端:
json
{
  "mcpServers": {
    "zerion": {
      "command": "npx",
      "args": ["zerion-mcp-server"],
      "env": {
        "ZERION_API_KEY": "zk_..."
      }
    }
  }
}

Error Handling

错误处理

CodeDescription
200Success
202Accepted - data being prepared, retry shortly
400Bad Request - check query params
401Unauthorized - invalid API key
402Payment Required - x402 payment needed
404Not Found - invalid address or resource
429Rate Limited - back off with exponential backoff
500Server Error - retry with backoff
Note: 202 responses mean data is being indexed. Retry every few seconds until 200. Stop after 2 minutes if still 202.

状态码说明
200请求成功
202已接受 - 数据正在处理,请稍后重试
400请求错误 - 检查查询参数
401未授权 - API密钥无效
402需要付费 - 需要完成x402支付
404未找到 - 地址或资源无效
429速率受限 - 使用指数退避策略重试
500服务端错误 - 使用退避策略重试
注意:202响应表示数据正在索引中,每隔几秒重试一次直到返回200,若2分钟后仍返回202请停止重试。

Resources

资源