@elcara-hq/resolvedmarkets-cli
v1.2.1
Published
CLI for Polymarket prediction market orderbook data — crypto, sports, economics, weather. Download, stream, analyze, and backtest across 100+ markets.
Maintainers
Readme
Resolved Markets CLI
Command-line interface for Resolved Markets — Polymarket prediction market orderbook data for crypto, sports, economics, and weather.
Stream, download, analyze, backtest, and replay orderbook data across 100+ markets from your terminal.
Install
npm install -g @elcara-hq/resolvedmarkets-cliSetup
# Save your API key (get one at resolvedmarkets.com/api-keys)
rm-api config --set-key rm_your_api_key
# Verify everything works
rm-api doctorOr use environment variables:
export RM_API_KEY=rm_your_api_keyCommands
Browse Markets
rm-api markets # All live markets
rm-api markets -c crypto # Filter by category
rm-api markets -c sports -s NBA # Filter by subcategory
rm-api categories # List all categories
rm-api search "bitcoin 5 minute" # Fuzzy searchView Orderbooks
rm-api orderbook <market-id> # Live orderbook snapshot
rm-api snapshots <market-id> -l 20 # Recent historical snapshots
rm-api summary <market-id> # Aggregated market stats
rm-api stats # System-wide stats (public)Live Monitoring
rm-api watch # Interactive TUI dashboard
rm-api watch -c crypto -n 3 # Crypto only, 3s refresh
rm-api stream -c BTC # WebSocket stream (JSONL)
rm-api stream -c ETH --format csv # CSV output for piping
rm-api alert spread -m <id> --above 0.05 # Threshold alertsThe watch command is a full terminal UI with keyboard navigation — arrow keys to browse, o to open orderbook detail, c/s/e/w to toggle category filters.
Download & Analyze
rm-api download -c BTC --last 24h # Bulk download to local SQLite
rm-api download -m <id> --format csv -o data.csv # Export to CSV
rm-api analyze spread -m <id> --last 1h # Spread distribution + histogram
rm-api analyze depth -m <id> # Bid/ask depth analysis
rm-api analyze volatility -m <id> # Price movement stats
rm-api gaps -m <id> # Data quality checkBacktest Strategies
rm-api backtest --builtin spread-revert -m <id> --last 24h
rm-api backtest --builtin momentum -m <id>
rm-api backtest --builtin depth-imbalance -m <id>
rm-api backtest --strategy ./my-strategy.ts -m <id> # Custom strategyReturns P&L, Sharpe ratio, win rate, max drawdown, and trade log.
Replay
rm-api replay -m <id> --speed 2 # 2x speed playback
rm-api replay -m <id> --step # Manual frame-by-frameProject Scaffold
rm-api init my-strategy # Generate project with example strategyUtilities
rm-api config --show # View current config
rm-api doctor # Health & diagnostics check
rm-api usage # API tier, credits, rate limits
rm-api completion bash # Shell autocompletion
rm-api update # Check for new versionAuth Resolution Order
--key/-kflagRM_API_KEYenvironment variable~/.resolved-markets/configfile
Output Formats
All data commands support --json for machine-readable output. Stream and download commands support --format jsonl|csv|json.
Requirements
- Node.js >= 18.0.0
- API key from resolvedmarkets.com
