Collect ATP/WTA singles model observations for a forward-only paper tracker. The script preserves what you observed now, including the snapshot time and the exact fixture identity.
Try the workflow before connecting. Run the offline research demo with labelled synthetic data; choose Tennis in the example selector. No account or API key is needed for the demo. Live collection below needs a key that permits tennis.
Run the tennis collection
python paper_tracker.py --sport tennis --output private-tennis.jsonlUse a key that permits tennis. ATP/WTA fixtures depend on published singles draws and players that can be matched to the ratings model. The current schedule is not a promise of every tour event, qualifying match or player. Check the live counts and source checks before collecting.
Prepare your key and local file
Download paper_tracker.py and save it in an existing private folder. Set MATCHPRIOR_API_KEY in your local or server environment. Keep the key out of source control, browser code, shared notebooks and the output file.
Service data requires a current paid subscription. Paid-plan capabilities and remaining requests are shown in your account workspace. A plan that permits a sport does not guarantee fixtures in every competition or on every day.
What the collector does
- Reads the public health response and its
generatedAttimestamp before requesting predictions. - Requests prediction pages with
limit=200and follows the exactpage.nextCursorvalue until it is null. It rejects repeated cursors, repeated fixture IDs, inconsistent counts and incomplete results. - Keeps only fixtures with a known future
startMs, compared with the prediction response’s HTTP Date header. It reports unknown or already-started fixtures as skipped. - Reads health again and refuses to append a mixed collection if the reported snapshot timestamp changed while paging. This is a refresh guard, not a transactional snapshot guarantee.
- Appends new observations to local JSONL, preserving earlier lines. The sport, fixture ID and snapshot timestamp form the local duplicate key.
Each successful prediction page consumes one normal plan request; the public health reads are quota-free. Re-running can consume page requests even when that snapshot is already in your file. The collector makes no automatic retries and writes no partial collection if a guard fails. Check usage before retrying a failed request.
Keep the times distinct
| Field | What it records |
|---|---|
snapshotAt | The health response’s model snapshot generation time. |
observedAt | The collector’s local UTC observation time. This depends on your own clock. |
serverObservedAt | The Date header received with that prediction page. This is an observation reference, not an independently audited forecast lock. |
model.provenance | Published model/input provenance when supplied. A feature cutoff is not a substitute for snapshot or observation time. |
The file records current observations going forward. It does not reconstruct what the model said before you started collecting, prove an earlier bookmaker price was available or establish an independently verified pre-match track record.
Retain and inspect your own history
The output stays in your folder. Use one collector process per output file, choose an appropriately private folder on Windows, and archive the file before it reaches the 32 MiB safety limit. Existing malformed history is preserved and the command stops. The collector does not upload your history, place bets, settle results or send customer details.
Keep unresolved, postponed, retired or void outcomes separate until you can verify the appropriate result rules. Published graded history is a different API product with its own plan requirements and eligibility rules; see the history reference.
Add your own current bookmaker quote
Model fairOdds are calculated from model probabilities. They are not bookmaker prices. If your data source permits this processing, use POST /v1/odds/compare or the separate comparison example with an exact fixture ID, a named source, decimal prices and the actual capture time. The service does not provide a bundled bookmaker feed.
Quote comparisons use the latest published model, with quote and model ages reported separately. A quote may predate that model; the response flags it. A modelled expected return is a calculation before costs, not realised performance.
Use completed-match winner rules
Tennis probabilities are two-way: H and A follow the fixture’s home/away player order, not a bookmaker’s display order. The draw probability is zero and a quote comparison must omit a draw price.
For a permitted current quote, use market: tennis_match_winner and both H and A decimal prices. Comparisons support ATP/WTA completed-match winners; they do not model set winners, game handicaps or totals.
Retirements and walkovers need separate treatment. They are excluded from the completed-match basis. Bookmakers can apply different retirement, postponement and void rules, so a matching player pair alone does not establish a compatible market.
If a start time is unknown or the scheduled start has passed, the collector skips the fixture. A delayed match can still require a fresh verified start time; do not change timestamps to make an observation appear pre-match.