# Draftkings — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access data from Draftkings.com.

**Category:** Sports | **Website:** [draftkings.com/](https://draftkings.com/) | **Docs:** [parse.bot/marketplace/b9d147f9-49ce-4072-9e54-7aa671aa1e08/draftkings-com-api](https://parse.bot/marketplace/b9d147f9-49ce-4072-9e54-7aa671aa1e08/draftkings-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/draftkings/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get league navigation

Returns the navigation structure and available bet categories for a specific league. Shows available subcategories (game lines, player props, futures, etc.) with their IDs needed to query odds. Use the subcategoryId from the parameters field of results to query specific odds via get_league_odds.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_id` | string | No | League ID from get_sports_categories (e.g. 84240 for MLB, 94682 for WNBA, 42648 for NBA, 88808 for NFL, 42133 for NHL, 189706 for Golf/PGA Tour). |
| `template_id` | string | No | Template ID for the league page layout. If omitted, a known template is used for common leagues (MLB, WNBA, NBA, NFL, NHL, Golf). Obtain from get_sports_categories results for other leagues. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/draftkings/get-league-navigation \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"league_id":"<string>","template_id":"<string>"}'
```

### Get league odds

Returns current game odds for a specific league and subcategory. For team sports includes moneyline, spread/run line, and over/under totals for each scheduled game. For golf includes tournament winner futures, top 5/10 finishers, group winners, and head-to-head matchups depending on subcategory. Each game/event lists participants, start time, status, and all available market odds with American, decimal, and fractional formats.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_id` | string | No | League ID (e.g. 84240 for MLB, 94682 for WNBA, 42648 for NBA, 88808 for NFL, 42133 for NHL, 189706 for Golf/PGA Tour). Obtain from get_sports_categories. |
| `subcategory_id` | string | No | Subcategory ID for the bet type. If omitted, defaults to game lines for team sports (4519 for MLB, 4511 for basketball/football/hockey) or tournament futures for golf (4508). Obtain from get_league_navigation parameters. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/draftkings/get-league-odds \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"league_id":"<string>","subcategory_id":"<string>"}'
```

### Get sports categories

Lists all available sports and leagues from the DraftKings sportsbook manifest. Returns sport IDs, league IDs, sport names, league names, and template IDs. Use the league_id from results to query odds or navigation for a specific league.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/draftkings/get-sports-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.