skills$openclaw/onchain
arein7.9k

by arein

onchain – OpenClaw Skill

onchain is an OpenClaw Skills integration for coding workflows. 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.

7.9k stars3.1k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameonchain
descriptionCLI 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. OpenClaw Skills integration.
ownerarein
repositoryarein/onchain-test
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @arein/onchain-test
last updatedFeb 7, 2026

Maintainer

arein

arein

Maintains onchain in the OpenClaw Skills directory.

View GitHub profile
File Explorer
3 files
.
_meta.json
275 B
README.md
3.5 KB
SKILL.md
3.6 KB
SKILL.md

name: onchain description: 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.

Onchain CLI

CLI for crypto portfolio tracking, market data, and CEX history.

Invocation

onchain <command>

Commands

Market Data

onchain price <token>         # Token price (btc, eth, sol, etc.)
onchain markets               # Market overview with trending

Wallet Data

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

onchain coinbase balance      # Coinbase balances
onchain coinbase history      # Coinbase trade history
onchain binance balance       # Binance balances
onchain binance history       # Binance trade history

Prediction Markets

onchain polymarket trending          # Trending markets
onchain polymarket search <query>    # Search markets
onchain polymarket view <slug>       # View market details

Configuration

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

FeatureAPI KeyGet Key
EVM walletsDEBANK_API_KEYDeBank
Solana walletsHELIUS_API_KEYHelius
Coinbase CEXCOINBASE_API_KEY + COINBASE_API_SECRETCoinbase
Binance CEXBINANCE_API_KEY + BINANCE_API_SECRETBinance

Optional API Keys

FeatureAPI KeyNotes
Market dataCOINGECKO_API_KEYFree tier works, Pro for higher limits
Market fallbackCOINMARKETCAP_API_KEYAlternative market data source

Examples

Get Bitcoin price

onchain price btc

Check wallet balance

onchain balance 0x1234...5678
onchain portfolio main  # Uses saved wallet named "main"

Get trending prediction markets

onchain polymarket trending -n 5

JSON output for scripts

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

# 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')
README.md

@cyberdrk/onchain

CLI for crypto portfolio tracking, market data, and CEX history. Designed for both human use and AI agent integration.

Installation

npm install -g @cyberdrk/onchain

Or run directly with npx:

npx @cyberdrk/onchain price btc

Quick Start

# Check token prices
onchain price btc
onchain price eth sol matic

# View wallet balances (auto-detects EVM/Solana)
onchain balance 0x1234...5678

# CEX balances
onchain coinbase balance
onchain binance balance

# Market overview
onchain markets

# Prediction markets
onchain polymarket trending

Commands

Market Data

onchain price <token>           # Token price with 24h change
onchain markets                 # Market overview with trending coins

Wallet Data

onchain balance <address>       # Token balances (EVM or Solana)
onchain history <address>       # Transaction history
onchain portfolio <address>     # Full portfolio with DeFi positions

CEX Data

onchain coinbase balance        # Coinbase account balances
onchain coinbase history        # Trade history
onchain binance balance         # Binance account balances
onchain binance history         # Trade history

Prediction Markets

onchain polymarket trending     # Trending markets
onchain polymarket search <q>   # Search markets
onchain polymarket view <slug>  # Market details

Configuration

onchain setup                   # Interactive API key setup
onchain config                  # View current configuration
onchain test                    # Test all configured providers

Configuration

Run onchain setup for interactive configuration, or set environment variables:

FeatureEnvironment VariableProvider
EVM walletsDEBANK_API_KEYDeBank Cloud
Solana walletsHELIUS_API_KEYHelius
CoinbaseCOINBASE_API_KEY_ID + COINBASE_API_KEY_SECRETCoinbase CDP
BinanceBINANCE_API_KEY + BINANCE_API_SECRETBinance
Market dataCOINGECKO_API_KEYCoinGecko (optional)
Market fallbackCOINMARKETCAP_API_KEYCoinMarketCap (optional)

Config file locations:

  • Global: ~/.config/onchain/config.json5
  • Local: ./.onchainrc.json5

Global Options

--json              # Output as JSON (for scripting/agents)
--plain             # Disable colors and emoji
--no-color          # Disable colors only
--timeout <ms>      # Request timeout in milliseconds

Agent Integration

This CLI is designed for AI agent use with --json output:

# Get portfolio value
onchain --json portfolio 0x123... | jq '.totalValueUsd'

# Check if market is up
onchain --json markets | jq '.marketCapChange24h > 0'

# Get specific token price
onchain --json price eth | jq '{price: .priceUsd, change: .priceChange24h}'

Exit codes: 0 for success, 1 for errors.

Supported Chains

EVM (via DeBank): Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Base, zkSync Era, Linea, Scroll, Blast, Mantle, and 60+ more.

Solana (via Helius): Full mainnet support including SPL tokens and NFTs.

Development

pnpm install
pnpm run dev price btc    # Run without building
pnpm run build            # Build TypeScript
pnpm run test             # Run tests
pnpm run lint             # Lint code

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

Configuration

```bash onchain setup # Interactive setup wizard onchain config # View current config onchain config wallet add <name> <address> onchain config wallet set-default <name> ```

FAQ

How do I install onchain?

Run openclaw add @arein/onchain-test in your terminal. This installs onchain into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/arein/onchain-test. Review commits and README documentation before installing.