Odds API rate limits usually come in two layers: a per-second window that you hit by polling too fast, and a daily quota that you hit by polling too long. A client that handles both needs three things: a minimum gap between requests, a retry that honours Retry-After, and a hard stop when the API says the day is over. The Python below does all three in about 60 lines with only the standard library.
I work on PinnFeed, and the numbers in this post are PinnFeed's. The pattern works the same against any API that sends Retry-After and X-RateLimit-* headers.
What limits does the client have to respect?
As of 6 December 2026, these are the REST limits per plan:
| Plan | REST limit | Daily quota | Data |
|---|---|---|---|
| Free ($0) | 1 req/s | 1,000 requests/day, account-wide | 30-second delay |
| Realtime REST ($49/mo) | 1 req / 5 s | none | real time |
| Builder ($139/mo) | 10 req/s | none | real time, plus WebSocket |
| Pro ($179/mo) | 30 req/s | none | real time, plus WebSocket |
Two details caught me out when I first wrote a poller. The Free quota counts every key on the account, so a second key does not buy you a second 1,000. And the quota resets at 00:00 UTC, which is not midnight where most people live.
What does the API send back when you go too fast?
Errors share one JSON body. A per-second violation looks like this:
{ "error": { "code": "rate_limited", "message": "Limit is 1 request every 5 seconds on Realtime REST.", "retryAfterMs": 5000 } } That comes with HTTP 429 and a Retry-After header in seconds. Running out of the daily quota is also a 429, but the code is daily_quota and the body carries limit, reset_at and an upgrade_url. Retrying that one is pointless until the reset, so the client has to tell the two apart by code, since the status alone looks the same.
On Free, every successful response carries:
-
X-RateLimit-Limit: requests allowed per day for the account -
X-RateLimit-Remaining: requests left today, after this one -
X-RateLimit-Reset: Unix time of the next 00:00 UTC reset
Realtime REST reuses the same header names for its 5-second window. Builder and Pro send no X-RateLimit-* headers, but their 429 still has Retry-After.
The client
import json import os import time import urllib.error import urllib.parse import urllib.request BASE = os.environ.get("PINNFEED_BASE", "https://pinnfeed.io") KEY = os.environ.get("PINNFEED_KEY", "") class QuotaExhausted(Exception): def __init__(self, reset_at): super().__init__(f"daily quota used, resets at {reset_at}") self.reset_at = reset_at class OddsClient: def __init__(self, key=KEY, base=BASE, min_interval=1.0): self.key = key self.base = base.rstrip("/") self.min_interval = min_interval # 1.0 on Free, 5.0 on Realtime REST self._last = 0.0 self.remaining = None # X-RateLimit-Remaining (daily on Free) self.reset = None # X-RateLimit-Reset (unix time) def _wait_turn(self): gap = self.min_interval - (time.monotonic() - self._last) if gap > 0: time.sleep(gap) def get(self, path, retries=3, **params): url = f"{self.base}{path}" if params: url += "?" + urllib.parse.urlencode(params) req = urllib.request.Request(url, headers={"x-api-key": self.key}) for attempt in range(retries + 1): self._wait_turn() self._last = time.monotonic() try: with urllib.request.urlopen(req, timeout=15) as res: self._read_headers(res.headers) return json.load(res) except urllib.error.HTTPError as e: body = json.loads(e.read() or b"{}") err = body.get("error", body) code = err.get("code") if code == "daily_quota": raise QuotaExhausted(err.get("reset_at")) if code == "rate_limited" and attempt < retries: wait = float(e.headers.get("Retry-After") or 0) or err.get("retryAfterMs", 1000) / 1000 time.sleep(wait) continue raise RuntimeError(f"{e.code} {code}: {err.get('message')}") raise RuntimeError("gave up after retries") def _read_headers(self, h): if h.get("X-RateLimit-Remaining") is not None: self.remaining = int(h["X-RateLimit-Remaining"]) self.reset = int(h["X-RateLimit-Reset"]) if __name__ == "__main__": client = OddsClient() board = client.get("/v1/odds", sport="soccer", market="moneyline", main="true", limit=50) print("asOf", board["asOf"], "events", board["count"], "left today", client.remaining) time.monotonic() matters here. If you use time.time() and the machine's clock gets corrected mid-run, the gap calculation can go negative and you fire two requests back to back.
I tested it against a local server that returns the documented headers, a rate_limited 429 with Retry-After: 1 on the second call and a daily_quota 429 on demand. The client waited about one second between every request, retried the 429 once and raised QuotaExhausted with the reset time. Against the real API with a made-up key you get the 401 instead:
401 invalid_key: Unknown or revoked API key. Get a new one at https://pinnfeed.io/recover (we email you a fresh key) or create one in your dashboard: https://pinnfeed.io/dashboard. How many requests does a poller really need?
Do the sums before choosing an interval. One sport polled every 15 minutes is 96 requests a day. Every minute is 1,440, which no longer fits in 1,000. Two sports every 2 minutes is also 1,440. On Free the data is 30 seconds old anyway, so polling every few seconds mostly burns quota on prices you have already seen.
Two habits cut the count further:
- Filter on the server.
/v1/oddstakessport,league,market,liveandmain=true. Asking for main moneylines in two leagues is one small request; asking for everything and filtering locally is the same request count with a much bigger payload, and on Free you will page through more events. - Use
asOfandupdatedAt. Every response hasasOf(the moment the data reflects) and every market hasupdatedAt(its last price change). Store the lastasOfyou processed and skip markets whoseupdatedAtis older. Your downstream code then only touches what moved.
GET /v1/account returns your plan and today's usage (usage.account_used_today is the number the Free quota uses), so a long-running job can check it at startup instead of finding out at request 1,001.
When is polling the wrong tool?
If you need every price change as it happens, a polling loop at any interval will always be behind by part of that interval. That is where a WebSocket fits: on PinnFeed the push stream starts at Builder, and the REST limits above stop being the bottleneck. For dashboards, spreadsheets, nightly jobs and backtests, a polite REST client like this one is enough.
The full parameter list for /v1/odds, /v1/drops and /v1/account is in the PinnFeed REST reference.
Who publishes this
Written by the PinnFeed team. PinnFeed is a Pinnacle odds API for developers (REST, WebSocket and a hosted MCP server). PinnFeed is not affiliated with, endorsed or sponsored by Pinnacle. Odds data is for information and software development; 18+, and nothing here is betting advice.
