# FanDuel odds webhooks: signed line move pushes

FanDuel API (https://fanduelapi.com) is an independent API for FanDuel Sportsbook data: every player prop and game market FanDuel lists in NBA, NFL, NHL, MLB, college basketball and college football, normalized per player and stat with over and under prices in American and decimal odds, plus every line and price move with its timestamp, over REST, webhooks and MCP with one key. FanDuel API is an independent data service operated by FF API Inc. It is not affiliated with, endorsed by or sponsored by FanDuel.

Source page: https://fanduelapi.com/fanduel-api-webhooks (this is its markdown version, https://fanduelapi.com/fanduel-api-webhooks.md).

## Free offer

- Free plan: 100 credits a month, data delayed 5 minutes, no card. REST and MCP on every plan.
- Real-time data starts at Developer, $49 a month for 10,000 credits.
- Get a free key: https://fanduelapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create a free account at https://fanduelapi.com/sign-up?ref=ai-claudebot and create an API key in the dashboard (https://fanduelapi.com/dashboard/keys). Keys start with `fd_`. Store it as `FANDUEL_API_KEY`.
2. Make a first call with curl:

```bash
curl "https://fanduelapi.com/api/v1/props?sport=nba&stat=points&limit=5" \
  -H "Authorization: Bearer $FANDUEL_API_KEY"
```

3. Or with Python (`pip install requests`):

```python
import os
import time
from datetime import datetime, timezone

import requests

BASE = "https://fanduelapi.com/api/v1"
SESSION = requests.Session()
SESSION.headers["Authorization"] = f"Bearer {os.environ['FANDUEL_API_KEY']}"


def get(path, **params):
    """GET one endpoint and return its data list, waiting out rate limits."""
    while True:
        r = SESSION.get(f"{BASE}{path}", params=params, timeout=10)
        if r.status_code == 429:
            time.sleep(int(r.headers.get("Retry-After", "5")))
            continue
        r.raise_for_status()
        return r.json()["data"]


def price(odds):
    """American odds as text. A suspended market can come back with no price."""
    return "off" if odds is None else f"{odds:+d}"

props = get("/props", sport="nba", stat="points")
for p in props:
    print(f"{p['player']:<26} {str(p['line']):>5}  over {price(p['over_american']):>5}  under {price(p['under_american']):>5}")
```

4. Stay current with `GET /api/v1/changes?since=<cursor>` instead of re-reading every prop. Full reference: https://fanduelapi.com/openapi.json and https://fanduelapi.com/llms-full.txt.

## Use it from Claude (MCP)

Claude Code, with your key read from the shell:

```bash
claude mcp add --transport http --scope user fanduelapi https://fanduelapi.com/api/mcp \
  --header "Authorization: Bearer $FANDUEL_API_KEY"
```

Claude on the web or desktop: Settings, Connectors, Add custom connector, then paste https://fanduelapi.com/api/mcp. Without a key it gives the keyless tools (search_docs, fetch_doc, get_sample_props). Setup for other agents: https://fanduelapi.com/mcp.

## Pricing

| Plan | Price | Credits a month | Calls a minute | Includes |
| --- | --- | --- | --- | --- |
| Free | Free | 100 | 20 | REST and MCP access, Data delayed 5 minutes |
| Developer | $49/month | 10,000 | 60 | Real-time data, Line move history, Change stream |
| Production | $149/month | 50,000 | 120 | Real-time data, Line move history, Webhooks, Priority support |
| Scale | $499/month | 250,000 | 180 | Real-time data, Full line move history, Webhooks, Bulk export, Priority support |

Cancel paid plans any time from the billing portal. Details: https://fanduelapi.com/pricing

## This page

[FanDuel API](https://fanduelapi.com/)/ Webhooks

Webhooks

# FanDuel odds webhooks

Register an HTTPS URL and every FanDuel line, price and status change is POSTed to it in signed batches of up to 100, in order, with retries. Webhooks are on Production and up; up to 5 endpoints per account.

[Get a free API key](https://fanduelapi.com/sign-up)[Read the docs](https://fanduelapi.com/docs)

FanDuel API is an independent data service operated by FF API Inc. It is not affiliated with, endorsed by or sponsored by FanDuel.

## 1\. Register an endpoint

Request

```
curl -X POST "https://fanduelapi.com/api/v1/webhooks" \
  -H "Authorization: Bearer $FANDUEL_API_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://hooks.yourdomain.dev/fanduel", "kinds": ["line_move", "price_move"], "leagues": ["NBA", "NFL"]}'
```

The response carries the signing secret, starting `whsec_`, once. Store it like a key. `GET /api/v1/webhooks` lists endpoints, `GET /api/v1/webhooks/{id}/deliveries` shows the delivery log, and `DELETE /api/v1/webhooks/{id}` stops one.

## 2\. What arrives

Headers

X-Webhook-Signature, X-Webhook-Id, X-Webhook-Attempt

type

changes, or gap when a range was pruned before it could be sent

sequence

Counts up by one per endpoint

range

after equals the previous delivery's through, so a missing batch is visible

Sample body, not live data

```
{
  "id": "dlv_12345",
  "type": "changes",
  "endpoint_id": "<endpoint id>",
  "sequence": 42,
  "range": {
    "after": "918200",
    "through": "918264"
  },
  "created_at": "2026-11-06T01:12:04Z",
  "as_of": "2026-11-06T01:12:04Z",
  "data": [
    {
      "cursor": "918231",
      "kind": "line_move",
      "prop_id": "<prop id>",
      "event_id": "<event id>",
      "league": "NBA",
      "sport": "basketball",
      "player": "Sample Player",
      "stat": "points",
      "period": "game",
      "previous": {
        "line": 27.5,
        "over_american": -112,
        "under_american": -108,
        "over_decimal": 1.89,
        "under_decimal": 1.93,
        "market_status": "open"
      },
      "current": {
        "line": 28.5,
        "over_american": -110,
        "under_american": -110,
        "over_decimal": 1.91,
        "under_decimal": 1.91,
        "market_status": "open"
      },
      "at": "2026-11-06T01:11:58Z"
    }
  ]
}
```

## 3\. Verify the signature

The header is `t=<unix seconds>,v1=<hex>`, where the hex is HMAC-SHA256 of `t + "." + raw body` with your secret. Check it against the raw bytes, before parsing JSON, and reject a timestamp more than five minutes old so a captured delivery cannot be replayed.

Python (Flask)

```
import hashlib, hmac, os, time
from flask import Flask, abort, request

SECRET = os.environ["FANDUEL_WEBHOOK_SECRET"].encode()
app = Flask(__name__)

def valid(header, body):
    parts = dict(p.split("=", 1) for p in (header or "").split(",") if "=" in p)
    t, sig = parts.get("t", ""), parts.get("v1", "")
    if not t.isdigit() or abs(time.time() - int(t)) > 300:
        return False
    want = hmac.new(SECRET, f"{t}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(want, sig)

@app.post("/hooks/fanduel")
def hook():
    if not valid(request.headers.get("X-Webhook-Signature"), request.get_data()):
        abort(400)
    delivery = request.get_json()
    for change in delivery["data"]:
        print(delivery["sequence"], change["kind"], change["player"], change["stat"], change["current"])
    return "", 204
```

Node.js (no framework)

```
import { createHmac, timingSafeEqual } from "node:crypto";
import { createServer } from "node:http";

const SECRET = process.env.FANDUEL_WEBHOOK_SECRET;

function valid(header, body) {
  const parts = Object.fromEntries((header ?? "").split(",").map((p) => p.split("=", 2)));
  if (!/^\d+$/.test(parts.t ?? "") || Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
  const want = createHmac("sha256", SECRET).update(`${parts.t}.`).update(body).digest();
  const got = Buffer.from(parts.v1 ?? "", "hex");
  return got.length === want.length && timingSafeEqual(got, want);
}

createServer((req, res) => {
  const chunks = [];
  req.on("data", (c) => chunks.push(c));
  req.on("end", () => {
    const body = Buffer.concat(chunks);
    if (!valid(req.headers["x-webhook-signature"], body)) { res.writeHead(400).end(); return; }
    const delivery = JSON.parse(body);
    for (const change of delivery.data) console.log(delivery.sequence, change.kind, change.player, change.current);
    res.writeHead(204).end();
  });
}).listen(3000);
```

## 4\. Missed a batch? Read it back

Keep the last `range.through` you processed. If a delivery's `range.after` is not equal to it, or a gap arrives, call `/api/v1/changes?since=<last through>` and page until you are caught up. The feed keeps 30 days.

No public URL to receive on? The [live stream](https://fanduelapi.com/fanduel-api-websocket) delivers the same events over a connection your code opens, and the [Discord bot](https://fanduelapi.com/fanduel-discord-bot) shows a poller. What each change means is on [line movement](https://fanduelapi.com/fanduel-line-movement).

## Questions

## Related

- [Live stream There is no WebSocket here: FanDuel line changes stream over Server-Sent Events with resume. The event types, Python and Node clients, and the limits.](https://fanduelapi.com/fanduel-api-websocket)
- [Discord bot Post FanDuel prop line moves to a Discord channel: poll the change feed with a saved cursor, filter by size and league, and send through a Discord webhook.](https://fanduelapi.com/fanduel-discord-bot)
- [Real-time data How fresh FanDuel odds are on each plan, the meta fields every response carries about it, and which delivery to use when seconds matter.](https://fanduelapi.com/fanduel-api-real-time)
- [Line movement Where a FanDuel player prop opened, every line and price move since, and when it last moved, from the history endpoint, with a sample move tape.](https://fanduelapi.com/fanduel-line-movement)
- [Pricing Free on delayed data, then real time from the Developer plan.](https://fanduelapi.com/pricing)

## Make your first call in a few minutes

Sign up, create a key in the dashboard, and send it as a Bearer token. The free plan needs no card.

[Get a free API key](https://fanduelapi.com/sign-up)

## FAQ

### Is there a free plan?

Yes. Free includes API access with delayed data, enough to build and test a model.

### Is this affiliated with FanDuel?

No. This is an independent data service operated by FF API Inc. and is not affiliated with or endorsed by FanDuel.

### Which sports are covered?

NBA, NFL, NHL, MLB and college sports as FanDuel lists them, starting with player props.

### How do I cancel?

From the billing portal in your dashboard, at any time.

### How do I get a free key?

Sign up at https://fanduelapi.com/sign-up?ref=ai-claudebot. Free plan: 100 credits a month, data delayed 5 minutes, no card. REST and MCP on every plan.

### Can an AI agent sign up for me?

Yes. The agent sends POST https://fanduelapi.com/api/v1/agent/signup with your email and what you are building (add "ref": "ai-claudebot"), you approve the emailed link, and the agent collects the key. Details: https://fanduelapi.com/connect.
