Give your AI agent
a brokerage account
Broker APIs exist. SDKs exist. But AI agents use the command line. broker-cli turns any brokerage into shell commands your agent already understands, with a SKILL.md that teaches it everything.
curl -fsSL https://brokercli.com/install | bash
Run broker setup once after install to choose your provider and configure credentials.
Why a CLI for agentic trading?
AI coding agents — Codex, Claude Code, OpenClaw — interact with the world through shell commands. They can git push, run tests, deploy apps. But they can't trade, because broker APIs require HTTP clients, OAuth flows, and SDK setup that agents don't do well.
broker-cli closes that gap. Install it, and your agent can check positions, analyze exposure, place orders, and manage a portfolio using the same interface it uses for everything else: the terminal.
Built for agents
SKILL.md Included
Ships with a skill file that Codex, Claude Code, and OpenClaw agents read automatically. Your agent knows every command, flag, and workflow without extra prompting.
CLI-First, Agent-Ready
Every action is a shell command with deterministic JSON envelopes (`ok,data,error,meta`). Agents don't need SDKs, API keys, or custom integrations — just bash.
Autonomous Execution
Persistent auth keeps sessions alive 24/7. No manual logins, no token expiry interruptions. Your agent trades while you sleep.
Multi-Broker
Unified commands across E*Trade and Interactive Brokers. One skill file, one interface — agents switch brokers without relearning anything.
Full Options Support
Option chains with greeks, expiry filtering, and strike ranges. Agents can evaluate and execute complex derivatives strategies.
Supported Brokers
| Feature | Interactive Brokers | E*Trade |
|---|---|---|
| Real-time quotes | ||
| Option chains + greeks | ||
| All order types | ||
| Cancel all | ||
| Positions & P/L | ||
| Exposure analysis | ||
| Persistent auth | ||
| Streaming events | — | |
| Historical bars | — |
broker daemon start --paper— after broker setup, use full paper trading mode. Test strategies with simulated funds, go live when ready.See it in action
Point your agent at a task. It reads SKILL.md, discovers the commands, and executes.
# Tell your agent to rebalance
$ codex exec "Check my portfolio. If any position exceeds 20% of NLV, trim it to 15%."
agent → reading SKILL.md...
agent → broker exposure --by symbol
agent → TSLA is 34.2% of NLV. Reducing to 15%.
agent → broker order sell TSLA 142 --limit 248.50 --dry-run --idempotency-key rebalance-tsla-2026-02-19
Order placed. TSLA exposure now 15.1% of NLV.
# Or run a more complex strategy
$ codex exec "Find AAPL puts expiring next Friday with delta between -0.30 and -0.15. Buy the one with the best bid-ask spread."
agent → broker chain AAPL --type put --expiry 2026-02 --limit 80 --fields strike,expiry,bid,ask,delta
agent → Filtering 47 contracts: delta range [-0.30, -0.15]...
agent → Best spread: AAPL 220P 02/20 (delta: -0.22, spread: $0.03)
agent → broker order buy AAPL250220P220 1 --limit 3.45 --idempotency-key aapl-hedge-220p
Order placed.
Commands
Everything an agent needs, nothing it doesn't.