Skip to main content
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

Stealth Execution

Institutional-grade execution for prediction markets. Estimate market impact before trading, route across venues, and execute with algorithms that minimise information leakage.

Impact Estimation

Kyle’s lambda + spread + volatility to predict slippage before you trade.

Smart Routing

Greedy cost-minimising allocation across Paper, Polymarket, and Kalshi.

Adaptive TWAP

Fill-rate adaptive time-slicing with spread-widening circuit breaker.

Sniper Mode

Waits for tight spread + favourable imbalance, then fires instantly.

Impact Estimation

import horizon as hz

engine = hz.Engine()
impact = hz.estimate_impact(engine, "0xcondition...", size=500)
print(impact.estimated_slippage_bps)   # e.g. 12.5
print(impact.recommended_strategy)      # "twap"
FieldDescription
estimated_slippage_bpsPredicted slippage in basis points
kyle_lambdaKyle’s lambda (price impact coefficient)
effective_spread_bpsCurrent effective spread
recommended_strategy"market", "twap", "iceberg", or "sniper"
estimated_duration_secsRecommended execution window

One-Call Execution

plan = hz.stealth_execute(
    engine, "0xcondition...",
    side=hz.Side.Yes,
    order_side=hz.OrderSide.Buy,
    size=500, price=0.55,
    strategy="auto",  # auto-selects based on impact
)
print(plan.strategy, plan.estimated_cost_bps)

Pipeline Mode

hz.run(
    name="stealth-mm",
    markets=["0xcondition..."],
    pipeline=[
        hz.stealth_executor(config=hz.StealthConfig(
            patience_secs=60, randomize=True,
        )),
    ],
    interval=1.0,
)
The pipeline reads ctx.params["stealth_requests"] (a list of request dicts) and drives active algorithms each tick.

Algorithms

AdaptiveTWAP

Splits a parent order into time-slices with fill-rate feedback:
  • Fill rate > 80% → slow down (multiply interval by 1.5)
  • Fill rate < 20% → speed up (multiply interval by 0.75)
  • Spread widens > 2× → pause until it narrows
  • Optional ±20% slice size randomisation

IcebergPlus

Shows a random fraction of the total order:
  • Visible size randomised in [0.5×, 1.5×] of base
  • Capped at max_visible_pct of remaining quantity
  • Random delay between refills

SniperAlgo

Waits for optimal entry conditions:
  • Monitors effective_spread and lob_imbalance
  • Fires when spread < target AND imbalance favours our side
  • Patience mechanism progressively relaxes the threshold

StealthConfig

ParameterDefaultDescription
randomizeTrueRandomise slice sizes and delays
min_delay_secs0.5Minimum delay between iceberg refills
max_delay_secs5.0Maximum delay between iceberg refills
max_visible_pct0.10Maximum visible fraction (iceberg)
impact_limit_bps50.0Abort if estimated impact exceeds this
patience_secs120.0Sniper patience window
adaptive_aggressionTrueEnable fill-rate adaptive behaviour