Skip to main content
Back to Blog

Earnings Surprise Markets via API: Quick Reference Guide

10 minPredictEngine TeamStrategy

Earnings surprise prediction markets let you trade on whether a company will beat, meet, or miss analyst expectations — and connecting to these markets via API gives you a significant speed and data advantage over manual traders. In short, an earnings surprise API workflow lets you pull real-time earnings estimates, monitor live announcements, and execute trades programmatically before most retail participants can react.

This guide is your complete quick reference: from understanding how earnings surprise markets work, to the best data sources, to a step-by-step automation setup.


What Are Earnings Surprise Markets?

An earnings surprise happens when a company's reported earnings per share (EPS) differ meaningfully from the consensus analyst estimate. When results beat expectations, that's a positive surprise; when they fall short, it's a negative surprise.

Prediction markets have built entire market categories around this binary outcome. Platforms like PredictEngine aggregate these markets and allow traders to take positions on whether a specific company will beat or miss Wall Street's forecasts — often days or weeks before the earnings call.

The edge here is measurable. According to academic research from the Journal of Finance, stocks exhibiting positive earnings surprises outperform the market by an average of 2–3% in the three days surrounding the announcement. That's a narrow window where API-powered automation can capture alpha that manual traders simply miss.

Why API Access Changes Everything

Without API access, you're watching earnings dashboards and manually placing trades. With API access:

  • You can poll estimate data from financial data providers every few minutes
  • You can automatically calculate surprise probability using whisper numbers and historical patterns
  • You can trigger trades the instant an announcement hits
  • You can manage risk exposure across multiple positions simultaneously

Key Data Sources for Earnings Surprise APIs

Before you can trade earnings surprises programmatically, you need reliable data. Here are the primary categories of APIs you'll want in your stack:

Financial Estimate APIs

These provide the consensus EPS estimates you'll use as your baseline.

API Provider Data Type Update Frequency Pricing
Alpha Vantage EPS estimates, actuals Quarterly Free / $50+/mo
Financial Modeling Prep Earnings calendar, surprises Real-time Free / $14+/mo
Polygon.io Earnings, financials Real-time $29+/mo
Intrinio Consensus estimates Daily $75+/mo
Refinitiv (LSEG) Institutional estimates Real-time Enterprise
Quandl/Nasdaq Data Link Historical surprises End-of-day $50+/mo

For most algorithmic traders getting started, Financial Modeling Prep and Polygon.io offer the best balance of cost, data quality, and API documentation.

Prediction Market APIs

Once you have the underlying earnings data, you'll want to connect to prediction markets where you can trade the outcome. Platforms with robust API access include:

  • Polymarket (via their REST API and on-chain data)
  • Kalshi (regulated US prediction market with earnings event markets)
  • Manifold Markets (for broader event-driven markets)
  • PredictEngine (aggregates markets and provides unified signal layers)

For a deeper look at how to source liquidity across these platforms, see this prediction market liquidity sourcing case study from power users who've already mapped out the landscape.


Step-by-Step: Setting Up an Earnings Surprise API Workflow

Here's a practical numbered workflow you can implement with basic Python skills and a couple of free-tier API keys.

  1. Register for financial data API access — Start with Financial Modeling Prep's free tier, which gives you 250 API calls/day and access to the earnings calendar.

  2. Pull the upcoming earnings calendar — Query the /earnings or /earning_calendar endpoint to get a list of all companies reporting within your target window (e.g., the next 7 days).

  3. Fetch consensus EPS estimates — For each ticker, query the /analyst-estimates endpoint to get mean, median, high, and low EPS estimates.

  4. Calculate your "surprise probability model" — Use historical surprise rates (e.g., S&P 500 companies beat estimates roughly 74% of the time in recent quarters per FactSet) combined with company-specific beat/miss history.

  5. Identify correlated prediction markets — Use your prediction market API (Kalshi, Polymarket, or PredictEngine) to find active markets tied to specific companies or indices.

  6. Set conditional trade triggers — Using a simple if/else or webhook framework, define rules like: "If pre-market EPS actuals exceed estimates by >5%, buy the 'beat' contract if it's still priced below 0.70."

  7. Monitor and execute at announcement — Set a cron job or stream listener to fire logic the moment earnings land in the data feed.

  8. Log and backtest outcomes — After each earnings season, compare your model's predictions to actuals and refine your probability thresholds.

If you're new to building signal-driven automations like this, the beginner tutorial on LLM-powered trade signals via API covers how to incorporate AI-based reasoning layers into exactly these kinds of workflows.


Understanding Surprise Magnitude and Market Pricing

Not all surprises are equal. A 1% EPS beat on a high-growth tech stock is very different from a 1% beat on a utility company. Here's how to think about surprise magnitude in the context of prediction market pricing:

The Surprise Index Formula

Many quants use a simple Standardized Unexpected Earnings (SUE) score:

SUE = (Actual EPS - Expected EPS) / Standard Deviation of Forecast Errors

A SUE above +2 is generally considered a strong positive surprise. A SUE below -2 signals a significant miss. This score can feed directly into your trade trigger logic.

Implied Probability vs. True Probability

Prediction market contracts price in market consensus probability, but earnings surprise markets are particularly prone to mispricing because:

  • Retail sentiment often overweights recent narrative (e.g., a company that's been in the news gets its "beat" contract bid up artificially)
  • Whisper numbers — the unofficial street estimates — frequently diverge from published consensus by 3–8%, creating arb windows
  • Implied volatility in options markets can give you a proxy for expected surprise magnitude before the print

When you find a contract priced at 65% for a beat, but your model gives it a 78% probability based on historical patterns and whisper numbers, that's a 13-percentage-point edge — a meaningful opportunity worth automating.

For broader context on cross-platform pricing discrepancies, the deep dive into prediction market arbitrage step-by-step breaks down how to systematically exploit these gaps.


Risk Management for API-Driven Earnings Trades

Automation without risk controls is how accounts blow up. Here's a quick framework for managing exposure:

Position Sizing Rules

  • Never allocate more than 3–5% of capital to a single earnings event
  • Use Kelly Criterion scaling — if your edge is 13 percentage points on a near-even payout, your Kelly fraction suggests roughly 13% of bankroll, but most practitioners use half-Kelly to manage variance
  • Set hard loss limits per event: if a position is down 50% of entry value, auto-close regardless of the announcement timing

Correlation Risk

During earnings season (particularly "earnings weeks" in January, April, July, and October), dozens of companies report simultaneously. Watch for:

  • Sector correlation — a bad Amazon report can drag down every cloud software company's "beat" probability
  • Index-level surprises — if early S&P reporters show a consistent pattern (all missing estimates), recalibrate your model mid-season

API Failure Contingencies

Production API pipelines fail. Build in:

  • Fallback data sources (two providers for the same data)
  • Circuit breakers that halt trading if data hasn't updated within a defined window
  • Alerting via Slack or email when unexpected errors occur

Automating Science and Macro Event Markets Alongside Earnings

Earnings isn't the only scheduled event market worth automating. The same API framework applies to FOMC rate decisions, CPI releases, NFP reports, and even tech product announcements. If you're building a multi-market automation stack, you can apply the same estimate-vs-actual framework across asset classes.

This is covered in detail in the guide on automating science and tech prediction markets for power users, which walks through how scheduled announcement markets share the same underlying signal structure as earnings — making your API infrastructure portable across market types.


Comparing Manual vs. API-Driven Earnings Market Trading

Factor Manual Trading API-Driven Trading
Reaction speed Minutes to hours Milliseconds to seconds
Data coverage Limited to what you monitor Hundreds of tickers simultaneously
Consistency Varies by attention/emotion Rule-based, consistent
Backtesting Difficult, memory-based Systematic, data-driven
Risk controls Manual, often reactive Automated, pre-set
Setup complexity Low Medium-High
Edge on pricing Harder to find consistently Identifiable via model
Scalability Low High

The table makes the tradeoff clear: API trading requires upfront investment in data infrastructure and code, but the consistency and scalability advantages compound over time.


Advanced Techniques: NLP and Earnings Call Transcripts

Once you have the baseline API workflow running, the next level is natural language processing on earnings call transcripts. Services like Seeking Alpha's API, Refinitiv StreetEvents, and open-source scrapers can feed you call transcripts within minutes of the call ending.

Key NLP signals to extract:

  • Sentiment score of CEO/CFO language (guarded language often predicts downward guidance revisions)
  • Frequency of forward-looking words ("confident," "excited" vs. "cautious," "headwinds")
  • Mention of specific competitor names — often signals competitive pressure
  • Guidance language changes versus prior quarter

Combine these NLP signals with your surprise probability model to trade post-announcement prediction markets — markets that remain open after earnings and price in follow-through analyst upgrades or downgrades.


Frequently Asked Questions

What is an earnings surprise in prediction markets?

An earnings surprise in prediction markets refers to a tradeable event where you bet on whether a company's reported earnings will exceed or fall short of analyst consensus estimates. Prediction market platforms create binary or scalar contracts around this outcome, allowing traders to take positions before the official announcement.

Which APIs are best for earnings surprise data?

Financial Modeling Prep and Polygon.io are the most accessible starting points for independent traders, offering real-time earnings calendars, consensus estimates, and historical surprise data at affordable pricing tiers. For institutional-grade accuracy, Refinitiv (LSEG) and Intrinio provide more comprehensive estimate revision histories.

How do I connect earnings API data to a prediction market?

The typical workflow involves pulling estimate data from a financial API, computing a surprise probability score, then using your prediction market's REST API to query contract prices and execute trades when your model detects mispriced contracts. Most platforms like Kalshi, Polymarket, and PredictEngine provide documented REST APIs with authentication via API keys.

Can I backtest an earnings surprise trading strategy?

Yes — backtesting is one of the major advantages of API-driven trading. Historical earnings data (actuals vs. estimates) is available going back 10–20 years through providers like Compustat or Financial Modeling Prep's paid tiers. You can replay historical earnings seasons against simulated prediction market prices to evaluate your model's hit rate and profitability before risking real capital.

What is a "whisper number" and why does it matter?

A whisper number is the informal, unpublished EPS estimate that sophisticated investors use — often 3–8% above or below the official consensus. Whisper numbers better reflect what the market actually expects, meaning the published consensus may be an artificially low bar that companies easily clear. Tracking whisper numbers via services like WhisperNumber.com can sharpen your surprise probability model significantly.

How do I manage risk when trading earnings surprises via API?

The core risk management rules are: limit single-event exposure to 3–5% of capital, use half-Kelly position sizing based on your estimated edge, set automated stop-loss triggers, and build API failure contingencies into your code. Diversifying across multiple uncorrelated earnings events in the same week also smooths out variance significantly.


Start Trading Earnings Surprises Smarter

Earnings surprise markets represent one of the most data-rich, systematically tradeable event categories in prediction markets today. With the right API stack — financial estimates from providers like Polygon.io or Financial Modeling Prep, combined with prediction market access — you can build a rules-based system that consistently identifies mispriced contracts and executes with precision.

Whether you're just getting started or looking to add earnings markets to a broader event-driven portfolio, PredictEngine provides the unified platform layer that connects data signals, market aggregation, and execution tooling in one place. Explore the cross-platform prediction arbitrage guide to see how earnings surprise strategies fit into a diversified prediction market portfolio — and visit PredictEngine today to start building your edge with the tools that serious prediction market traders rely on.

Run your own quant desk

Felix lets you research, backtest and run automated trading strategies, with risk controls built in.

Try Felix

Continue Reading

Run your own quant desk

Felix lets you research, backtest and run automated trading strategies, with risk controls built in.

Try Felix
Earnings Surprise Markets via API: Quick Reference Guide | PredictEngine | PredictEngine