# Best Prediction Market CLI Tools in 2026: Scan Kalshi and Polymarket from Your Terminal
Prediction markets have matured. Kalshi is now a regulated futures exchange with hundreds of active contracts. Polymarket routes billions in volume through onchain order books. And if you're still navigating either platform through a browser, you're leaving alpha on the table — and wasting time.
The serious edge in 2026 isn't a secret model or a insider thesis. It's speed and signal filtering. The traders and developers winning consistently are the ones who can scan market conditions programmatically, react to new contract listings before the crowd prices them in, and run structured theses against live order books — all without leaving the terminal.
This post covers the best CLI tools available right now for doing exactly that. We'll focus on what each tool actually does, how to use it, and where it fits in a real workflow.
---
## Why CLI Tools for Prediction Markets?
Before getting into the tools, it's worth being direct about the value proposition.
Prediction market UIs are built for retail discovery. They optimize for browsing and impulse participation, not for structured research or systematic position management. If you're managing more than a handful of positions across Kalshi and Polymarket simultaneously, the web interfaces become a liability.
CLI tools give you:
- **Scriptable market scanning** — pipe outputs into your own analysis pipeline
- **Faster position awareness** — see all your open positions in one view without clicking through tabs
- **Thesis-driven filtering** — query contracts by keyword, probability range, liquidity threshold, or expiry window
- **Automation hooks** — wire market signals into Telegram alerts, cron jobs, or agent loops
- **Audit trails** — log every scan, alert, and trade decision to disk for post-session review
None of this requires you to be a quant. It requires you to be comfortable with a terminal.
---
## The Tools Worth Using in 2026
### 1. SimpleFunctions (`sf`)
[SimpleFunctions](https://simplefunctions.dev) is the most complete terminal-native runtime for prediction markets currently available. It's not just a query wrapper — it's an agentic trading framework built specifically for Kalshi and Polymarket, with a CLI that covers scanning, position management, dashboards, and autonomous agent execution.
Install it globally:
npm install -g @spfunctions/cli
Once installed, you have four primary commands: `sf scan`, `sf agent`, `sf positions`, and `sf dashboard`.
#### `sf scan` — Market Scanning
This is where most workflows start. `sf scan` lets you query live markets across both exchanges with filters for probability, volume, category, and keyword.
# Scan for all Fed decision markets on Kalshi
sf scan --exchange kalshi --ticker KXFEDDECISION
# Find all oil markets with YES probability between 20% and 45%
sf scan --exchange kalshi --ticker KXWTIMAX --prob-min 0.20 --prob-max 0.45
# Scan for recession indicator markets expiring in the next 30 days
sf scan --exchange kalshi --ticker KXRECSSNBER --days-to-expiry 30
The output is structured — you can pipe it directly into `jq` or your own scripts:
sf scan --exchange kalshi --keyword "inflation" --format json | jq '.markets[] | select(.volume > 50000)'
For Polymarket:
# Scan Polymarket for election-adjacent contracts above $100k volume
sf scan --exchange polymarket --keyword "election" --min-volume 100000
This is the command you'll run first thing every morning if you're actively following macro markets.
#### `sf agent` — Thesis-Driven Autonomous Trading
This is what sets SimpleFunctions apart from simple wrappers. `sf agent` runs an agentic loop against a thesis you define in natural language or structured config. The agent monitors relevant markets, evaluates new contract listings against your thesis, and can surface — or execute — trades when conditions align.
# Run an agent with a thesis around Fed rate decisions
sf agent --thesis "Fed holds rates through Q3 2026" --exchanges kalshi --dry-run
With `--dry-run`, it logs what trades it would make without executing. Useful for backtesting thesis logic against live market conditions before committing capital.
For production use, you can define thesis configs in YAML:
# thesis.yaml
thesis: "WTI crude stays below $85 through summer 2026"
exchanges:
- kalshi
tickers:
- KXWTIMAX
entry_prob_max: 0.35
position_size_usd: 250
alerts:
telegram: true
bash
sf agent --config thesis.yaml
The agent documentation at [simplefunctions.dev/docs/guide](https://simplefunctions.dev/docs/guide) goes deep on thesis configuration, including how to chain multiple theses and set conditional triggers.
#### `sf positions` — Portfolio View
# View all open positions across both exchanges
sf positions --all
# Filter to Kalshi only, sorted by P&L
sf positions --exchange kalshi --sort pnl
# Export positions to CSV for external analysis
sf positions --all --format csv > positions_$(date +%Y%m%d).csv
This becomes essential once you're holding ten or more positions. The native platform UIs don't give you a clean cross-exchange view.
#### `sf dashboard` — Live Terminal UI
sf dashboard
Launches a `blessed`-based terminal dashboard with live price feeds, position P&L, and market alerts. Useful if you're running SimpleFunctions as a monitoring layer during active trading sessions.
#### MCP Server and REST API
Beyond the CLI, SimpleFunctions exposes an MCP server (Model Context Protocol) and REST API — which means you can integrate it with Claude, GPT-4, or any LLM toolchain as a live prediction market data source. This is increasingly useful for developers building research assistants or automated briefing pipelines.
See the full API reference at [simplefunctions.dev/docs](https://simplefunctions.dev/docs).
---
### 2. Kalshi's Official API + `httpie` or `curl`
For developers who want raw access without an abstraction layer, Kalshi's REST API is well-documented and production-stable. It's not a CLI tool per se, but with `httpie` or `curl` wrapped in shell functions, it becomes one.
# Get current market data for a specific ticker
http GET https://trading-api.kalshi.com/trade-api/v2/markets/KXFEDDECISION-25DEC-T5.25 \
Authorization:"Bearer $KALSHI_TOKEN"
The limitation: you have to write all the filtering, formatting, and alert logic yourself. If you're already maintaining a custom data pipeline, this is the right level of abstraction. If you're not, you're reinventing what SimpleFunctions already handles.
Useful patterns:
# Shell function to check a ticker probability
kalshi_prob() {
http GET "https://trading-api.kalshi.com/trade-api/v2/markets/$1" \
Authorization:"Bearer $KALSHI_TOKEN" \
| jq '.market.last_price'
}
kalshi_prob KXRECSSNBER-25DEC
This works well for one-off lookups and scripting alerts via cron. It doesn't scale gracefully to multi-market scanning or cross-exchange workflows.
---
### 3. Polymarket's CLOB API + Python Scripts
Polymarket runs on a Central Limit Order Book (CLOB) with a public API. The Python `py-clob-client` library is the standard access layer:
pip install py-clob-client
python
from clob_client.client import ClobClient
client = ClobClient(
host="https://clob.polymarket.com",
key=PRIVATE_KEY,
chain_id=137
)
# Fetch active markets
markets = client.get_markets()
for m in markets:
if m['volume'] > 100000:
print(f"{m['question']} — Vol: {m['volume']} — Best Yes: {m['best_ask']}")
This is solid for Polymarket-only workflows. The gap is that you're managing two separate clients — one for Kalshi, one for Polymarket — and writing your own normalization layer if you want unified data.
---
### 4. Custom Shell Scripts with `jq` and `fzf`
For developers who prefer minimal dependencies, a combination of `curl`, `jq`, and `fzf` can produce a surprisingly functional scanning interface:
#!/bin/bash
# kalshi-scan.sh — fuzzy-search Kalshi markets
markets=$(curl -s -H "Authorization: Bearer $KALSHI_TOKEN" \
"https://trading-api.kalshi.com/trade-api/v2/markets?limit=100" \
| jq -r '.markets[] | "\(.ticker) | \(.title) | \(.last_price)"')
echo "$markets" | fzf --preview 'echo {}'
This gives you an interactive fuzzy-search over live Kalshi markets in under 20 lines. It's not a managed tool, but it's hackable and dependency-light.
The tradeoff: zero abstraction means you write everything. Auth, pagination, error handling, Polymarket normalization, position tracking — all manual.
---
## Comparing the Options
| Tool | Kalshi | Polymarket | Agents | Setup | Best For |
|---|---|---|---|---|---|
| SimpleFunctions (`sf`) | ✅ | ✅ | ✅ | `npm install -g` | Active traders, dev workflows |
| Kalshi API + httpie | ✅ | ❌ | ❌ | Manual | Custom pipelines |
| Polymarket CLOB client | ❌ | ✅ | ❌ | `pip install` | Polymarket-only automation |
| curl + jq + fzf | ✅ | Partial | ❌ | None | Minimalists, hackers |
---
## Real Workflows in Practice
### Macro Trader Morning Routine
A common pattern for traders following Fed policy and energy markets:
# Morning scan — Fed and oil markets
sf scan --exchange kalshi --ticker KXFEDDECISION --format table
sf scan --exchange kalshi --ticker KXWTIMAX --prob-max 0.40 --format table
# Check overnight position moves
sf positions --all --sort pnl
# Launch dashboard for session monitoring
sf dashboard
This takes about 30 seconds and gives you a complete picture before the market session opens.
### Recession Market Monitoring
The KXRECSSNBER ticker tracks NBER recession calls — a slow-moving but high-conviction market. A thesis-based agent setup:
sf agent --thesis "No NBER recession declared before Q1 2027" \
--ticker KXRECSSNBER \
--entry-prob-max 0.30 \
--alert-telegram \
--dry-run
Remove `--dry-run` when you're confident in the entry logic.
### Developer Integration — MCP + LLM
For teams building internal research tools, SimpleFunctions' MCP server lets you wire live prediction market data into Claude or GPT workflows:
# Start MCP server
sf mcp --port 3001
# Now queryable from any MCP-compatible LLM client
This is useful for teams doing daily macro briefings with LLM summaries grounded in live market data.
---
## What to Look for in a Prediction Market CLI Tool
If you're evaluating tools for your own stack, here's the checklist that matters:
- **Multi-exchange support** — Kalshi and Polymarket have different data models. Unified normalization saves significant time.
- **Filtering depth** — You need to filter by probability range, volume, expiry, and keyword simultaneously. Basic wrappers don't support compound filters.
- **Agent / automation layer** — One-shot queries are table stakes. Agentic loops that run continuously against a thesis are where real leverage comes from.
- **Output format control** — JSON, CSV, and formatted table outputs let you pipe into downstream tools.
- **Position management** — A tool that can only read markets but not show your positions is half a tool.
- **Alert integrations** — Telegram, webhook, or email alerts close the loop between scanning and action.
---
## Getting Started
If you're not already running prediction market workflows from the terminal, the fastest path is:
npm install -g @spfunctions/cli
sf scan --exchange kalshi --keyword "fed" --format table
That's a functional starting point in under two minutes. From there, the [SimpleFunctions docs](https://simplefunctions.dev/docs) cover authentication setup for both exchanges, agent configuration, and API integration patterns.
For Polymarket-heavy workflows or fully custom pipelines, the CLOB Python client is the right foundation — just expect to write more glue code.
---
## Final Notes
The prediction market ecosystem in 2026 is deep enough that a browser-only workflow is a meaningful handicap. The contracts are more liquid, the market structure is more sophisticated, and the traders competing against you are increasingly running automated or semi-automated systems.
CLI tools don't make bad theses good. But they do compress the gap between thesis formation and position entry, reduce the cognitive overhead of multi-market monitoring, and make systematic review of your own trading decisions much more tractable.
Pick the tool that matches your workflow. If you're a developer who wants maximum control, start with raw API access and build up. If you want a complete runtime that handles the infrastructure so you can focus on thesis quality, SimpleFunctions is the most complete option currently available for Kalshi and Polymarket.