Skip to main content
This example shows a complete workflow using the Horizon MCP server through Claude Code: discovering markets, analyzing opportunities with Kelly criterion, placing trades, setting protective orders, and monitoring positions - all through natural language.

Setup

The Workflow

1. Morning scan - discover markets

Claude calls discover_markets(exchange="polymarket", query="bitcoin", limit=10) and returns:

2. Analyze opportunity - Kelly sizing

Claude calls kelly_sizing(prob=0.72, price=0.58, bankroll=5000.0, fraction=0.25, max_size=200.0):

3. Place the trade

Claude calls submit_order(market_id="will-btc-hit-100k", side="buy", price=0.58, size=200.0):

4. Add protection

Claude calls order_management(action="add_stop_loss", ...) and order_management(action="add_take_profit", ...):

5. Check the portfolio

Claude calls engine_status(), list_positions(), list_open_orders(), and order_management(action="list_contingent"):

6. Second market - scan Kalshi

Claude calls discover_markets(exchange="kalshi", query="KXBTC", limit=5):

7. End of day - close out

Claude calls cancel_all_orders() then engine_status():

Full Session as a Script

For reproducibility, here’s what the tool calls looked like:

Next Steps

MCP Server Reference

Full tool and resource documentation.

Claude Code Setup

Detailed setup instructions.

Kelly Sizing

Deep dive into Kelly criterion functions.

Hedge Fund Workflow

Full production deployment example.