Overview
The Polymarket CLI is a Rust-based command-line tool purpose-built for AI agent access to the world’s largest prediction market. Launched February 24, 2026, it provides terminal-based access to browsing markets, reading order books, placing trades, and managing positions. Every command supports JSON output for easy consumption by scripts and agents.
A critical design choice: most commands work without a wallet. Agents can browse, search, and analyze markets in read-only mode, only needing a wallet when they’re ready to trade. This lets your Layer 4 intelligence operate independently from your Layer 2 wallet during research.
Key Features
Market browsing and search — List markets, search by keyword, filter by tag (politics, crypto, sports), and get full details on any market. All without authentication.
Order book access — Read order books, midpoint prices, and price history for any market. Essential data for arbitrage and market-making agents.
Trading — Place market orders, limit orders, cancel orders, and manage positions. Requires a wallet (private key or proxy wallet).
JSON output — The -o json flag on every command produces structured data ready for jq piping, Python parsing, or any programmatic consumption.
Interactive shell — REPL mode for exploration: polymarket shell lets you run commands interactively with command history.
Wallet management — Create new wallets, import existing keys, and manage Polymarket’s proxy wallet system.
Quick Reference
# Browse (no wallet needed)
polymarket markets list --limit 10
polymarket markets search "bitcoin"
polymarket clob book TOKEN_ID
polymarket -o json markets list --limit 50
# Trade (wallet required)
polymarket wallet create
polymarket clob market-order --token TOKEN_ID --side buy --amount 5
polymarket clob create-order --token TOKEN_ID --side buy --price 0.45 --size 10
polymarket clob cancel ORDER_ID
Agent-Friendliness
| Aspect | Rating |
|---|---|
| Installation | Easy — Homebrew, cargo, or install script |
| Read-only access | Excellent — no auth needed to browse |
| JSON output | Yes — every command supports -o json |
| Documentation | Good — comprehensive README on GitHub |
| Scriptability | Excellent — designed for piping and automation |
| Maturity | Early/experimental — APIs may change |
Pricing
Free and open source (MIT license). Trading fees set by Polymarket per market.
Links
- GitHub: github.com/Polymarket/polymarket-cli
- Polymarket docs: docs.polymarket.com
- CLOB API: docs.polymarket.com/api
Best For
The fastest path to agent-accessible prediction market data and trading. Ideal for agents that need to scan many markets, read order books, and execute programmatic trades. The JSON output mode makes it a natural fit for any LLM-powered analysis pipeline.