matchprior

RESEARCH QUICKSTART · FOOTBALL / TENNIS

Try the football and tennis API workflow in Python.

Try a synthetic football or tennis forecast example before connecting to the API. Run the Python workflow offline without a key, then keep the live forecasts you actually observe with fixture IDs and clear times.

Python 3.9+ · standard library only · no account or key needed for the offline demo

1. Run the workflow before connecting.

Extract the download and open a terminal in its folder. The demo runs the published collector against two pages of in-memory, synthetic responses. It makes no network requests and uses no API allowance.

python run_demo.py --sport football
python inspect_history.py demo-football.jsonl

EXPECTED DEMO OUTPUT · SYNTHETIC, NOT LIVE

Prediction pages
2
Future observations
2
Duplicate appends on repeat
0

One unknown start and one already-started fixture are skipped. Every saved row is labelled synthetic. No results are graded; no hit rate or return is calculated.

The invented teams, players and fixed dates demonstrate the file format. Keep these files separate from genuine research records. The included checks run with python -m unittest -v test_demo.py.

2. Collect current forecasts for your sport.

Check current competition coverage and the service status. The package includes an unchanged copy of the public collector, with its source hash. Genuine prediction requests require an existing key that permits the sport.

Ready to collect live API forecasts?

Check current coverage first. Live service data requires a current paid subscription and key. The labelled synthetic demo does not call the API or supply live data.

To collect API records, you need a current paid subscription and an API key. Prices are in US dollars and billed monthly. Check plan limits and current competition coverage before subscribing.

Set MATCHPRIOR_API_KEY in a private local or server environment. Keep it out of URLs, browser code, source control, screenshots and the output file. Then choose one of the sport-specific guides:

python paper_tracker.py --sport football --output private-football.jsonl
python inspect_history.py private-football.jsonl

For tennis, use --sport tennis and a separate private-tennis.jsonl file. Real API collection requires current paid access. Check your scope and remaining allowance in the account workspace.

Each successful prediction page uses one normal request. Health reads are public and quota-free. A repeated collection can consume requests even when the same snapshot adds no new rows. The collector follows every returned cursor, limits a run to 25 pages, makes no automatic retries and refuses partial or mixed-snapshot collections. Check usage before retrying.

3. Know what each time tells you.

  1. Publication · snapshotAtThe model generation time reported by health.
  2. Observation · serverObservedAtThe prediction page’s HTTP Date header. The collector keeps only known starts after this time.
  3. Your clock · observedAtYour local observation time, kept separately rather than substituted for publication.

The final health check guards against a refresh while paging; it is not a transactional snapshot guarantee. A local file and HTTP Date header are not independently audited locks. This workflow records what you collect going forward and cannot reconstruct forecasts from before collection began.

The inspector checks file shape, fixture identity, probabilities, duplicates and reported pre-start timing. It reads only your chosen local file, changes nothing and uploads nothing. Keep one collector process per file, use a private folder and archive before the 32 MiB limit.

4. Plan the evaluation before results arrive.

Choose a rule in advance, such as the earliest eligible observation per exact fixture ID. Preserve later observations separately; several refreshes of one match are not several independent matches.

Match each chosen forecast to a verified result and the same outcome definition. Keep missing, postponed, retired and void outcomes visible until the appropriate rules are verified. An unresolved fixture is not a loss, and a grade for another forecast timestamp does not grade your saved probability.

This package has no verified result input and reports no performance statistic. Review the separate published calibration record and graded-history contract with their own cohort, eligibility and plan details.

Model fairOdds are reciprocal model probabilities. For a permitted bookmaker source, the comparison endpoint accepts your own captured prices under its supported market rules. This package includes no bookmaker feed or quote history. Calculated expected return is not realised profit.

Keep an eye on a match as it changes.

The account workspace lets you watch a match, save a view and inspect retained forecast changes. Publication and recording times stay distinct. The bounded archive starts when recording was enabled; it does not backfill earlier versions. Current matches follow your sport scope; archived fixtures require Pro or Business. Opening a watched match and loading its changes each use one request, with no automatic polling.

Read the forecast-changes reference or use the existing Python and JavaScript SDKs for other documented API requests.

Help shape MatchPrior

A missing field or a clearer example? Tell us what you were trying to do and what would help. Suggestions are optional. We review feedback in our support inbox and reply by email.

Suggest an improvement

Opens your email app so you can review and send. If it does not open, email [email protected] with the subject “MatchPrior feedback - Offline synthetic demo”. Leave out API keys, passwords, payment details and private customer data. For access, billing or faults, contact support.