zapper

TotalClaw 作者 totalclaw

通过 Zapper 的 GraphQL API 查询 50 多个链上的 DeFi 投资组合数据。当用户想要检查钱包余额、DeFi 头寸、NFT 持有量、代币价格或交易历史记录时使用。支持 Base、Ethereum、Polygon、Arbitrum、Optimism 等。需要 ZAPPER_API_KEY。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~spirosrap-zapper
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~spirosrap-zapper/file -o spirosrap-zapper.md
# Zapper Skill

Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API.

## Quick Start

### Setup

Get your API key from [Zapper Dashboard](https://dashboard.zapper.xyz/settings/api) (free tier available):

```bash
mkdir -p ~/.clawdbot/skills/zapper
cat > ~/.clawdbot/skills/zapper/config.json << 'EOF'
{
  "apiKey": "YOUR_ZAPPER_API_KEY"
}
EOF
```

### Basic Usage

```bash
# Portfolio summary
scripts/zapper.sh portfolio 0x...

# Token holdings
scripts/zapper.sh tokens 0x...

# DeFi positions
scripts/zapper.sh apps 0x...

# NFT holdings
scripts/zapper.sh nfts 0x...

# Token price
scripts/zapper.sh price ETH

# Recent transactions
scripts/zapper.sh tx 0x...

# Unclaimed rewards
scripts/zapper.sh claimables 0x...
```

## Commands

| Command | Description | Example |
|---------|-------------|---------|
| `portfolio <address>` | Token balances + totals across all chains | `zapper.sh portfolio 0x123...` |
| `tokens <address>` | Detailed token holdings | `zapper.sh tokens 0x123...` |
| `apps <address>` | DeFi positions (LPs, lending, staking) | `zapper.sh apps 0x123...` |
| `nfts <address>` | NFT holdings | `zapper.sh nfts 0x123...` |
| `price <symbol>` | Token price lookup | `zapper.sh price ETH` |
| `tx <address>` | Recent transactions (human-readable) | `zapper.sh tx 0x123...` |
| `claimables <address>` | Unclaimed rewards | `zapper.sh claimables 0x123...` |

## Supported Networks

Zapper supports 50+ chains including:

- Ethereum
- Base
- Polygon
- Arbitrum
- Optimism
- Avalanche
- BNB Chain
- zkSync
- Linea
- Scroll
- And more...

## Use Cases

- **Portfolio tracking**: Aggregate all DeFi positions across chains
- **Yield hunting**: Check claimables and unclaimed rewards
- **NFT portfolio**: Track NFT holdings across marketplaces
- **Transaction history**: Human-readable on-chain activity
- **Token prices**: Quick price lookups

## API Reference

All endpoints use `POST https://public.zapper.xyz/graphql` with GraphQL queries.

See [references/api.md](references/api.md) for full API documentation.

## Requirements

- `curl` - HTTP requests
- `jq` - JSON parsing
- `python3` - Formatting output
- Zapper API key (free tier available)

## Notes

- API key is required for all endpoints
- Rate limits apply based on your Zapper plan
- GraphQL queries allow flexible data selection

---

## 中文说明

# Zapper Skill

通过 Zapper 的 GraphQL API 查询 50 多个链上的 DeFi 投资组合数据。

## 快速开始

### 设置

从 [Zapper Dashboard](https://dashboard.zapper.xyz/settings/api) 获取你的 API 密钥(提供免费套餐):

```bash
mkdir -p ~/.clawdbot/skills/zapper
cat > ~/.clawdbot/skills/zapper/config.json << 'EOF'
{
  "apiKey": "YOUR_ZAPPER_API_KEY"
}
EOF
```

### 基本用法

```bash
# 投资组合摘要
scripts/zapper.sh portfolio 0x...

# 代币持有量
scripts/zapper.sh tokens 0x...

# DeFi 头寸
scripts/zapper.sh apps 0x...

# NFT 持有量
scripts/zapper.sh nfts 0x...

# 代币价格
scripts/zapper.sh price ETH

# 近期交易
scripts/zapper.sh tx 0x...

# 未领取的奖励
scripts/zapper.sh claimables 0x...
```

## 命令

| Command | Description | Example |
|---------|-------------|---------|
| `portfolio <address>` | 跨所有链的代币余额与总额 | `zapper.sh portfolio 0x123...` |
| `tokens <address>` | 详细的代币持有量 | `zapper.sh tokens 0x123...` |
| `apps <address>` | DeFi 头寸(流动性提供、借贷、质押) | `zapper.sh apps 0x123...` |
| `nfts <address>` | NFT 持有量 | `zapper.sh nfts 0x123...` |
| `price <symbol>` | 代币价格查询 | `zapper.sh price ETH` |
| `tx <address>` | 近期交易(人类可读) | `zapper.sh tx 0x123...` |
| `claimables <address>` | 未领取的奖励 | `zapper.sh claimables 0x123...` |

## 支持的网络

Zapper 支持 50 多个链,包括:

- Ethereum
- Base
- Polygon
- Arbitrum
- Optimism
- Avalanche
- BNB Chain
- zkSync
- Linea
- Scroll
- 以及更多……

## 使用场景

- **投资组合跟踪**:聚合跨链的所有 DeFi 头寸
- **收益挖掘**:检查可领取项和未领取的奖励
- **NFT 投资组合**:跨市场跟踪 NFT 持有量
- **交易历史**:人类可读的链上活动
- **代币价格**:快速价格查询

## API 参考

所有端点使用 `POST https://public.zapper.xyz/graphql` 配合 GraphQL 查询。

完整 API 文档参见 [references/api.md](references/api.md)。

## 要求

- `curl` - HTTP 请求
- `jq` - JSON 解析
- `python3` - 格式化输出
- Zapper API 密钥(提供免费套餐)

## 说明

- 所有端点都需要 API 密钥
- 速率限制取决于你的 Zapper 套餐
- GraphQL 查询允许灵活的数据选择