VALUEODDSAPI / BUYER GUIDES
How do you evaluate historical odds data for backtesting?
A useful backtest needs the price that was known when a decision would have been made. Test timestamps, selection identity, open status and missing observations before trusting the result.
Published by ValueOddsAPI · 23 November 2026
In 30 seconds
- Define the decision time first. A backtest may use only observations available before that cutoff.
- History and closing answer different questions.
/v2/odds/historytraces oneprice_id;/v2/odds/closingsummarizes each event price. - Check the price status. An observed suspended or removed price is not an executable offer.
- Audit missing data. Gaps, incomplete event coverage and access limits can bias the result.
What makes historical odds usable for backtesting?
A betting backtest asks what a strategy would have selected using information available at a past decision time. For that purpose, a historical API must preserve observations and their timestamps, stable selection identity and price status. A list of final prices alone cannot reconstruct every earlier decision. ValueOddsAPI documents GET /v2/odds/history for one price_id and GET /v2/odds/closing for an event in its v2 API contract. Confirm your plan’s history entitlement with GET /v2/me and the plan reference.
This guide describes an evaluation method, not a claim that a historical feed proves a strategy profitable. Outcome data, actual bet acceptance, delays, limits and costs require separate evidence.
Which endpoint answers which question?
| Endpoint | Returns | Useful for |
|---|---|---|
/v2/odds/history?price_id=… | Recorded price or status changes for one price ID, oldest first; paginated. | Reconstructing the observation available before a decision cutoff. |
/v2/odds/closing?event=… | First recorded open price and last open price before start for each event price; paginated. | Comparing an opening and final pre-start observation, or a closing-line benchmark. |
The definitions and response schemas are in the published contract. The closing response has meta.final=false before kickoff; the then-current latest price is not a final close.
How do you prevent look-ahead bias?
Choose a precise decision cutoff for every event. Fetch the relevant price_id history and retain only points whose ts is at or before that cutoff. Of those, use the latest open observation that was actually available to your strategy. Record the chosen timestamp, price, status and ID so another reviewer can reproduce the choice. The history response includes each point’s ts, price and status, as specified in the contract.
Do not select the last available historical point and present it as an earlier opportunity. Likewise, do not use the closing price to generate the same bet whose closing-line movement you intend to evaluate. The closing endpoint defines first recorded and last open before start prices; those are observations, not guarantees that a customer could place a bet at those odds.
What data-quality checks belong in the pilot?
| Check | How to test | Why it matters |
|---|---|---|
| Identity | Join by price_id; inspect event, bookmaker, market, line and outcome. | A mismatched selection makes the comparison invalid. |
| Availability | Count open, suspended and removed points at decision time. | Only open observations belong in a candidate offer set. |
| Temporal coverage | Count events with at least one point before each chosen cutoff. | A backtest can otherwise include only well-observed events. |
| Pagination | Follow next_cursor until exhausted for every query. | A first page can omit the relevant observation. |
| Finality | Check event start and meta.final on closing responses. | A pre-start latest price is provisional. |
| Access | Test actual sports, bookmakers and history rights with your key. | The public schema does not grant every plan every segment. |
For selection identity, see the market-mapping acceptance test.
How should you interpret a pilot result?
Publish the sample definition: date range, sports, bookmakers, markets, decision cutoff and required observation age. Report the fraction of target events with a usable pre-cutoff open price, the share with unresolved mapping, and the distribution of time between the chosen observation and cutoff. Compare those counts across segments rather than quoting one global coverage number. This is a proposed buyer metric; no performance result is asserted here.
If you calculate closing-line movement, retain the exact price_id and compare the chosen historical price with that same selection’s final pre-start open price. Report missing closes explicitly. The closing endpoint’s opening and closing can be null, as the schema allows. Check the coverage guide for a target-market sampling framework and the delivery guide if your production strategy also needs a live feed.
Frequently asked questions
Is closing odds the price I could have placed earlier?
No. It is the last recorded open price before event start. Earlier decisions need a historical observation from before their cutoff.
Does a history response include all sports and bookmakers?
No entitlement is implied by the response shape. Test the sports, bookmakers and history access granted to your actual API key.
Can a suspended point be used as an available price?
No. Preserve its status in the audit trail, but do not count it as an actionable open offer.
Does a positive backtest prove future profitability?
No. Data coverage, timing, acceptance, limits, costs and future market changes can alter live outcomes.
ValueOddsAPI provides odds data, not betting advice. Betting involves risk of loss and is for adults (18+) only. If gambling stops being fun, contact your local support service, such as StopSpillet in Denmark.
Test a reproducible sample
Select a bounded set of events and document the decision rule before fetching results. Use the v2 reference, check your actual entitlements in /v2/me, then compare required history access with the current plans.