Skip to main content

Options Trading

Horizon supports listed options via Interactive Brokers. The same engine handles options contracts using the Market struct’s optional fields for strike, expiry, option type, and multiplier.

Market Object for Options

Options use the extended Market fields:
import horizon as hz

call = hz.Market(
    id="265598",                    # IBKR conid
    name="AAPL Jan 2026 200 Call",
    exchange="ibkr",
    ticker="AAPL",
    asset_class="option",
    underlying="AAPL",
    strike_price=200.0,
    option_type="call",
    multiplier=100.0,               # 1 contract = 100 shares
    expiry="2026-01-16",
)
FieldTypeDescription
asset_classstr"option"
underlyingstrUnderlying symbol (e.g., "AAPL")
strike_pricefloatStrike price
option_typestr"call" or "put"
multiplierfloatContract multiplier (100 for US equity options)
expirystrExpiration date

Discovery

Find options contracts via IBKR symbol search:
contracts = hz.discover_markets(exchange="ibkr", query="AAPL", limit=20)
for c in contracts:
    print(f"{c.id}: {c.name} (asset_class={c.asset_class})")

Options Data via CLI

The equity CLI group includes options tools powered by Unusual Whales:
# Full options chain
horizon equity options-chain AAPL --expiry 2026-04-17

# Greek exposure (delta, gamma, vega, theta)
horizon equity greeks SPY

# Implied volatility term structure
horizon equity iv-surface TSLA

Programmatic Access

from horizon.provider_tools import (
    uw_option_chains,
    uw_greek_exposure,
    uw_vol_term_structure,
    uw_max_pain,
    uw_iv_rank,
)

chain = uw_option_chains("AAPL")
greeks = uw_greek_exposure("SPY")
term = uw_vol_term_structure("TSLA")
pain = uw_max_pain("AAPL")
rank = uw_iv_rank("AAPL")

Trading Options

Options use Side.Long like equities:
from horizon import Side, OrderSide, OrderRequest

# Buy 5 AAPL 200 calls
req = OrderRequest(
    market_id="265598",       # IBKR conid
    side=Side.Long,
    order_side=OrderSide.Buy,
    size=5,                   # 5 contracts
    price=3.50,               # per-share price ($350 per contract)
)

Risk Configuration

Options need wider price ranges than prediction markets:
risk = hz.Risk.equity(
    max_position=50,          # max contracts
    max_notional=100_000,     # max total value
    max_order_size=20,
    price_min=0.01,
    price_max=100_000,
)

Synthetic Options from Prediction Markets

Prediction markets are binary options. Horizon can extract implied volatility, Greeks, and build synthetic spread strategies from prediction market prices. See Options Overlay for this.

Enums

from horizon import AssetClass, OptionType

AssetClass.Option   # "option"
OptionType.Call     # "call"
OptionType.Put      # "put"
These are available for programmatic use but are not required — the Market fields use strings for flexibility.

What Works the Same

All core SDK features work for options:
  • Pipeline composition and hz.run()
  • Risk pipeline (all 8 checks)
  • Order management (submit, cancel, amend, bracket orders)
  • Position tracking and P&L
  • SQLite persistence and crash recovery
  • Monitoring, alerts, and TUI dashboard
  • Autonomous fund management