Programmatic access to StashGamma end-of-day stock data — pick a date range, get back real OHLCV bars, for any of 1,717 U.S.-listed symbols, going back 15 years.
See also: API status · Get an API key
The Developer API has one endpoint: daily end-of-day OHLCV bars for a symbol, over a date range you choose. All requests are read-only (GET) and require an API key. Base URL:
https://www.stashgamma.com/api/dataapi/v1
Pass your API key via either header — both are accepted, use whichever your HTTP client/library makes more convenient:
X-Api-Key: sg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # or Authorization: Bearer sg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Get a key from Profile → Developer API — the Free tier is instant and self-serve, no payment required.
| Plan | Price | Per hour | Per day | Per week |
|---|---|---|---|---|
| Free | $0 | 10 | 25 | 120 |
| Personal | $4.99/mo | 2000 | 5000 | 30000 |
| Business | $12.99/mo | 5000 | 10000 | 60000 |
Every response (success or error) includes rate-limit headers so you can self-throttle without guessing:
X-RateLimit-Plan: personal X-RateLimit-Limit-Hour: 2000 X-RateLimit-Remaining-Hour: 1997 X-RateLimit-Limit-Day: 5000 X-RateLimit-Remaining-Day: 4990 X-RateLimit-Limit-Week: 30000 X-RateLimit-Remaining-Week: 29950
A 429 also includes a standard Retry-After header (seconds until the exceeded window resets).
Daily OHLCV bars for one symbol, optionally sliced to a date range.
| Param | Type | Required | Notes |
|---|---|---|---|
| symbol | path | yes | e.g. QQQ, case-insensitive |
| from | query | no | YYYY-MM-DD, default = 30 days before to |
| to | query | no | YYYY-MM-DD, default = today |
Example request
curl -H "X-Api-Key: YOUR_API_KEY" \ "https://www.stashgamma.com/api/dataapi/v1/eod/QQQ?from=2026-07-01&to=2026-08-01"
Example response — 200 OK
{
"symbol": "QQQ",
"from": "2026-07-01",
"to": "2026-08-01",
"count": 23,
"bars": [
{ "date": "2026-07-01", "open": 611.2, "high": 614.8, "low": 609.5, "close": 613.1, "volume": 28451200 },
{ "date": "2026-07-02", "open": 613.4, "high": 615.0, "low": 611.9, "close": 614.2, "volume": 24310500 }
]
}| Status | When | Example body |
|---|---|---|
| 400 | Missing symbol in path, or `from`/`to` malformed/inverted | {"error":"\"from\" must be on or before \"to\"","success":false} |
| 401 | Missing API key (no X-Api-Key / Authorization header) | {"error":"Missing API key. Pass it via the X-Api-Key header or Authorization: Bearer <key>.","success":false} |
| 401 | Malformed, unknown, expired, suspended, or revoked key | {"error":"This API key has expired — resubscribe to get a new one","success":false} |
| 404 | No EOD data for that symbol | {"error":"No EOD data for symbol ZZZZ","success":false} |
| 429 | Hour/day/week rate limit exceeded for your plan | {"error":"Rate limit exceeded for the hour window (101/100). Try again in 1800s.","success":false} |
Live uptime and per-endpoint health (tested daily, automatically) are on the API status page. Questions or issues: contact support.