Upsets
GET /v1/upsetsThe results nobody expected, each with the reasons in plain words: the chance the winner had by the closing prices, and what else stood against the favourite (the road, rest, a back to back). An upset is a win, overtime and shootout included, by a side with a 30% chance or less, the prices taken together so the margin is shared out: the closing moneyline first, else the closing three-way price (a draw after regulation counted half to each side), else the average price. upset_size runs from 0 to 100, how far under the 30% line it fell. The latest seven days by default, newest first; give a day or a range (up to 92 days), a league, a country or a team, and sort by size for the biggest first. Games with no price are left out.
https://api.icehockeyapi.com/v1/upsetshttps://api.icehockeyapi.com/v1/upsets?team_id=tm_ampzcavycurl "https://api.icehockeyapi.com/v1/upsets?team_id=tm_ampzcavy" \ -H "X-API-Key: YOUR_KEY"
Run works once the API is live; the code above works now.
Parameters
| Name | In | Type | What it does |
|---|---|---|---|
date | query | date | One day, YYYY-MM-DD |
from | query | date | First day of a range |
to | query | date | Last day of a range |
league_id | query | id | A league, from /v1/leagues. |
team_id | query | id | A team, from /v1/teams. |
country | query | string | The league's country, by name as /v1/leagues gives it |
min_size | query | int | Only upsets at least this big, 0 to 100; 0 (every upset) when left out |
sort | query | enum | latest (newest first, the default) or size (biggest first) latestsize |
page | query | int | Page number, from 1 |
per_page | query | int | Upsets a page, 100 when left out |
Returns
Each record as in the example answer above.