Skip to main content
Practical examples that build from one-liners to full automation scripts. Every command is copy-pasteable and every JSON output is realistic.
Want scheduled automations? See the Automations page for production-ready cron jobs — airdrop scanners, transaction monitors, nightly exports, and more.
All examples assume you’ve already authenticated with octav auth set-key YOUR_API_KEY. See Authentication for setup.

1. Quick Portfolio Check

Start with simple one-liners to explore a wallet.

2. Daily Portfolio Monitor

A cron-ready script that logs NAV to a CSV and alerts on drops.
Set it up with cron:

3. Multi-Wallet Aggregation

Sum NAV across several wallets, with a per-wallet breakdown.

4. Transaction Export to CSV

Fetch a year of transactions and convert to a spreadsheet-ready CSV.
One row per asset moved: a swap gives an in row and an out row with the same hash. --limit 250 returns one page; for more, repeat with --offset 250, 500, … as in the Nightly Transaction Export.

5. Whale Alert Script

Monitor a wallet for large transactions and log alerts.

6. AI Agent Tool-Use

See how an AI agent like Claude Code uses the CLI as a tool.
1

You give the agent an instruction

2

The agent runs CLI commands

3

The agent receives structured JSON

4

The agent produces analysis


7. Airdrop Checker

Quick check for Solana airdrops with formatted output. The response uses the portfolio format: airdrops sit under each protocol’s AIRDROP positions (see Airdrop).
✓ marks airdrops that can be claimed now (isClaimable); … marks ones that are not claimable yet.

Tips & Patterns

The --raw flag outputs compact JSON and includes the full API response — ideal for piping to jq or feeding to AI agents.
Use watch for a live-updating dashboard in your terminal.
Always check the exit code and handle errors gracefully.
Most commands cost 1 credit per address. Plan your scripts accordingly.

Next Steps

Install CLI

One-command install for macOS and Linux

All Commands

Full command reference with flags

MCP Server

Connect to AI assistants directly via MCP