The Horizon CLI gives you full access to the trading engine, market discovery, wallet analytics, and fund management from your terminal. Every command supportsDocumentation Index
Fetch the complete documentation index at: https://mathematicalcompany.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
--json for pipeable output.
Installation
horizon command is available on your PATH:
uvx or bunx:
Quick Start
Configuration
The CLI reads configuration from environment variables:Global Options
| Flag | Description |
|---|---|
--json | Output as JSON (pipeable to jq, scripts) |
--version | Show version |
--help | Show help |
Commands
Discovery
discover - Search markets
discover - Search markets
| Option | Default | Description |
|---|---|---|
--exchange | polymarket | Exchange to search |
--limit | 10 | Number of results |
--type | all | all, binary, or multi |
--category | - | Category filter (crypto, politics) |
events - Multi-outcome events
events - Multi-outcome events
| Option | Default | Description |
|---|---|---|
--limit | 10 | Number of events |
top-markets - Highest volume
top-markets - Highest volume
| Option | Default | Description |
|---|---|---|
--exchange | polymarket | Exchange |
--limit | 10 | Number of markets |
--category | - | Category filter |
market - Market detail
market - Market detail
| Option | Default | Description |
|---|---|---|
--exchange | polymarket | Exchange |
Trading
submit - Place an order
submit - Place an order
| Option | Required | Default | Description |
|---|---|---|---|
--market-id | Yes | - | Market identifier |
--side | Yes | - | buy or sell |
--price | Yes | - | Limit price (0-1) |
--size | Yes | - | Order size |
--market-side | No | yes | yes or no |
cancel / cancel-all - Cancel orders
cancel / cancel-all - Cancel orders
positions / orders / fills - View state
positions / orders / fills - View state
kill-switch - Emergency stop
kill-switch - Emergency stop
status - Engine overview
status - Engine overview
Analytics
kelly - Position sizing
kelly - Position sizing
| Option | Required | Default | Description |
|---|---|---|---|
--prob | Yes | - | True probability (0-1) |
--price | Yes | - | Market price (0-1) |
--bankroll | No | 1000 | Capital in USD |
--fraction | No | 0.25 | Kelly fraction |
--max-size | No | 100 | Max position |
parity - Arbitrage check
parity - Arbitrage check
simulate - Monte Carlo
simulate - Monte Carlo
| Option | Default | Description |
|---|---|---|
--scenarios | 10000 | Number of paths |
--seed | - | Random seed |
Wallet Analytics
All wallet commands are under thewallet subgroup:
wallet trades - Trade history
wallet trades - Trade history
wallet positions - Open positions
wallet positions - Open positions
wallet value - Portfolio value
wallet value - Portfolio value
wallet profile - Public profile
wallet profile - Public profile
wallet score - Performance score
wallet score - Performance score
wallet top-holders - Largest holders
wallet top-holders - Largest holders
wallet flow - Buy/sell flow
wallet flow - Buy/sell flow
wallet market-trades - Market trades
wallet market-trades - Market trades
Feed Management
All feed commands are under thefeed subgroup:
feed list - Active feeds
feed list - Active feeds
feed snapshot - Latest data
feed snapshot - Latest data
feed health - Staleness check
feed health - Staleness check
feed metrics - Connection stats
feed metrics - Connection stats
feed start - Start a feed
feed start - Start a feed
| Option | Description |
|---|---|
--symbol | Symbol for Binance feeds |
--url | URL for REST feeds |
--config | JSON config string |
--interval | Poll interval (seconds) |
Fund Management
All fund commands are under thefund subgroup:
fund status / report
fund status / report
fund deploy / stop / pause / resume
fund deploy / stop / pause / resume
fund list / scale
fund list / scale
fund nav / risk / pnl / stress-test
fund nav / risk / pnl / stress-test
fund explain / regime / alerts
fund explain / regime / alerts
Account
setup - Create account
setup - Create account
login - Login
login - Login
key-status - Check credentials
key-status - Check credentials
Database Queries
For offline analysis of persisted strategy data, use thedb subgroup:
db fills - Historical fills
db fills - Historical fills
db positions - Position snapshots
db positions - Position snapshots
db orders - Order history
db orders - Order history
Scripting with —json
Every command supports--json for structured output. Pipe to jq for powerful scripting:
Architecture
The CLI shares the same tool layer as the MCP servers. All three interfaces delegate tohorizon.tools, which wraps the Rust engine via PyO3: