Get the FREE Ultimate OpenClaw Setup Guide →
z

Zapper Api

Scanned

@zivhm

npx machina-cli add skill @zivhm/openclaw-zapper-api --openclaw
Files (1)
SKILL.md
3.4 KB

Zapper API

Query DeFi portfolios, NFTs, and transactions across 50+ chains using Zapper's GraphQL API.

Setup

  1. Get API key from Zapper Dashboard (free tier available)
  2. Configure in ~/.config/zapper/addresses.json:
    {
      "apiKey": "your-api-key",
      "wallets": [
        {"label": "Main", "address": "0x..."},
        {"label": "DeFi", "address": "0x..."}
      ]
    }
    

Or set environment variable: export ZAPPER_API_KEY="your-api-key"

Commands

CommandDescriptionExample
portfolio <address>Token + DeFi totalszapper.py portfolio 0x123...
tokens <address>Detailed token holdingszapper.py tokens 0x123...
apps <address>DeFi positions (LPs, lending, staking)zapper.py apps 0x123...
nfts <address>NFT holdings by valuezapper.py nfts 0x123...
tx <address>Recent transactions (30 days)zapper.py tx 0x123...
price <symbol>Token price lookupzapper.py price ETH
claimables <address>Unclaimed rewardszapper.py claimables 0x123...
configShow configurationzapper.py config

Options

FlagCommandsDescription
--24hportfolio, tokensShow 24h price changes
--shortportfolioOutput only total value
--per-walletportfolioShow each configured wallet separately
--jsonallOutput raw JSON
--limit NmostMax items to display

Usage

# Portfolio summary
python3 scripts/zapper.py portfolio 0xADDRESS

# With 24h price changes
python3 scripts/zapper.py portfolio 0xADDRESS --24h

# Just total value
python3 scripts/zapper.py portfolio 0xADDRESS --short

# Per-wallet breakdown
python3 scripts/zapper.py portfolio --per-wallet

# Token holdings with prices
python3 scripts/zapper.py tokens 0xADDRESS --24h

# DeFi positions
python3 scripts/zapper.py apps 0xADDRESS

# NFT holdings
python3 scripts/zapper.py nfts 0xADDRESS

# Recent transactions
python3 scripts/zapper.py tx 0xADDRESS

# Token price
python3 scripts/zapper.py price ETH

# Unclaimed rewards
python3 scripts/zapper.py claimables 0xADDRESS

# JSON output
python3 scripts/zapper.py portfolio 0xADDRESS --json

Wallet Labels

Use configured wallet labels instead of addresses:

python3 scripts/zapper.py portfolio "Main"
python3 scripts/zapper.py tokens "DeFi"

Supported Tokens (price command)

ETH, WETH, USDC, USDT, DAI, WBTC, LINK, UNI, AAVE, MKR

Supported Chains

Ethereum, Base, Arbitrum, Optimism, Polygon, Solana, BNB Chain, Avalanche, zkSync, Linea, Scroll, Blast, and 40+ more.

Notes

  • Free tier API key available at zapper.xyz/developers
  • Rate limits apply - avoid rapid repeated requests
  • NFT valuations based on floor prices
  • Transaction history limited to 30 days

References

Source

git clone https://clawhub.ai/zivhm/openclaw-zapper-apiView on GitHub

Overview

Fetch DeFi portfolios, token holdings, NFTs, and transaction history across 50+ chains using Zapper's GraphQL API. It helps answer questions about wallet balances, DeFi positions, NFT collections, token prices, and activity trends for analysis and reporting.

How This Skill Works

Obtain a Zapper API key from the dashboard and configure access via ~/.config/zapper/addresses.json or the ZAPPER_API_KEY environment variable. Use the Zapper CLI commands (portfolio, tokens, apps, nfts, tx, price, claimables) or GraphQL endpoints to retrieve data, with options like --24h, --short, and --json for tailored outputs.

When to Use It

  • To check wallet balances and DeFi exposure across 50+ chains
  • When analyzing DeFi positions such as LPs, lending, or staking
  • To review NFT holdings and valuations by collection or value
  • When fetching token prices and 24h price changes
  • To pull recent transactions or 30-day activity history

Quick Start

  1. Step 1: Obtain a Zapper API key from the Zapper dashboard
  2. Step 2: Configure addresses.json or export ZAPPER_API_KEY in your environment
  3. Step 3: Run a command like 'zapper.py portfolio 0xADDRESS' to fetch data

Best Practices

  • Securely store and manage your API key; prefer environment variables for automation
  • Configure per-wallet labels to simplify multi-wallet workflows
  • Use --json for machine-readable output when integrating with apps
  • Be mindful of 30-day transaction history limits and rate limits
  • Verify chain coverage and token support before multi-chain requests

Example Use Cases

  • Retrieve a portfolio total and per-wallet breakdown for a user
  • List all NFT holdings and their estimated floor-based values
  • Check 24h price changes for ETH, USDC, and popular tokens
  • Inspect recent transactions for a given address within 30 days
  • Query DeFi positions (LPs, lending, staking) across Ethereum and Polygon

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers