onchain
CLI for crypto portfolio tracking, market data, and CEX history. Use when the user asks about crypto prices, wallet balances, portfolio values, Coinbase/Binance holdings, or Polymarket predictions.
Best use case
onchain is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
CLI for crypto portfolio tracking, market data, and CEX history. Use when the user asks about crypto prices, wallet balances, portfolio values, Coinbase/Binance holdings, or Polymarket predictions.
Teams using onchain should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/test/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How onchain Compares
| Feature / Agent | onchain | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
CLI for crypto portfolio tracking, market data, and CEX history. Use when the user asks about crypto prices, wallet balances, portfolio values, Coinbase/Binance holdings, or Polymarket predictions.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Onchain CLI
CLI for crypto portfolio tracking, market data, and CEX history.
## Invocation
```
onchain <command>
```
## Commands
### Market Data
```bash
onchain price <token> # Token price (btc, eth, sol, etc.)
onchain markets # Market overview with trending
```
### Wallet Data
```bash
onchain balance [address] # Token balances (auto-detects EVM/Solana)
onchain balance --chain polygon # Filter by chain
onchain history [address] # Transaction history
onchain portfolio [address] # Full portfolio with DeFi positions
```
### CEX Data
```bash
onchain coinbase balance # Coinbase balances
onchain coinbase history # Coinbase trade history
onchain binance balance # Binance balances
onchain binance history # Binance trade history
```
### Prediction Markets
```bash
onchain polymarket trending # Trending markets
onchain polymarket search <query> # Search markets
onchain polymarket view <slug> # View market details
```
### Configuration
```bash
onchain setup # Interactive setup wizard
onchain config # View current config
onchain config wallet add <name> <address>
onchain config wallet set-default <name>
```
## Global Options
- `--json` - Output as JSON (agent-friendly)
- `--plain` - Disable colors and emoji
- `--timeout <ms>` - Request timeout
## Configuration
Config file: `~/.config/onchain/config.json5`
### Required API Keys
| Feature | API Key | Get Key |
|---------|---------|---------|
| EVM wallets | `DEBANK_API_KEY` | [DeBank](https://cloud.debank.com/) |
| Solana wallets | `HELIUS_API_KEY` | [Helius](https://helius.xyz/) |
| Coinbase CEX | `COINBASE_API_KEY` + `COINBASE_API_SECRET` | [Coinbase](https://www.coinbase.com/settings/api) |
| Binance CEX | `BINANCE_API_KEY` + `BINANCE_API_SECRET` | [Binance](https://www.binance.com/en/my/settings/api-management) |
### Optional API Keys
| Feature | API Key | Notes |
|---------|---------|-------|
| Market data | `COINGECKO_API_KEY` | Free tier works, Pro for higher limits |
| Market fallback | `COINMARKETCAP_API_KEY` | Alternative market data source |
## Examples
### Get Bitcoin price
```bash
onchain price btc
```
### Check wallet balance
```bash
onchain balance 0x1234...5678
```
### View portfolio with DeFi positions
```bash
onchain portfolio main # Uses saved wallet named "main"
```
### Get trending prediction markets
```bash
onchain polymarket trending -n 5
```
### JSON output for scripts
```bash
onchain --json price eth | jq '.priceUsd'
```
## Supported Chains
### EVM (via DeBank)
Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Base, zkSync Era, Linea, Scroll, Blast, Mantle, Gnosis, Fantom, Celo, and more.
### Solana (via Helius)
Full Solana mainnet support including SPL tokens and NFTs.
## Agent Integration
This CLI is designed for agent use. Key patterns:
1. **Always use `--json`** for programmatic access
2. **Check exit codes** - 0 for success, 1 for error
3. **Use saved wallets** - Configure once with `onchain setup`, reference by name
4. **Rate limiting** - APIs have rate limits, add delays between rapid calls
### Example Agent Usage
```bash
# Get portfolio value
VALUE=$(onchain --json portfolio main | jq -r '.totalValueUsd')
# Get price with change
onchain --json price btc | jq '{price: .priceUsd, change24h: .priceChange24h}'
# Check if market is bullish
CHANGE=$(onchain --json markets | jq '.marketCapChange24h')
```Related Skills
onchain-skill-audit
On-chain skill provenance registry.
paylock
Non-custodial SOL escrow for AI agent deals.
agent-reputation
summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.
Telecom Agent Skill
Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.
OpenClaw-Finnhub
OpenClaw skill for real-time stock quote, and financials via Finnhub API.
```markdown
# OpenClaw-Last.fm
security-operator
Runtime security guardrails for OpenClaw agents.
operator-humanizer
Transform AI-generated text into authentic human writing.
kit-email-operator
**AI-powered email marketing for Kit (ConvertKit)**.
agora
Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.
surf-check
Surf forecast decision engine.
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.