Skip to main content
Horizon SDK exposes its full trading engine via three integration paths:

CLI

Full-featured command-line interface. Discover markets, trade, analyze wallets, and manage funds from the terminal. Supports --json for scripting.

MCP Server

Standard Model Context Protocol server. Works with Claude Code, Cursor, Windsurf, VS Code, and Claude Desktop.

OpenClaw Skill

Plugin for the OpenClaw framework. Works with WhatsApp, Telegram, Discord, and Slack bots. Install from ClawHub: clawhub install horizon-trader

How It Works

All three integrations share a thin tools layer (horizon.tools) that wraps the Engine API. The CLI, MCP server, and OpenClaw skill are interface adapters that delegate to shared tool functions, which in turn call the Horizon Engine (Rust core via PyO3) for risk, orders, feeds, and exchange connectivity.
horizon.tools (shared business logic, 100+ functions)
    |
    +---> horizon.cli        (Click CLI, 40+ commands)
    +---> horizon.mcp_server (MCP server, 25 tools with 241 capabilities)
    +---> horizon.mcp_fund   (MCP fund server, 30 tools)
    +---> OpenClaw skill     (WhatsApp/Telegram bots)

Available MCP Tools

The MCP server exposes 14 individual tools and 12 compound tools (action-dispatch): Individual tools — most-used trading operations:
ToolDescription
engine_statusPnL, open orders, positions, kill switch, uptime
list_positionsAll open positions with entry price and PnL
list_open_ordersOpen orders, optionally filtered by market
list_recent_fillsRecent trade fills
submit_orderPlace a limit order (buy/sell at a probability price)
cancel_orderCancel one order by ID
cancel_all_ordersCancel everything
discover_marketsSearch Polymarket or Kalshi for markets
get_market_detailFull market detail (prices, orderbook, holders)
top_marketsHighest-volume active markets
kelly_sizingCompute Kelly-optimal position size
get_feed_snapshotPrice/bid/ask for a named feed
activate_kill_switchEmergency stop - cancels all orders
portfolio_metricsPortfolio value, exposure, diversification
Compound tools — group related capabilities via action parameter:
ToolActionsDescription
feed7Feed management, health, parity checks
order_management5Stop-loss, take-profit, cancel by market, kill switch off
wallet11Wallet trades, positions, flow, profiling, signals
analytics84Stats, AFML, microstructure, hedging, pricing, bootstrap
scanning11Oracle, LLM, whale, sniper scans, arbitrage, stealth execution
unusual_whales36Options flow, Congress trades, Greeks, short interest
market_data24Polygon.io: OHLCV, snapshots, indicators, options chains
cloud12Cloud deploy, monitor, credentials
marketplace18Browse, publish, subscribe, purchase strategies
fund16Multi-strategy fund management
account3Account setup, login, key status

Quick Setup

1

Install with MCP support

pip install horizon-sdk[mcp]
# or
uv pip install horizon-sdk[mcp]
2

Set your API key

export HORIZON_API_KEY="your-key"
3

Choose your interface

Environment Variables

The MCP server and OpenClaw skill read configuration from environment variables:
VariableRequiredDefaultDescription
HORIZON_API_KEYYes-SDK authentication key
HORIZON_EXCHANGENopaperpaper, polymarket, or kalshi
HORIZON_DBNo-SQLite path for persistence
POLYMARKET_API_KEYFor Polymarket-Polymarket CLOB API key
POLYMARKET_API_SECRETFor Polymarket-Polymarket CLOB API secret
POLYMARKET_API_PASSPHRASEFor Polymarket-Polymarket CLOB passphrase
POLYMARKET_PRIVATE_KEYFor Polymarket-Ethereum private key
KALSHI_API_KEYFor Kalshi-Kalshi API key
KALSHI_EMAILFor Kalshi-Kalshi account email
KALSHI_PASSWORDFor Kalshi-Kalshi account password
HORIZON_PASSWORDNo-Password for programmatic account setup (used by account(action="setup") / account(action="login"))