# Alert on FanDuel line moves: polling, stream, webhooks

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/docs/line-move-alerts (this is its markdown version, https://fanduelapi.com/docs/line-move-alerts.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/)/[Docs](https://fanduelapi.com/docs) / Line move alerts

Docs workflow

# Alert on FanDuel line moves

An alert is three decisions: how changes reach you, which ones matter, and how you make sure each is sent once. Every FanDuel line, price and status change is in one feed with a cursor, so all three are short.

[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\. Choose the delivery

- **Poll** `GET /api/v1/changes?since=<cursor>`: every plan. On Developer one loop fits every 5 minutes.
- **Stream** `GET /api/v1/stream`: Server-Sent Events, resumed with Last-Event-ID; changes arrive as they are collected. See [the stream](https://fanduelapi.com/fanduel-api-websocket).
- **Webhooks**: signed POSTs in batches of up to 100, Production ($149 a month) and up. See [webhooks](https://fanduelapi.com/fanduel-api-webhooks).

All three carry the same rows: cursor, kind (new, line\_move, price\_move, status\_change, removed), prop\_id, player, stat, period, previous, current and at. Filter by league in the request (`league=NBA`) to keep each read small.

## 2\. Decide what is worth an alert

A size rule for line and price moves

```
def worth_alerting(c, min_line=1.0, min_pp=3.0):
    """A line move of at least min_line, or a price move of at least min_pp points of no-vig probability."""
    if c["kind"] == "line_move" and c["previous"] and None not in (c["previous"]["line"], c["current"]["line"]):
        return abs(c["current"]["line"] - c["previous"]["line"]) >= min_line
    if c["kind"] == "price_move" and c["previous"]:
        before, after = fair_over(c["previous"]), fair_over(c["current"])
        return None not in (before, after) and abs(after - before) * 100 >= min_pp
    return False

def fair_over(state):
    o, u = state["over_american"], state["under_american"]
    if o is None or u is None:
        return None
    io = -o / (-o + 100) if o < 0 else 100 / (o + 100)
    iu = -u / (-u + 100) if u < 0 else 100 / (u + 100)
    return io / (io + iu)
```

Status changes matter too: `status_change` to suspended can come just before a move, and `removed` means the prop is gone.

## 3\. Send each alert once, and recover

De-duplicate by cursor

```
seen = load_set("sent.txt")              # cursors already alerted
for c in changes:
    if c["cursor"] in seen or not worth_alerting(c):
        continue
    notify(f"{c['player']} {c['stat']}: {c['previous']['line']} to {c['current']['line']}")
    seen.add(c["cursor"])
save_set("sent.txt", seen)
```

After downtime, restart from the last cursor you processed; the feed keeps 30 days. A complete bot on this pattern is the [Discord bot](https://fanduelapi.com/fanduel-discord-bot); the request is `https://fanduelapi.com/api/v1/changes`.

## Questions

## Related

- [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)
- [Webhooks Register a webhook for FanDuel line and price changes, verify the HMAC signature in Python or Node, read the payload and recover a missed batch.](https://fanduelapi.com/fanduel-api-webhooks)
- [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)
- [Alerts when a prop moves Polling the change feed, the stream or webhooks, and which plan each needs.](https://fanduelapi.com/questions/how-to-get-alerted-when-a-fanduel-prop-moves)

## 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 and reads the same data five minutes behind.

[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.
