Jump to a section
Documentation

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

GET/v6/finance/quote
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
  }
}
json

Market summary

GET/v6/finance/quote/marketSummary
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
  }
}
json

OHLCV history

GET/v8/finance/chart/AAPL
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
  }
}
json

Spark series

GET/v8/finance/spark
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
  }
}
json

Fundamentals (quoteSummary)

GET/v11/finance/quoteSummary/AAPL
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
  }
}
json

Options chains

GET/v7/finance/options/AAPL
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
  }
}
json

Screeners

GET/ws/screeners/v1/finance/screener/predefined/saved
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
  }
}
json

Autocomplete

GET/v6/finance/autocomplete
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"
      }
    ]
  }
}
json

Recommendations

GET/v6/finance/recommendationsbysymbol/AAPL
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
  }
}
json

Insights

GET/ws/insights/v1/finance/insights
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
  }
}
json

Data 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 familyRefreshed 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.

Try it
Runs from your browser straight against the API. Your key is not sent to this site and is not stored anywhere.
GET https://api.stockdataapi.com/v6/finance/quote?symbols=AAPL,MSFT

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:

HeaderMeaning
X-RateLimit-LimitYour plan's daily request allowance
X-RateLimit-RemainingRequests left today
X-RateLimit-ResetUnix time the daily window resets (00:00 UTC)
X-RateLimit-Remaining-MinuteRequests left in the current minute
X-RateLimit-Remaining-MonthRequests left this month, on capped plans
X-CacheHIT or MISS — whether the payload came from cache
Retry-AfterOn 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).