> For the complete documentation index, see [llms.txt](https://statalpha.gitbook.io/statalpha-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://statalpha.gitbook.io/statalpha-docs/using-the-api/rate-limits.md).

# Rate Limits & Plans

Your StatAlpha plan controls three things:

* which surfaces you can use: web console, API, or both
* how much historical data you can query
* how many requests you can make per minute and per day

## Plan Overview

| Plan Type | Web Console | Direct API | History                |
| --------- | ----------- | ---------- | ---------------------- |
| Free      | Yes         | No         | Last 365 days          |
| Pro Web   | Yes         | Optional   | Full available history |
| Pro API   | Yes         | Yes        | Full available history |

Enterprise and custom plans may have custom limits. Your actual limits are shown in **My account** and through `/me/usage`.

## Request Limits

Request limits are account-specific. Typical defaults are:

| Plan Type | Requests / Minute | Requests / Day |
| --------- | ----------------- | -------------- |
| Free      | 10                | 500            |
| Pro Web   | 60                | 5,000          |
| Pro API   | 300               | 50,000         |

If a request limit is exceeded, the API returns `429`.

Example response:

```json
{
  "detail": {
    "error": "rate_limit_exceeded",
    "message": "Rate limit exceeded: 10 requests per minute.",
    "limit": 10,
    "window": "minute"
  }
}
```

## History Limits

Free accounts can query the most recent 365 days. Pro accounts can query full available history.

If you request a date range that starts before your allowed history window, StatAlpha does not return data older than your plan allows. Where supported, the response metadata indicates that the requested range was adjusted.

## Check Remaining Usage

```bash
curl -s \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  "https://api.statalpha.market/me/usage"
```

The response includes your current account details and rate-limit usage.

## Examples

Web users can run analytics from:

```
https://web.statalpha.market
```

API users can call the same analytics through the API:

```bash
curl -s \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  "https://api.statalpha.market/stats/gap/summary?symbol=AAPL&time_window=12M"
```

If your account is web-only and you call the API directly with an access token, the API returns `403`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://statalpha.gitbook.io/statalpha-docs/using-the-api/rate-limits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
