Zerion API Skill
Query web3 wallet data, token prices, NFTs, and transaction history via the Zerion MCP connector.
Authentication
Zerion API requires a key for every request. The key is not stored in the MCP connector settings — the user must provide it each chat session.
Workflow
- At the start of any Zerion-related task, if no API key has been provided yet, ask:
"To query Zerion, I'll need your API key. You can find it at https://dashboard.zerion.io/. Please paste it here."
- Store the key in memory for the duration of the conversation. Never write it to files, display it in artifacts, or log it.
- Pass the key to the MCP server or REST calls as described below.
Auth Format
Zerion uses HTTP Basic Auth: the API key is the username, password is empty.
Authorization: Basic <base64(API_KEY + ":")>
Example: key zk_dev_abc123 → base64 of zk_dev_abc123: → emtfZGV2X2FiYzEyMzo=
MCP Connection
The Zerion API MCP server is at https://developers.zerion.io/mcp.
When using MCP tools directly (outside artifacts), pass the API key as required by the tool parameters.
When building artifacts that call the Anthropic API with MCP, include the key in the inner prompt so the inner Claude can authenticate:
mcp_servers: [
{ type: "url", url: "https://developers.zerion.io/mcp", name: "zerion-mcp" }
]
Important: In artifacts, receive the API key as a prop or state variable — never hardcode it. Example pattern:
// User inputs key via a secure input field (type="password")
const [apiKey, setApiKey] = useState("");
// Pass key to inner Claude prompt so MCP calls authenticate
const prompt = `Using the Zerion API key: ${apiKey}, get portfolio for wallet 0x...`;
Quick Reference: Common Workflows
1. Wallet Portfolio Overview
Prompt the inner Claude to call the Zerion API for the wallet's portfolio:
Get the portfolio for wallet {address} in USD. Include total value, daily changes,
and distribution by chain and position type.
Endpoint: GET /v1/wallets/{address}/portfolio
currency: usd (default), eth, btc, eur, etc.
filter[positions]: only_simple (default), only_complex (DeFi), no_filter (all)
2. Wallet Token Positions
List all fungible positions for wallet {address}, sorted by value descending.
Endpoint: GET /v1/wallets/{address}/positions/
filter[positions]: only_simple | only_complex | no_filter
filter[chain_ids]: comma-separated chain IDs (e.g., ethereum,polygon)
filter[position_types]: wallet, deposit, staked, loan, locked, reward, investment
sort: -value (highest first) or value
filter[trash]: only_non_trash (default)
3. Transaction History
Get recent transactions for wallet {address}, filter for trades only.
Endpoint: GET /v1/wallets/{address}/transactions/
filter[operation_types]: trade, send, receive, deposit, withdraw, mint, burn, claim, approve, etc.
filter[chain_ids]: filter by chain
filter[min_mined_at] / filter[max_mined_at]: timestamp in milliseconds
page[size]: max 100
4. Profit & Loss (PnL)
Get PnL for wallet {address}. Show realized gain, unrealized gain, fees, and net invested.
Endpoint: GET /v1/wallets/{address}/pnl
- Returns:
realized_gain, unrealized_gain, total_fee, net_invested, received_external, sent_external
- Uses FIFO method
filter[chain_ids], filter[fungible_ids]: narrow scope
5. Wallet Balance Chart
Get the balance chart for wallet {address} over the past month.
Endpoint: GET /v1/wallets/{address}/charts/{chart_period}
chart_period: hour, day, week, month, 3months, 6months, year, 5years, max
- Returns array of
[timestamp, balance] points
6. Token Price & Search
Search for the fungible asset "ethereum" and return its price and market data.
Endpoint: GET /v1/fungibles/
filter[search_query]: text search (e.g., "ethereum", "USDC")
sort: -market_data.market_cap, -market_data.price.last, etc.
- Returns:
name, symbol, price, market_cap, circulating_supply, changes (1d/30d/90d/365d)
7. Token Price Chart
Get the price chart for fungible {fungible_id} over the past week.
Endpoint: GET /v1/fungibles/{fungible_id}/charts/{chart_period}
- Same chart periods as wallet charts
- Returns
[timestamp, price] points
8. NFT Positions
List all NFT positions for wallet {address}, sorted by floor price descending.
Endpoint: GET /v1/wallets/{address}/nft-positions/
sort: -floor_price, floor_price, created_at, -created_at
filter[chain_ids]: filter by chain
include: nfts, nft_collections, wallet_nft_collections for richer data
9. NFT Portfolio Value
Endpoint: GET /v1/wallets/{address}/nft-portfolio
- Returns total NFT portfolio value
Building Artifacts with Zerion Data
When building React/HTML artifacts that display Zerion data:
- Collect the API key securely via a
type="password" input field
- Never display or log the key in the UI
- Pass it through the MCP prompt so the inner Claude can authenticate
// apiKey comes from a password input, never hardcoded
const response = await fetch("https://api.anthropic.com/v1/messages", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "claude-sonnet-4-20250514",
max_tokens: 1000,
messages: [
{
role: "user",
content: `Use the Zerion API with key "${apiKey}" to get the portfolio
overview for wallet ${walletAddress} in USD.
Return ONLY a JSON object with: totalValue, dailyChangePercent,
dailyChangeAbsolute, topChains (array of {chain, value}),
positionBreakdown (wallet, deposited, staked, borrowed, locked).`
}
],
mcp_servers: [
{ type: "url", url: "https://developers.zerion.io/mcp", name: "zerion-mcp" }
]
})
});
Processing MCP Responses
MCP responses contain multiple content blocks. Extract data by type:
const data = await response.json();
// Get tool results (actual Zerion data)
const toolResults = data.content
.filter(item => item.type === "mcp_tool_result")
.map(item => item.content?.[0]?.text || "")
.join("\n");
// Get Claude's text analysis
const textResponses = data.content
.filter(item => item.type === "text")
.map(item => item.text)
.join("\n");
Key Notes
- Address formats: Supports EVM addresses (0x...) and Solana addresses. ENS names may need resolution first.
- Solana limitations: No protocol positions or NFT transactions for Solana addresses.
- Currency options:
usd, eth, btc, eur, krw, rub, gbp, aud, cad, inr, jpy, nzd, try, zar, cny, chf
- Pagination: Use
links.next from responses for pagination; never construct page[after] manually.
- Rate limits: API returns 429 on throttling. Implement retry with backoff in artifacts.
- Treat IDs as opaque strings: Never assume format of IDs; they may change.
- DeFi positions: Use
filter[positions]=no_filter to include protocol positions alongside wallet positions.
- LP grouping: Liquidity pool positions share a
group_id attribute — group by it to display pools correctly.
Detailed Endpoint Reference
For full parameter details, response schemas, and edge cases:
- Wallet endpoints: See references/wallet-endpoints.md
- Fungible & NFT endpoints: See references/fungible-nft-endpoints.md
1---2name: zerion-api-23description: >4 Query blockchain wallet data, token prices, and transaction history using the Zerion API5 via its MCP connector. Use this skill whenever the user asks about: crypto wallet balances,6 portfolio values, token holdings or positions, DeFi positions (staking, lending, LP),7 wallet PnL (profit and loss), transaction history, token/fungible asset prices or charts,8 NFT holdings or NFT portfolio value, or any web3 wallet analytics. Triggers on mentions of9 wallet addresses (0x...), ENS names, token names/symbols, "portfolio", "positions", "PnL",10 "transactions", "balance", "holdings", "NFTs", or any crypto/DeFi analytics queries.11 Also use when building artifacts or dashboards that display wallet or token data.12metadata:13 source: https://skillmd.com/skills/modbender/zerion-api-214---1516# Zerion API Skill1718Query web3 wallet data, token prices, NFTs, and transaction history via the Zerion MCP connector.1920## Authentication2122Zerion API requires a key for every request. The key is **not** stored in the MCP connector settings — the user must provide it each chat session.2324### Workflow25261. **At the start of any Zerion-related task**, if no API key has been provided yet, ask:27 *"To query Zerion, I'll need your API key. You can find it at https://dashboard.zerion.io/. Please paste it here."*282. **Store the key in memory** for the duration of the conversation. Never write it to files, display it in artifacts, or log it.293. **Pass the key** to the MCP server or REST calls as described below.3031### Auth Format3233Zerion uses HTTP Basic Auth: the API key is the username, password is empty.3435```36Authorization: Basic <base64(API_KEY + ":")>37```3839Example: key `zk_dev_abc123` → base64 of `zk_dev_abc123:` → `emtfZGV2X2FiYzEyMzo=`4041## MCP Connection4243The Zerion API MCP server is at `https://developers.zerion.io/mcp`.4445When using MCP tools directly (outside artifacts), pass the API key as required by the tool parameters.4647When building artifacts that call the Anthropic API with MCP, include the key in the inner prompt so the inner Claude can authenticate:4849```javascript50mcp_servers: [51 { type: "url", url: "https://developers.zerion.io/mcp", name: "zerion-mcp" }52]53```5455**Important**: In artifacts, receive the API key as a prop or state variable — never hardcode it. Example pattern:5657```jsx58// User inputs key via a secure input field (type="password")59const [apiKey, setApiKey] = useState("");6061// Pass key to inner Claude prompt so MCP calls authenticate62const prompt = `Using the Zerion API key: ${apiKey}, get portfolio for wallet 0x...`;63```6465## Quick Reference: Common Workflows6667### 1. Wallet Portfolio Overview6869Prompt the inner Claude to call the Zerion API for the wallet's portfolio:7071```72Get the portfolio for wallet {address} in USD. Include total value, daily changes,73and distribution by chain and position type.74```7576**Endpoint:** `GET /v1/wallets/{address}/portfolio`77- `currency`: usd (default), eth, btc, eur, etc.78- `filter[positions]`: `only_simple` (default), `only_complex` (DeFi), `no_filter` (all)7980### 2. Wallet Token Positions8182```83List all fungible positions for wallet {address}, sorted by value descending.84```8586**Endpoint:** `GET /v1/wallets/{address}/positions/`87- `filter[positions]`: `only_simple` | `only_complex` | `no_filter`88- `filter[chain_ids]`: comma-separated chain IDs (e.g., `ethereum,polygon`)89- `filter[position_types]`: `wallet`, `deposit`, `staked`, `loan`, `locked`, `reward`, `investment`90- `sort`: `-value` (highest first) or `value`91- `filter[trash]`: `only_non_trash` (default)9293### 3. Transaction History9495```96Get recent transactions for wallet {address}, filter for trades only.97```9899**Endpoint:** `GET /v1/wallets/{address}/transactions/`100- `filter[operation_types]`: `trade`, `send`, `receive`, `deposit`, `withdraw`, `mint`, `burn`, `claim`, `approve`, etc.101- `filter[chain_ids]`: filter by chain102- `filter[min_mined_at]` / `filter[max_mined_at]`: timestamp in milliseconds103- `page[size]`: max 100104105### 4. Profit & Loss (PnL)106107```108Get PnL for wallet {address}. Show realized gain, unrealized gain, fees, and net invested.109```110111**Endpoint:** `GET /v1/wallets/{address}/pnl`112- Returns: `realized_gain`, `unrealized_gain`, `total_fee`, `net_invested`, `received_external`, `sent_external`113- Uses FIFO method114- `filter[chain_ids]`, `filter[fungible_ids]`: narrow scope115116### 5. Wallet Balance Chart117118```119Get the balance chart for wallet {address} over the past month.120```121122**Endpoint:** `GET /v1/wallets/{address}/charts/{chart_period}`123- `chart_period`: `hour`, `day`, `week`, `month`, `3months`, `6months`, `year`, `5years`, `max`124- Returns array of `[timestamp, balance]` points125126### 6. Token Price & Search127128```129Search for the fungible asset "ethereum" and return its price and market data.130```131132**Endpoint:** `GET /v1/fungibles/`133- `filter[search_query]`: text search (e.g., "ethereum", "USDC")134- `sort`: `-market_data.market_cap`, `-market_data.price.last`, etc.135- Returns: `name`, `symbol`, `price`, `market_cap`, `circulating_supply`, `changes` (1d/30d/90d/365d)136137### 7. Token Price Chart138139```140Get the price chart for fungible {fungible_id} over the past week.141```142143**Endpoint:** `GET /v1/fungibles/{fungible_id}/charts/{chart_period}`144- Same chart periods as wallet charts145- Returns `[timestamp, price]` points146147### 8. NFT Positions148149```150List all NFT positions for wallet {address}, sorted by floor price descending.151```152153**Endpoint:** `GET /v1/wallets/{address}/nft-positions/`154- `sort`: `-floor_price`, `floor_price`, `created_at`, `-created_at`155- `filter[chain_ids]`: filter by chain156- `include`: `nfts`, `nft_collections`, `wallet_nft_collections` for richer data157158### 9. NFT Portfolio Value159160**Endpoint:** `GET /v1/wallets/{address}/nft-portfolio`161- Returns total NFT portfolio value162163## Building Artifacts with Zerion Data164165When building React/HTML artifacts that display Zerion data:1661671. **Collect the API key securely** via a `type="password"` input field1682. **Never display or log** the key in the UI1693. **Pass it through the MCP prompt** so the inner Claude can authenticate170171```javascript172// apiKey comes from a password input, never hardcoded173const response = await fetch("https://api.anthropic.com/v1/messages", {174 method: "POST",175 headers: { "Content-Type": "application/json" },176 body: JSON.stringify({177 model: "claude-sonnet-4-20250514",178 max_tokens: 1000,179 messages: [180 {181 role: "user",182 content: `Use the Zerion API with key "${apiKey}" to get the portfolio183 overview for wallet ${walletAddress} in USD.184 Return ONLY a JSON object with: totalValue, dailyChangePercent,185 dailyChangeAbsolute, topChains (array of {chain, value}),186 positionBreakdown (wallet, deposited, staked, borrowed, locked).`187 }188 ],189 mcp_servers: [190 { type: "url", url: "https://developers.zerion.io/mcp", name: "zerion-mcp" }191 ]192 })193});194```195196### Processing MCP Responses197198MCP responses contain multiple content blocks. Extract data by type:199200```javascript201const data = await response.json();202203// Get tool results (actual Zerion data)204const toolResults = data.content205 .filter(item => item.type === "mcp_tool_result")206 .map(item => item.content?.[0]?.text || "")207 .join("\n");208209// Get Claude's text analysis210const textResponses = data.content211 .filter(item => item.type === "text")212 .map(item => item.text)213 .join("\n");214```215216## Key Notes217218- **Address formats**: Supports EVM addresses (0x...) and Solana addresses. ENS names may need resolution first.219- **Solana limitations**: No protocol positions or NFT transactions for Solana addresses.220- **Currency options**: `usd`, `eth`, `btc`, `eur`, `krw`, `rub`, `gbp`, `aud`, `cad`, `inr`, `jpy`, `nzd`, `try`, `zar`, `cny`, `chf`221- **Pagination**: Use `links.next` from responses for pagination; never construct `page[after]` manually.222- **Rate limits**: API returns 429 on throttling. Implement retry with backoff in artifacts.223- **Treat IDs as opaque strings**: Never assume format of IDs; they may change.224- **DeFi positions**: Use `filter[positions]=no_filter` to include protocol positions alongside wallet positions.225- **LP grouping**: Liquidity pool positions share a `group_id` attribute — group by it to display pools correctly.226227## Detailed Endpoint Reference228229For full parameter details, response schemas, and edge cases:230- **Wallet endpoints**: See [references/wallet-endpoints.md](references/wallet-endpoints.md)231- **Fungible & NFT endpoints**: See [references/fungible-nft-endpoints.md](references/fungible-nft-endpoints.md)