Endpoints Overview
The API base URL is
https://therundown.io/api/v2; include /api exactly once. Authenticate with the X-TheRundown-Key header.
Full Market History
Use the event history endpoint to get recorded price changes for the requested markets and sportsbooks. Ifmarket_ids is omitted, the endpoint uses the default markets 1,2,3; pass up to 12 market IDs when selecting markets explicitly.
Query Parameters
from and to are inclusive filters. Results are returned newest first and are capped by limit; invalid or out-of-range limits fall back to 1000. The response does not provide a cursor or has_more flag. If the response reaches the cap, narrow the markets, sportsbooks, or time window before treating it as complete.
Historical responses are subject to the history window included with your plan.
Example Response
The API returnshistory newest first.
market_line_price_id identifies one sportsbook’s price on one line value, so the rows for -3.5 and the row for -4 are two different lines, not one line changing value. The main line moving from -3.5 to -4 shows up as the is_main_line flag leaving -3.5 and arriving on -4 at the same timestamp. A row with change_type: "main_line" means only the flag changed; when odds and the flag change together, the row is a normal price row that carries the new flag.
Tracking Main-Line Moves
Passmain_line=true to keep only rows that were the main line when they were written. Sorted by updated_at, each change of line for a participant is a main-line move (a spread going from -3.5 to -4.5, or a total from 224.5 to 225.5) with its timestamp. Alternate-line rows are excluded.
main_line=true, every row still carries is_main_line, so the same logic works client-side. For real-time tracking, the delta feed and the WebSocket include is_main_line on every update: a main-line move arrives as is_main_line: true on the new line value and is_main_line: false on the old one.
Single Market History (Chart Data)
For building a line movement chart, fetch history for a specific market. This returns a chart-optimized response withseries grouped by sportsbook (keyed by affiliate ID), where each data point uses shorthand fields: t (timestamp), p (price as a string), l (line value), m (main-line flag), and c (closed_at). Chart points are ordered oldest first. A market can contain multiple participants and line values. Pass participant_id to isolate one selection; optionally pass line to isolate one line value, or main_line=true to keep main-line points.
Use participant_id to keep different sides out of the same chart. line is optional; use main_line=true instead when the chart should follow a changing main line. The c field is omitted when the point has no closing timestamp.
123 in the examples is a placeholder. Replace it with the public participant_id from participant discovery for the same event and market. The examples pin line=-3.5 so each chart tracks one handicap. If the response reaches limit, narrow the filters or time window; the chart response has no pagination cursor or truncation flag.
Filtering by Time Range
Usefrom and to parameters in RFC 3339 format to scope history to a specific window. This is useful for showing line movement in the last 24 hours or during a specific period.
Opening and Closing Parameters
Both event and sport/date snapshot endpoints accept these filters:
An event can be returned without prices when no recorded price matches the filters. These endpoints require a plan with historical-data access. Opening and closing snapshots also apply the plan’s history window to the event date; requests outside that window return
403. Omit hide_closed or set it to false when retrieving completed-event snapshots so currently closed prices remain included.
Opening Lines
The openers endpoints return the first recorded price for each available market line and sportsbook. They can return data before, during, or after an event when a price has been recorded. The response uses the same V2 events structure (withmarkets, participants, lines, and prices).
Closing Lines
The closing endpoint returns the latest recorded price at or before the event’s scheduled start time. Before the event starts, that value is provisional and may change; after the start, it represents the pre-start closing snapshot. The response uses the same V2 events structure as openers. See the event closing reference and sport/date closing reference.11,12 and sportsbooks 19,23. Replace the event ID with an event inside your plan’s history window:
hide_closed can remove prices from a completed event when those prices are closed; the event and its score can still be returned.
Building a Line Movement Chart
Here is a complete example that fetches one participant’s spread history and formats the data for a charting library. The chart endpoint returnsseries as a map keyed by affiliate ID, with each entry containing an affiliate_name and data array of {t, p, l, m, c} points.
Comparing Openers to Current Lines
A common use case is showing how far a line has moved from its opener. Fetch both the opener and current odds, then compute the difference. Both endpoints return the same V2 events structure withmarkets > participants > lines > prices.
Next Steps
Getting Live Odds
Fetch current odds for today’s games
Player Props
Historical data for prop markets too
Market IDs
Full list of market types
Sportsbook IDs
All tracked sportsbooks