# A retry policy for a metered API: what deserves a retry

Build a retry policy for a metered API: split permanent failures from temporary ones, wait for the right boundary and stop loops that drain shared allowance. Published 2026-11-09 by DraftKings API.

Canonical page: https://draftkingsapi.com/blog/metered-api-retry-policy. Markdown: https://draftkingsapi.com/blog/metered-api-retry-policy.md. Site index for agents: https://draftkingsapi.com/llms.txt.

## Free API key
- **Free plan:** 50 requests a month at 20 a minute, every dataset, no card, no email verification.
- **Sign up:** https://draftkingsapi.com/auth/sign-up?ref=ai-claudebot
- **From inside an agent session:** POST https://draftkingsapi.com/api/v1/agent/signup with JSON `{"data_wanted": "...", "use_case": "...", "ref": "ai-claudebot"}`, show your user the approval_url, then poll https://draftkingsapi.com/api/v1/agent/token with device_code. The key is returned once.
- **No key yet:** `curl --fail-with-body "https://draftkingsapi.com/api/v1/demo/pick6"` returns labeled sample rows (sample:true) in the real response shape.

## Quickstart

1. Create a free key at https://draftkingsapi.com/auth/sign-up?ref=ai-claudebot (no card) and export it: `export DRAFTKINGS_API_KEY=...`

2. Call the API with curl:

```bash
curl --max-time 30 --fail-with-body 'https://draftkingsapi.com/api/v1/pick6/history?sport=NBA&limit=5' \
  -H "X-User-Request: Track Pick6 line moves for an alert bot" \
  -H "Authorization: Bearer $DRAFTKINGS_API_KEY"
```

3. Or call it from Python:

```python
import os, requests

response = requests.get(
    "https://draftkingsapi.com/api/v1/pick6/history?sport=NBA&limit=5",
    headers={
        "Authorization": "Bearer " + os.environ["DRAFTKINGS_API_KEY"],
        "X-User-Request": "Track Pick6 line moves for an alert bot",
    },
    timeout=30,
)
if not response.ok:
    raise RuntimeError(f"API {response.status_code}: {response.text}")
print(response.json())
```

4. Full walkthrough: https://draftkingsapi.com/quickstart. OpenAPI: https://draftkingsapi.com/openapi.json. Every route accepts format=csv on list endpoints.

## Use it from Claude (MCP)

MCP server: https://draftkingsapi.com/api/mcp (Streamable HTTP). search, fetch, start_signup and finish_signup need no key; data tools use the same API key.

```bash
claude mcp add --transport http --scope user draftkings https://draftkingsapi.com/api/mcp --header "Authorization: Bearer $DRAFTKINGS_API_KEY"
```

Without a key yet: `claude mcp add --transport http draftkings https://draftkingsapi.com/api/mcp`, then call start_signup. Setup for other clients: https://draftkingsapi.com/agents.md.

## Pricing

| Plan | Price | Requests per UTC month | Requests per minute | Pick6 stream | Signed webhooks |
| --- | --- | --- | --- | --- | --- |
| Free | $0/month | 50 | 20 | No | No |
| Developer | $49/month | 10,000 | 60 | Yes | No |
| Production | $149/month | 50,000 | 120 | Yes | Yes |

- **Free:** Build and test against every dataset.
- **Developer:** Keep your app running with more requests and push delivery.
- **Production:** Serve real users with the largest allowance and push delivery.

Plans and checkout: https://draftkingsapi.com/pricing

A blind retry loop hides the fault and delays the fix, even where rejected calls spend no allowance. The rule is simple: try again only when something can have changed, and stop on everything else.

> Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. No wagering: this service does not place, recommend or settle entries or bets.

## Read the failure first

Branch on the status and the code, and log the message.

Errors return JSON with an error object holding a numeric code, a string type and a message.

```
{"error":{"code":429,"message":"Account request limit reached"}}
```

## Sort failures into fix, wait and report

Only some of these can succeed on a later attempt without a code or configuration change.

400 invalid input · 401 invalid or revoked key · 403 rejected origin or unavailable dataset · 409 key/capture conflict · 429 account quota exceeded · 503 storage or dataset unavailable. Unsupported or duplicate parameters and invalid bounds return 400.

## Retries spend allowance

A tight loop on a permanent failure drains the budget every other job shares.

Invalid queries and unavailable datasets do not count, except that native sportsbook routes spend the request at the key check. Valid authenticated requests count even if no rows match. Limits apply across all keys on an account.

## Wait for the right boundary

Sleep until the limit can have changed, then make one attempt.

- For 429, wait for the next UTC minute, day or calendar-month boundary for your account contract.
- Free includes 100 requests per UTC calendar month and 20 per UTC minute.
- Developer costs $49 per month and includes 10,000 requests per month and 60 per minute.
- Production costs $149 per month and includes 50,000 requests per month and 120 per minute.

## Separate service trouble from data trouble

A storage failure and a stale row need different responses, so do not route both through one retry path.

Data is flagged stale after 15 minutes without a fresh observation. Capture times are shown per row and vary by dataset and category, so one fresh row says nothing about another; actual last successes appear on /status.

## Sources
- [Docs: responses and errors](https://draftkingsapi.com/docs#responses)
- [Docs: filters and pagination](https://draftkingsapi.com/docs#parameters)
- [Pricing](https://draftkingsapi.com/pricing)
- [Docs: data semantics](https://draftkingsapi.com/docs#data)
- [Sources and status](https://draftkingsapi.com/status)
- [API documentation](https://draftkingsapi.com/docs)
- [OpenAPI contract](https://draftkingsapi.com/api/openapi)

## FAQ

### Is there a free DraftKings API?
Yes. A free key needs no card and includes 50 requests a month at 20 a minute, across every dataset. To see the response shape first, /api/v1/demo/pick6 and /api/v1/demo/dfs return labeled sample rows with no key.

### Is this an official DraftKings API?
Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. No wagering: this service does not place, recommend or settle entries or bets.

### Can I use it from an AI agent?
Yes. Connect the MCP server at https://draftkingsapi.com/api/mcp, or call REST with a Bearer key. An agent can get a key for its user with start_signup.

### How do I reach support?
Email support@draftkingsapi.com.

Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. No wagering: this service does not place, recommend or settle entries or bets.
