> ## Documentation Index
> Fetch the complete documentation index at: https://docs.therundown.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Event history sportsbook limit

> Event market history takes any number of sportsbooks and applies limit to each market. main_line=true still needs 1 to 3 sportsbook ids.

`GET /api/v2/events/{eventID}/markets/history` reads each market on its own, so one request can cover every sportsbook.

| Request | Result |
| - | - |
| `affiliate_ids` omitted | History for every sportsbook your plan includes |
| `affiliate_ids=19,23,22,3,6` | History for those sportsbooks (any number) |
| `main_line=true&affiliate_ids=19,23` | Main-line history for those sportsbooks (1 to 3) |
| `main_line=true`, `affiliate_ids` omitted, blank, `0`, or non-numeric | HTTP 400: `affiliate_ids is required with main_line=true; pass 1 to 3 sportsbook ids` |
| `main_line=true` with four or more distinct ids | HTTP 400: `with main_line=true, affiliate_ids accepts at most 3 sportsbook ids per request` |

`limit` applies to each market: every requested market returns up to `limit` of its newest rows (default 1000, maximum 5000). One response carries at most 15,000 rows, so with more than 3 markets each market's limit is 15,000 divided by the number of markets. With `main_line=true`, `limit` caps the whole response.

Repeated ids count once. `affiliate_ids=0` is not a scores-only sentinel on this route. `market_ids` still defaults to `1,2,3` (maximum 12). `from` and `to` are optional RFC 3339 bounds.

Chart history (`GET /api/v2/events/{eventID}/markets/{marketID}/history`), opening lines, and closing lines also treat `affiliate_ids` as an optional filter. Chart history with `participant_id`, `line`, or `main_line=true` reads at most 40,000 recorded prices per request. If `limit` is not filled by then, it returns HTTP 400 asking for fewer `affiliate_ids` or a shorter `from`/`to` window. See [Single Market History](https://docs.therundown.io/guides/historical-odds.md#single-market-history-chart-data).

WebSocket connection caps are documented on [Connection limits](https://docs.therundown.io/api-reference/v2/websocket-connection-limits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.