Skip to main content
Horizon wraps third-party data APIs so you can query options flow, dark pool prints, Congress trades, market snapshots, and technical indicators from a single interface — Python, CLI, or MCP.

Available Providers

Unusual Whales

Options flow alerts, dark pool data, Congress & insider trades, Greek exposure, IV analytics, short interest, screeners, and market sentiment.

Massive

Real-time snapshots, OHLCV bars, options chains with Greeks, technical indicators (SMA, EMA, RSI, MACD), news, and reference data. Formerly Polygon.io.

How It Works

Each provider is accessible through three interfaces:
from horizon.providers import UnusualWhalesProvider, MassiveProvider

# Unusual Whales
flow = UnusualWhalesProvider.options_flow(ticker="AAPL", min_premium=100000)
congress = UnusualWhalesProvider.congress_trades(limit=20)

# Massive (Polygon.io)
snap = MassiveProvider.snapshot("NVDA")
rsi = MassiveProvider.rsi("TSLA", window=14)

Authentication

Each provider requires its own API key, set via environment variables:
ProviderEnvironment VariableGet a Key
Unusual WhalesUNUSUAL_WHALES_API_KEYunusualwhales.com/pricing
MassiveMASSIVE_API_KEYmassive.com/pricing
export UNUSUAL_WHALES_API_KEY="your-uw-key"
export MASSIVE_API_KEY="your-massive-key"
Never pass API keys as function parameters. Always use environment variables.

Use in Pipelines

Provider data feeds naturally into Horizon pipelines. For example, use Unusual Whales flow data to inform your trading signals:
import horizon as hz
from horizon.providers import UnusualWhalesProvider as UW

def flow_signal(ctx: hz.Context) -> float:
    """Bias toward buy when large call sweeps appear."""
    flow = UW.options_flow(ticker="SPY", is_sweep=True, is_call=True, min_premium=500000, limit=5)
    if flow:
        return 0.55  # bullish bias
    return 0.50

hz.run(
    name="flow_trader",
    markets=["spy-up-today"],
    pipeline=[flow_signal],
)

Combining Providers

Stack data from multiple providers for richer signals:
from horizon.providers import UnusualWhalesProvider as UW, MassiveProvider as M

def multi_source_signal(ctx: hz.Context) -> float:
    # Technical: RSI from Massive
    rsi_data = M.rsi("AAPL", window=14, limit=1)
    rsi_val = rsi_data[0]["value"] if rsi_data else 50

    # Flow: unusual activity from UW
    flow = UW.options_flow(ticker="AAPL", is_sweep=True, min_premium=200000, limit=5)
    sweep_count = len(flow) if isinstance(flow, list) else 0

    # Combine: oversold + heavy call flow = bullish
    if rsi_val < 30 and sweep_count >= 3:
        return 0.70
    return 0.50