> For the complete documentation index, see [llms.txt](https://docs.ticksights.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ticksights.com/api/history-window.md).

# History window

The API returns the last **180 days** of data on Premium and the last **90 days** on Basic and Default. Sales older than that are not available, and neither are events whose date lies further in the past. Upcoming events are always included; the window only limits how far back you can look. Every response carries the window in the `X-History-Window-Days` header.

In detail:

* `/event/{id}/sales` and `/sales` return only sales within the window. A `dateFrom` earlier than the window start is moved to the window start; `total_count` reflects what is actually available.
* `/events` and `/topsellers` return only events with an event date within the window or in the future. A `dateFrom` earlier than the window start is moved to the window start.
* `/event/{id}`, `/event/{id}/sales`, `/event/{id}/avgprice` and `/event/{id}/sales/development` answer `404` for an event whose date is before the window.
* `average_ticket_price` on `/event/{id}` and the per-block figures on `/event/{id}/avgprice` are computed over the sales within the window. `sold_tickets_total`, `sold_tickets_24h` and `sold_tickets_7d` are counters over the event's whole lifetime and are not affected.

If you need a longer history for your use case, get in touch.
