Quickstart notes
Get Pinnacle odds for one league, not the whole sport
The markets endpoint answers per sport, so league filtering happens in your code. Discover the league names, filter the events, keep requests flat.
The Pinnacle odds API markets endpoint selects by sport, not by league. One request with a sport ID returns that sport's whole board, every event with its lines. To watch one league or one match, you fetch the board once and filter the events in your own code. The request count stays exactly the same; what changes is how much noise reaches the rest of your program.
The endpoint answers per sport
A call to the markets endpoint with a sport ID returns the full board for that sport as JSON: an events array plus a last cursor for the next delta read, as the curl quickstart shows. There is no league parameter to add. Every event in the array carries its league name alongside the teams and the start time, which is what makes client-side filtering possible.
One request still equals one board whether you keep three events or three hundred, so filtering is about focus, not quota.
Discover the league names first
League names arrive as plain strings, and guessing them fails quietly: a space, a dash or a country prefix you did not expect, and your filter matches nothing forever. Spend one request on a discovery pass before you hard-code anything:
names = sorted({ev.get("league_name", "") for ev in data["events"]})
for n in names:
print(n)
Run it once, copy the exact strings you need, and put them in a set. Then the filter itself is one line:
LEAGUES = {"England - Premier League", "Spain - La Liga"}
def wanted(ev):
return ev.get("league_name") in LEAGUES
Apply it to every response, including delta reads: the since cursor returns only changed events, and a changed event from a league you do not follow is still noise. The Python quickstart loop is the right place to slot the filter in, right after the envelope is parsed.
Finding one match
A single match is the same filter with a tighter condition: match on the league, then on the two team names. Team strings have the same caveat as league strings, so take them from a discovery pass too. Keep the start time in the comparison when teams meet twice in a week, because name pairs are not unique across a season.
If you poll a whole sport only for one fixture, keep the interval honest. The free key allows 20 calls a minute and 100 a day, per the pricing page, checked 2026-09-30, and a single-match watch fits inside it easily at one call every fifteen minutes.
What filtering does not change
Filtering shrinks your output, not your bill. The board is the unit the API serves, and the meter counts calls. It also does not change what the cursor returns: a delta read hands you whole events, not partial league slices. What filtering buys is a cleaner downstream: fewer rows in your store, fewer alerts to dedupe, and logs that say something when you read them.
Fetch the board, keep your slice, drop the rest. The API stays simple, and your program stays focused.