Jump to a section
Quickstart
Every request is authenticated with an x-api-key header. Create a free key if you don't have one.
Authentication
export KEY="sk_live_..." # from your dashboard
curl -H "x-api-key: $KEY" "https://api.stockdataapi.com/v6/finance/quote?symbols=AAPL"Missing or wrong keys get 401 {"message": "Invalid API key"}. A suspended or revoked key gets 403. Keys are stored hashed; if you lose one, revoke it and create another.
Quotes
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v6/finance/quote?symbols=AAPL,MSFT,^GSPC"Batch up to 50 symbols (plan-dependent). Unknown symbols are omitted from the result — the call never 404s.
Example response
{
"quoteResponse": {
"result": [
{
"symbol": "AAPL",
"shortName": "Apple Inc.",
"currency": "USD",
"marketState": "REGULAR",
"regularMarketPrice": 230.5,
"regularMarketOpen": 228.5,
"regularMarketDayHigh": 231.2,
"regularMarketDayLow": 227.8,
"regularMarketPreviousClose": 228.0,
"regularMarketVolume": 42000000
}
],
"error": null
}
}jsonMarket summary
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v6/finance/quote/marketSummary?region=US"Snapshots of the region's headline indices and futures. No required params; region defaults to US. Values keep YH's {raw, fmt} wrapping.
Example response
{
"marketSummaryResponse": {
"result": [
{
"region": "US",
"symbol": "^GSPC",
"exchange": "SNP",
"quoteType": "INDEX",
"shortName": "S&P 500",
"regularMarketPrice": { "raw": 5300.25, "fmt": "5,300.25" },
"regularMarketChange": { "raw": 10.25, "fmt": "10.25" }
},
{
"region": "US",
"symbol": "ES=F",
"exchange": "CME",
"quoteType": "FUTURE",
"shortName": "E-Mini S&P 500",
"regularMarketPrice": { "raw": 5330.0, "fmt": "5,330.00" }
}
],
"error": null
}
}jsonOHLCV history
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v8/finance/chart/AAPL?range=1y&interval=1d&events=div,split"range accepts 1d…max plus any Nd/Nwk/Nmo/Ny token (50y works). interval: 1m,5m,15m,60m,1h,1d,1wk,1mo. Add events=div,split for dividends and splits. comparisons=MSFT,^GSPC overlays up to 10 more symbols on the base symbol's timestamp grid, adding a comparisons array beside indicators. An unknown base symbol returns HTTP 404 with a YH-style error envelope; unknown comparison symbols are simply omitted.
Example response
{
"chart": {
"result": [
{
"meta": {
"symbol": "AAPL",
"currency": "USD",
"exchangeName": "NMS",
"instrumentType": "EQUITY",
"dataGranularity": "1d",
"timezone": "EDT"
},
"timestamp": [1786175881, 1786262281],
"indicators": {
"quote": [
{ "open": [104.0, 103.0], "close": [105.0, 104.5],
"high": [106.0, 105.1], "low": [103.5, 102.8],
"volume": [41000000, 38000000] }
]
}
}
],
"error": null
}
}jsonSpark series
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v8/finance/spark?symbols=SPY,QQQ&range=1mo&interval=1d"Batch size follows your plan's per-request symbol cap, with a 50,000-row budget per call — an oversized request 400s rather than quietly truncating. The response is a plain object keyed by symbol with timestamp[] and close[].
Example response
{
"SPY": {
"symbol": "SPY",
"timestamp": [1785945600, 1786032000, 1786118400],
"close": [528.4, 531.1, 530.2],
"chartPreviousClose": 526.9,
"previousClose": 530.9,
"dataGranularity": "1d",
"start": 1785945600,
"end": 1786118400
},
"QQQ": {
"symbol": "QQQ",
"timestamp": [1785945600, 1786032000, 1786118400],
"close": [462.7, 464.9, 463.8],
"chartPreviousClose": 461.5,
"previousClose": 464.2,
"dataGranularity": "1d",
"start": 1785945600,
"end": 1786118400
}
}jsonFundamentals (quoteSummary)
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v11/finance/quoteSummary/AAPL?modules=assetProfile,price,financialData"Request modules by name: assetProfile, summaryDetail, price, financialData, defaultKeyStatistics, earnings, balanceSheetHistory and ~25 more. Values keep YH's {raw, fmt} wrapping.
Example response
{
"quoteSummary": {
"result": [
{
"assetProfile": {
"sector": "Technology",
"industry": "Consumer Electronics",
"fullTimeEmployees": 161000,
"longBusinessSummary": "Apple designs, manufactures and markets smartphones, personal computers and wearables."
},
"price": {
"currency": "USD",
"shortName": "Apple Inc.",
"regularMarketPrice": { "raw": 230.5, "fmt": "230.50" }
},
"financialData": {
"currentPrice": { "raw": 230.5, "fmt": "230.50" },
"recommendationKey": "buy"
}
}
],
"error": null
}
}jsonOptions chains
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v7/finance/options/AAPL"Defaults to the nearest expiration that has contracts; pass date=<unix seconds> for a specific expiration from expirationDates.
Example response
{
"optionChain": {
"result": [
{
"underlyingSymbol": "AAPL",
"expirationDates": [1787961600, 1790380800],
"strikes": [220, 230, 240],
"hasMiniOptions": false,
"quote": {
"symbol": "AAPL",
"regularMarketPrice": 230.5,
"marketState": "REGULAR"
},
"options": [
{
"expirationDate": 1787961600,
"hasMiniOptions": false,
"calls": [
{ "contractSymbol": "AAPL260828C00230000", "strike": 230.0,
"lastPrice": 4.1, "bid": 4.0, "ask": 4.2, "volume": 1200,
"openInterest": 8400, "impliedVolatility": 0.24,
"inTheMoney": true, "expiration": 1787961600,
"currency": "USD" }
],
"puts": [
{ "contractSymbol": "AAPL260828P00230000", "strike": 230.0,
"lastPrice": 3.6, "bid": 3.5, "ask": 3.7, "volume": 950,
"openInterest": 7200, "impliedVolatility": 0.26,
"inTheMoney": false, "expiration": 1787961600,
"currency": "USD" }
]
}
]
}
],
"error": null
}
}jsonScreeners
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/ws/screeners/v1/finance/screener/predefined/saved?scrIds=day_gainers&count=25"Predefined lists: day_gainers, day_losers, most_actives, undervalued_growth_stocks, growth_technology_stocks.
Example response
{
"finance": {
"result": [
{
"id": "day_gainers",
"title": "Day Gainers",
"canonicalName": "DAY_GAINERS",
"description": "Stocks ordered by percent change with respect to the previous close",
"criteriaMeta": { "size": 25, "sortField": "percentchange" },
"quotes": [
{
"symbol": "SMCI",
"shortName": "Super Micro Computer, Inc.",
"exchange": "NMS",
"quoteType": "EQUITY",
"regularMarketPrice": { "raw": 48.91, "fmt": "48.91" },
"regularMarketChangePercent": { "raw": 12.4, "fmt": "12.40%" }
}
],
"count": 25,
"total": 100,
"start": 0
}
],
"error": null
}
}jsonSearch
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v1/finance/search?q=apple"Symbol and company search with attached news items. quotesCount and newsCount cap each list (defaults 6 and 4, max 20 each).
Example response
{
"explains": [],
"count": 2,
"quotes": [
{
"symbol": "AAPL",
"shortname": "Apple Inc.",
"longname": "Apple Inc.",
"exchange": "NMS",
"exchDisp": "NasdaqGS",
"quoteType": "EQUITY",
"typeDisp": "Equity",
"sector": "Technology",
"industry": "Consumer Electronics",
"index": "quotes",
"score": 2.0,
"isYahooFinance": true
}
],
"news": [
{
"uuid": "9803606d-a324-3864-8d4b-284e7d19d15f",
"title": "Apple's latest quarter tops estimates",
"publisher": "Reuters",
"link": "https://www.reuters.com/technology/apple-latest-quarter-tops-estimates",
"providerPublishTime": 1786120200,
"type": "STORY",
"thumbnail": null
}
],
"nav": [],
"lists": [],
"researchReports": [],
"screenerFieldResults": [],
"totalTime": 24
}jsonAutocomplete
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v6/finance/autocomplete?query=apple"Typeahead over symbols and company names in YH's legacy ResultSet shape. Accepts query= or q=.
Example response
{
"ResultSet": {
"Query": "apple",
"Result": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"exch": "NMS",
"exchDisp": "NasdaqGS",
"type": "E",
"typeDisp": "Equity"
}
]
}
}jsonTrending
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v1/finance/trending/US?count=5"Trending tickers by region code in the path (US, GB, HK, …). count caps the list (default 20, max 50).
Example response
{
"finance": {
"result": [
{
"count": 3,
"quotes": [
{ "symbol": "NVDA" },
{ "symbol": "AAPL" },
{ "symbol": "TSLA" }
],
"jobTimestamp": 1786214520000,
"startInterval": 202608150000
}
],
"error": null
}
}jsonRecommendations
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/v6/finance/recommendationsbysymbol/AAPL"Symbols similar to the one you pass, with similarity scores — YH's recommendationsbysymbol shape.
Example response
{
"finance": {
"result": [
{
"symbol": "AAPL",
"recommendedSymbols": [
{ "symbol": "MSFT", "score": 0.28 },
{ "symbol": "GOOGL", "score": 0.25 },
{ "symbol": "AMZN", "score": 0.22 }
]
}
],
"error": null
}
}jsonInsights
curl -H "x-api-key: $KEY" \
"https://api.stockdataapi.com/ws/insights/v1/finance/insights?symbol=AAPL"Research signals for one symbol: technical outlook, support/resistance, analyst rating, company scores and significant developments. result is an object, not an array; {} means no data yet.
Example response
{
"finance": {
"result": {
"symbol": "AAPL",
"instrumentInfo": {
"technicalEvents": {
"provider": "Trading Central",
"shortTermOutlook": { "direction": "Bullish" }
},
"keyTechnicals": {
"provider": "Trading Central",
"support": 220.0,
"resistance": 240.0
}
},
"recommendation": {
"provider": "Argus Research",
"rating": "BUY",
"targetPrice": 250.0
},
"companySnapshot": {
"sector": "Technology",
"company": { "innovativeness": 0.98, "hiring": 0.72 }
},
"sigDevs": [
{ "date": "2026-08-01", "headline": "Apple announces buyback" }
]
},
"error": null
}
}jsonData freshness & history
Every request — quotes, charts, sparks, options, fundamentals, insights, recommendations, screeners, trending and market summary — checks the stored copy's age. A stale symbol is refetched from the source inline and the fresh data is served in that same response; there is no snapshot-then-poll. If the source can't answer in time, you get the stored copy instead — the call degrades, it never errors. Cache misses report what happened in X-Data-Freshness: live, partial (batch calls where some symbols were still fetching at the deadline) or warehouse.
| Data family | Refreshed when older than |
|---|---|
| Quotes | ~1 minute in market hours, 15 minutes closed |
| Intraday bars | ~2 minutes |
| Daily bars, session in progress | ~1 minute, from the live quote |
| Daily bars, completed sessions | ~1 hour |
| Options chains | ~2 minutes |
| Screeners | ~5 minutes |
| Market summary | ~5 minutes |
| Trending | ~15 minutes |
| Fundamentals & insights | ~1 hour |
| News attached to a search | ~1 hour |
The session in progress is the exception to that hourly cadence. A daily chart serves its last candle from the live quote, so it tracks the market rather than whenever the series was last refetched — open, high, low, close and volume all move with it. That candle is served, never stored: a live price is not a settled close, so the stored history stays the settled record and the candle is rebuilt on each response. Futures reach us delayed about ten minutes at the source; equities, indices and crypto do not.
History fills in the same way, on demand. The first call for a symbol pulls its full available history, and a call reaching further back than what is already stored widens it before answering. A narrower window widens the stored series too, behind the response rather than in it, so the depth is already there for whoever asks for more next.
Responses also cache briefly (seconds for quotes) and support ETag/If-None-Match — polling with the ETag answers 304 with headers only. Options chains additionally accept refresh=1, which skips every staleness check and asks the source at call time (budgeted per key — over the budget it quietly serves the normal path). Search works on a rule of its own: it asks the source when we hold fewer matches for your query than you asked for, at most once an hour per query. A ticker we have never seen answers on the first call instead of coming back empty, a query we only partly covered fills in the rest, and both stay answerable from then on — for every other endpoint too. Purely historical windows never refetch: settled data is final.
Try it
Paste a key and send a real request without leaving the page.
Rate limits
Adding or rotating a key does not reset or multiply your quota. Legacy keys issued without an account meter independently until migrated.
All keys issued to your account share one allowance, enforced per UTC minute and per UTC day (and per month on plans that set a monthly cap). Every authenticated response reports where you stand, and your dashboard shows the same counters live:
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | Your plan's daily request allowance |
| X-RateLimit-Remaining | Requests left today |
| X-RateLimit-Reset | Unix time the daily window resets (00:00 UTC) |
| X-RateLimit-Remaining-Minute | Requests left in the current minute |
| X-RateLimit-Remaining-Month | Requests left this month, on capped plans |
| X-Cache | HIT or MISS — whether the payload came from cache |
| Retry-After | On 429 only: seconds to wait |
Errors
Data endpoints keep YH's error semantics: an unknown symbol on /v8/finance/chart is a 404 with a chart.error envelope, while /v6/finance/quote returns 200 with the symbol simply missing from result. 429 means a rate limit — honor Retry-After. Freshness for every data family is reported by GET /status (send your x-api-key).