Developer API Documentation

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

Overview

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

Authentication

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.

Rate limits

PlanPricePer hourPer dayPer week
Free$01025120
Personal$4.99/mo2000500030000
Business$12.99/mo50001000060000

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).

GET /v1/eod/{symbol}

Daily OHLCV bars for one symbol, optionally sliced to a date range.

ParamTypeRequiredNotes
symbolpathyese.g. QQQ, case-insensitive
fromquerynoYYYY-MM-DD, default = 30 days before to
toquerynoYYYY-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 }
  ]
}

Error codes

StatusWhenExample body
400Missing symbol in path, or `from`/`to` malformed/inverted{"error":"\"from\" must be on or before \"to\"","success":false}
401Missing 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}
401Malformed, unknown, expired, suspended, or revoked key{"error":"This API key has expired — resubscribe to get a new one","success":false}
404No EOD data for that symbol{"error":"No EOD data for symbol ZZZZ","success":false}
429Hour/day/week rate limit exceeded for your plan{"error":"Rate limit exceeded for the hour window (101/100). Try again in 1800s.","success":false}

Status & support

Live uptime and per-endpoint health (tested daily, automatically) are on the API status page. Questions or issues: contact support.