AI Agents

A Rust CLI for Crypto Portfolio Data

Query multi-chain portfolios, transactions and NAV from the terminal with a single Rust binary — built for shell pipelines, CI jobs and sandboxed AI agents.

Octav Team2 min read
Banner: A single Rust binary for portfolio data

octav-cli exposes the full Octav API from the terminal. It is written in Rust, which matters for one practical reason: it is a single static binary with no runtime to install.

That is the difference between "add a dependency, pin a version, keep an SDK in sync" and "drop a binary in the container".

Basic use

export OCTAV_API_KEY="your-key"
 
octav portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
octav nav 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
octav transactions 0xYourAddress --limit 50 --chain ethereum

Output is JSON, which is the point — it composes with everything else.

Where a CLI beats an SDK

Shell pipelines. Exposure by chain, with no application code:

octav portfolio 0xYourAddress \
  | jq -r '.positions[] | "\(.chain)\t\(.value)"' \
  | awk -F'\t' '{s[$1]+=$2} END {for (c in s) printf "%-12s %12.2f\n", c, s[c]}' \
  | sort -k2 -nr

Scheduled jobs. A cron entry that writes a daily NAV to a file is three lines and needs no project scaffolding:

0 0 * * * octav nav $ADDRESSES >> /var/log/nav-$(date +\%F).json

CI checks. Fail a pipeline if a treasury address drifts outside expected bounds — a shell script with jq and an exit code, not a service.

Sandboxed AI agents. An agent with shell access can call the CLI without you writing tool definitions. No SDK to install in the sandbox, no language runtime assumption, and the same invocation works from any language's subprocess call. This is why it sits in the agent toolkit alongside the MCP server.

Batching matters

The single biggest cost lever is passing multiple addresses to one invocation rather than looping:

# One credit, three wallets, one round trip
octav portfolio 0xAddressOne,0xAddressTwo,0xAddressThree
 
# Three credits, three round trips — avoid
for a in 0xOne 0xTwo 0xThree; do octav portfolio "$a"; done

Rate limiting is 360 requests per minute per key and is shared across every access method, so a CLI loop and a running application draw on the same budget.

What it returns

The same decoded data as the REST API — tokens plus every DeFi position, including Solana, perps and options — in one response shape. Full surface in the endpoint reference.

Choosing between the front doors

You areUse
Writing a backend serviceThe REST API
Scripting, in CI, or at a promptThe CLI
Running an agent in Claude or CodexThe MCP server
Running an unprovisioned autonomous agentx402

All four read the same data. See Every Octav Tool and When to Use It.

Keep reading

  • Banner: Four ways to hand an agent on-chain data
    AI Agents

    AI Agent Tools for Crypto Portfolio Data

    A survey of how AI agents get on-chain data — MCP servers, agent skills, CLIs and pay-per-call rails — and the failure modes specific to autonomous consumption.

    2 min read

  • Banner: Give your agent a wallet it can actually read
    AI Agents

    A Crypto Portfolio MCP Server for AI Agents

    How to give Claude, Codex or Gemini live on-chain portfolio data through an MCP server, and why token-only APIs make agents confidently wrong about wallets.

    2 min read

  • Banner: Let an agent pay per API call
    AI Agents

    x402: Pay-Per-Call API Access for Agents

    How the HTTP 402 status code lets an autonomous agent pay for an API request inline, removing the need to provision and manage a long-lived API key.

    2 min read