Skip to main content
The official Octav CLI lets you interact with the Octav API directly from your terminal. Built in Rust for speed, it outputs structured JSON — making it ideal for shell scripts, CI pipelines, and AI agent tool-use.
Quick Install — One command to get started:

Why Use the CLI?

AI Agent Tool-Use

Structured JSON output that AI agents can parse and act on — no SDK or HTTP client needed

Terminal Workflows

Pipe portfolio data into jq, scripts, cron jobs, or monitoring systems

Fast & Lightweight

Written in Rust — single binary, no runtime dependencies, instant startup

x402 Agent Payments

Built-in support for the x402 payment protocol — AI agents can pay per request without API keys

Installation


Authentication

Store your API key once and it’s used automatically for all commands.
The API key is resolved in priority order:
  1. --api-key flag (highest precedence)
  2. OCTAV_API_KEY environment variable
  3. ~/.octav/config.json config file
For AI agent workflows, set the OCTAV_API_KEY environment variable so the agent doesn’t need to manage config files.

Commands

Portfolio

Full portfolio including DeFi positions across all chains.
Cost: 1 credit per address
Wallet token balances only (excludes DeFi protocol positions).
Cost: 1 credit per address
Net asset value in a specified currency.
Supported currencies: USD (default), EUR, GBP, JPY, CNY.Cost: 1 credit per address
Aggregated token distribution across all chains for a specific date.
Cost: 1 credit per address

Transactions

Query transaction history with filtering and pagination.
Cost: 1 credit per address
Trigger manual transaction synchronization.
Cost: 1 credit per address

Historical

Portfolio snapshot for a specific date.
Cost: 1 credit per address
Subscribe to automatic daily portfolio snapshots.
Cost: 1 credit per address

Metadata & Specialized

Check sync status for addresses.
Cost: Free
Check API credit balance.
Cost: Free
Check Solana airdrop eligibility.
Cost: 1 credit
Get Polymarket prediction market positions.
Cost: 1 credit

Agent Commands (x402)

For AI agents that pay per request using the x402 payment protocol — no API key required.
Wallet holdings via x402 payment.
Full portfolio via x402 payment.

Using with AI Agents

The CLI outputs structured JSON, making it a natural fit for AI agent tool-use. Agents can invoke octav commands via shell execution and parse the JSON response directly.

Example: Claude Code / Cursor Agent

The agent runs:
And receives structured JSON it can reason over.

Example: Autonomous Monitoring Script

Output Format

All commands return JSON. Pretty-printed by default, compact with --raw:
The --raw flag also disables field stripping, returning the full API response.

Multiple Addresses

Most commands accept multiple addresses as a comma-separated list:
Maximum 10 addresses per request.

Error Handling

Errors are returned as JSON on stdout with a non-zero exit code:

Resources

GitHub

Source code and issues

API Docs

Full REST API reference

Pricing

Credit packages and costs