{
  "openapi": "3.1.0",
  "info": {
    "title": "StockData/API market data API",
    "version": "1.0.0",
    "summary": "Near real-time market data for stocks, ETFs, indices, crypto, currencies and futures, in YH Finance–compatible response shapes.",
    "description": "Every request is a GET with your key in an `x-api-key` header; every response is JSON in the YH envelope shape. Create a free key at https://stockdataapi.com/signup. Human-readable docs: https://stockdataapi.com/docs.",
    "contact": {
      "name": "StockData/API",
      "url": "https://stockdataapi.com/docs"
    }
  },
  "externalDocs": {
    "description": "Documentation",
    "url": "https://stockdataapi.com/docs"
  },
  "servers": [
    {
      "url": "https://api.stockdataapi.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Prices and history"
    },
    {
      "name": "Options and company data"
    },
    {
      "name": "Search and discovery"
    }
  ],
  "paths": {
    "/v6/finance/quote": {
      "get": {
        "operationId": "quote",
        "summary": "Quote API",
        "description": "Latest quote snapshots for up to 50 stocks, ETFs, indices, crypto pairs and currency crosses per call, in the YH quoteResponse shape, refreshed on request.\n\n- Quotes come back in request order, with duplicates collapsed.\n- A symbol that cannot be found is left out of `result`: unknown tickers, and malformed ones (anything outside letters, digits and `. ^ = & -`, or longer than 20 characters). The call still answers 200, with an empty list if nothing matched.\n- More symbols than your plan allows per request is a 400 naming the limit.\n- A stored quote older than 60 seconds during the regular session (15 minutes otherwise) is refetched from the source before the call answers. The shared response cache then serves it for up to 30 seconds.\n- URL-encode `^`, `=` and `&` inside the list (`%5EGSPC`, `ES%3DF`, `M%26M.NS`): an unencoded `&` ends the parameter.\n\nAlso accepted for compatibility with existing clients, and ignored: `region`, `lang`.",
        "tags": [
          "Prices and history"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/quote"
        },
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "description": "Comma-separated symbols, up to your plan's symbols-per-request (50 at most). Unknown and malformed symbols are left out of the result.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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,
                        "regularMarketVolume": 42000000
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v6/finance/quote/marketSummary": {
      "get": {
        "operationId": "marketSummary",
        "summary": "Market summary API",
        "description": "Headline index, futures and currency tiles for a market overview in one call, in the YH marketSummaryResponse shape.\n\n- Without `region`, or for a region with no tiles, the global set is served. The US tiles are the ones refreshed from the source by default.\n- Values keep YH's `{raw, fmt}` wrapping.\n\nAlso accepted for compatibility with existing clients, and ignored: `lang`.",
        "tags": [
          "Prices and history"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/market-summary"
        },
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Two-letter region, such as `US`. Omitted: every tile.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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,
                          "fmt": "5,330.00"
                        }
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v8/finance/chart/{symbol}": {
      "get": {
        "operationId": "chart",
        "summary": "Chart API: OHLCV history",
        "description": "Daily OHLCV history back to 1970 and intraday bars for stocks, indices, crypto, currencies and futures, in the YH chart shape, with dividends and splits.\n\n- Bars arrive as `meta`, `timestamp`, `indicators.quote`, and `indicators.adjclose` for daily and coarser bars.\n- Give `range` or `period1`/`period2` (the period wins). Neither means the whole history (`max`).\n- A window of more than 50,000 bars is refused with a 400 naming the limit, never truncated. So are comparison overlays totalling more than 50,000 rows.\n- Intraday lookback is bounded by the source: 1m bars for 7 days, 2m–90m for 59 days, hourly for 729 days. A window reaching further back is served from the oldest bar available and labelled with `X-Window-Clamped` and `meta.windowClamped`.\n- Bars follow the exchange's own calendar and timezone; futures sessions start at the 18:00 ET reopen. `meta.chartPreviousClose` is the close of the bar before the served window.\n- A daily chart serves the session in progress from the live quote, so its last candle tracks the market.\n- After a split or dividend is reported, the stored history is restated; until that completes the response carries `X-Data-Freshness: partial`.\n- An unknown base symbol is a 404 with a YH-style `chart.error` envelope; unknown comparison symbols are simply omitted.\n\nAlso accepted for compatibility with existing clients, and ignored: `region`, `lang`.",
        "tags": [
          "Prices and history"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/chart"
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Symbol such as `AAPL`, `BRK-B`, `^GSPC`, `ES=F`, `BTC-USD` or `M&M.NS`. Letters, digits and `. ^ = & -`, at most 20 characters, case-insensitive. Percent-encode `^`, `=` and `&` in a URL (`%5EGSPC`, `ES%3DF`, `M%26M.NS`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "description": "Bar size: `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo` or `3mo`. `60m` and `1h` are the same bars.",
            "schema": {
              "type": "string",
              "default": "1d"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "description": "`1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`, or any N followed by `d`, `wk`, `mo` or `y`. `Nd` counts trading sessions; `mo`, `y` and `ytd` are calendar arithmetic in the exchange's timezone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period1",
            "in": "query",
            "required": false,
            "description": "Window start in epoch seconds. Takes precedence over `range`.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "period2",
            "in": "query",
            "required": false,
            "description": "Window end in epoch seconds; defaults to now. Must not precede `period1`.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "events",
            "in": "query",
            "required": false,
            "description": "`div` and/or `split`, comma- or pipe-separated, to add dividends and splits.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comparisons",
            "in": "query",
            "required": false,
            "description": "Comma list of up to 10 symbols to overlay on the base symbol's timestamp grid.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "backAdjust",
            "in": "query",
            "required": false,
            "description": "`true` back-adjusts a continuous futures symbol (`ES=F`, `NQ=F`, `YM=F`, `RTY=F`) across contract rolls, the way TradingView's B-ADJ does. Daily and intraday intervals only; `meta.backAdjust` lists the rolls applied.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includePrePost",
            "in": "query",
            "required": false,
            "description": "Accepted for compatibility. Bars are regular-session only, and `meta.includePrePost` says so.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "chart": {
                    "result": [
                      {
                        "meta": {
                          "symbol": "AAPL",
                          "currency": "USD",
                          "exchangeName": "NMS",
                          "instrumentType": "EQUITY",
                          "dataGranularity": "1d",
                          "timezone": "EDT"
                        },
                        "timestamp": [
                          1786175881,
                          1786262281
                        ],
                        "indicators": {
                          "quote": [
                            {
                              "open": [
                                104,
                                103
                              ],
                              "close": [
                                105,
                                104.5
                              ],
                              "high": [
                                106,
                                105.1
                              ],
                              "low": [
                                103.5,
                                102.8
                              ],
                              "volume": [
                                41000000,
                                38000000
                              ]
                            }
                          ]
                        }
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v8/finance/spark": {
      "get": {
        "operationId": "spark",
        "summary": "Spark API: close-price series",
        "description": "Close-only price series for up to 50 symbols in one call, the compact shape for sparklines, watchlists and tiles.\n\n- The response is a plain object keyed by symbol, each with `timestamp[]` and `close[]`, with no envelope. Symbols with no data are omitted rather than nulled.\n- Unlike the quote endpoint, a malformed symbol refuses the whole request with a 400 naming it.\n- Intervals, ranges, sessions and `chartPreviousClose` follow the chart endpoint; there is no `period1`/`period2` here.\n- 50,000 bars in total across the request; more is a 400 naming the levers (a shorter range, a coarser interval, fewer symbols), never a shortened series.",
        "tags": [
          "Prices and history"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/spark"
        },
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "description": "Comma-separated symbols, up to your plan's symbols-per-request (50 at most).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "description": "Bar size: `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo` or `3mo`. `60m` and `1h` are the same bars.",
            "schema": {
              "type": "string",
              "default": "1d"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "description": "`1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`, or any N followed by `d`, `wk`, `mo` or `y`. `Nd` counts trading sessions; `mo`, `y` and `ytd` are calendar arithmetic in the exchange's timezone.",
            "schema": {
              "type": "string",
              "default": "1mo"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v11/finance/quoteSummary/{symbol}": {
      "get": {
        "operationId": "fundamentals",
        "summary": "Fundamentals API (quoteSummary)",
        "description": "Company profile, financial statements, key statistics, earnings, analyst trends and holders for one symbol, from 35 YH quoteSummary modules chosen per request.\n\n- A module the source has no data for is simply absent from the result.\n- A stored payload older than an hour, or missing a module you asked for, is refetched (only the requested modules) and merged into what is stored.\n- An unknown symbol is a 404 with a YH-style `quoteSummary.error` envelope.\n- Values keep YH's `{raw, fmt}` wrapping.\n\nAlso accepted for compatibility with existing clients, and ignored: `region`, `lang`.\n\nModules: `assetProfile`, `balanceSheetHistory`, `balanceSheetHistoryQuarterly`, `calendarEvents`, `cashflowStatementHistory`, `cashflowStatementHistoryQuarterly`, `defaultKeyStatistics`, `earnings`, `earningsHistory`, `earningsTrend`, `esgScores`, `financialData`, `fundOwnership`, `fundPerformance`, `fundProfile`, `incomeStatementHistory`, `incomeStatementHistoryQuarterly`, `indexTrend`, `industryTrend`, `insiderHolders`, `insiderTransactions`, `institutionOwnership`, `majorDirectHolders`, `majorHoldersBreakdown`, `netSharePurchaseActivity`, `pageViews`, `price`, `quoteType`, `recommendationTrend`, `secFilings`, `sectorTrend`, `summaryDetail`, `summaryProfile`, `topHoldings`, `upgradeDowngradeHistory`.",
        "tags": [
          "Options and company data"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/fundamentals"
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Symbol such as `AAPL`, `BRK-B`, `^GSPC`, `ES=F`, `BTC-USD` or `M&M.NS`. Letters, digits and `. ^ = & -`, at most 20 characters, case-insensitive. Percent-encode `^`, `=` and `&` in a URL (`%5EGSPC`, `ES%3DF`, `M%26M.NS`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modules",
            "in": "query",
            "required": false,
            "description": "Comma-separated module names from the list below, at most 1,000 characters. Unknown names are ignored; naming none that is known is a 400.",
            "schema": {
              "type": "string",
              "default": "assetProfile,summaryDetail,price,defaultKeyStatistics,financialData"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v7/finance/options/{symbol}": {
      "get": {
        "operationId": "options",
        "summary": "Options chain API",
        "description": "A full option chain per expiration: calls and puts with strike, bid, ask, volume, open interest and implied volatility, plus every expiration date.\n\n- Without `date` you get the nearest expiration that still trades. On an expiration day that is the day's own (0DTE) chain, served through the end of that day.\n- `expirationDates` holds only expirations that still trade, and the one served is always in it. A settled chain stays servable with its `date`.\n- A chain older than 2 minutes is refetched from the source by default.\n- A symbol with no listed options answers 200 with an empty `result`.",
        "tags": [
          "Options and company data"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/options"
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Symbol such as `AAPL`, `BRK-B`, `^GSPC`, `ES=F`, `BTC-USD` or `M&M.NS`. Letters, digits and `. ^ = & -`, at most 20 characters, case-insensitive. Percent-encode `^`, `=` and `&` in a URL (`%5EGSPC`, `ES%3DF`, `M%26M.NS`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Expiration to serve, as epoch seconds at 00:00 UTC of the expiration day (a value from `expirationDates`). Omitted: the nearest expiration that still trades.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "description": "`true` asks the source at call time, skipping the cache and the staleness window, and writes the result back for other callers (`X-Cache: BYPASS`). Forced fetches spend a small per-minute budget of your own; past it, the call quietly serves the normal path.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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,
                                "lastPrice": 4.1,
                                "bid": 4,
                                "ask": 4.2,
                                "volume": 1200,
                                "openInterest": 8400,
                                "impliedVolatility": 0.24,
                                "inTheMoney": true,
                                "expiration": 1787961600,
                                "currency": "USD"
                              }
                            ],
                            "puts": [
                              {
                                "contractSymbol": "AAPL260828P00230000",
                                "strike": 230,
                                "lastPrice": 3.6,
                                "bid": 3.5,
                                "ask": 3.7,
                                "volume": 950,
                                "openInterest": 7200,
                                "impliedVolatility": 0.26,
                                "inTheMoney": false,
                                "expiration": 1787961600,
                                "currency": "USD"
                              }
                            ]
                          }
                        ]
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/ws/screeners/v1/finance/screener/predefined/saved": {
      "get": {
        "operationId": "screeners",
        "summary": "Screener API",
        "description": "Predefined YH screeners such as day gainers, day losers and most actives, ranked and paginated, up to 250 members per call.\n\n- An id the source does not know answers 200 with an empty `result`, and is not asked about again for an hour.\n- Also served at `/v1/finance/screener/predefined/saved`.",
        "tags": [
          "Search and discovery"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/screeners"
        },
        "parameters": [
          {
            "name": "scrIds",
            "in": "query",
            "required": true,
            "description": "Predefined screener id: `day_gainers`, `day_losers`, `most_actives`, `undervalued_growth_stocks`, `growth_technology_stocks` and others. Only the first of a comma list is used.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Members to return, 1–250.",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Offset into the ranked members, 0–10,000.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/ws/insights/v1/finance/insights": {
      "get": {
        "operationId": "insights",
        "summary": "Insights API",
        "description": "Research signals for one symbol: technical outlook, support and resistance, analyst rating, company scores and significant developments.\n\n- `result` is an object, not an array; `{}` means the source has nothing for this symbol yet.\n- Also served at `/ws/insights/v2/finance/insights`.",
        "tags": [
          "Options and company data"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/insights"
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "description": "Symbol such as `AAPL`, `BRK-B`, `^GSPC`, `ES=F`, `BTC-USD` or `M&M.NS`. Letters, digits and `. ^ = & -`, at most 20 characters, case-insensitive. Percent-encode `^`, `=` and `&` in a URL (`%5EGSPC`, `ES%3DF`, `M%26M.NS`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "finance": {
                    "result": {
                      "symbol": "AAPL",
                      "instrumentInfo": {
                        "technicalEvents": {
                          "provider": "Trading Central",
                          "shortTermOutlook": {
                            "direction": "Bullish"
                          }
                        },
                        "keyTechnicals": {
                          "provider": "Trading Central",
                          "support": 220,
                          "resistance": 240
                        }
                      },
                      "recommendation": {
                        "provider": "Argus Research",
                        "rating": "BUY",
                        "targetPrice": 250
                      },
                      "companySnapshot": {
                        "sector": "Technology",
                        "company": {
                          "innovativeness": 0.98,
                          "hiring": 0.72
                        }
                      },
                      "sigDevs": [
                        {
                          "date": "2026-08-01",
                          "headline": "Apple announces buyback"
                        }
                      ]
                    },
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v6/finance/recommendationsbysymbol/{symbol}": {
      "get": {
        "operationId": "recommendations",
        "summary": "Recommendations API",
        "description": "Symbols similar to the one you pass, with similarity scores, in YH's recommendationsbysymbol shape.\n\n- `result` is empty when the source has no recommendations for the symbol.",
        "tags": [
          "Options and company data"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/recommendations"
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Symbol such as `AAPL`, `BRK-B`, `^GSPC`, `ES=F`, `BTC-USD` or `M&M.NS`. Letters, digits and `. ^ = & -`, at most 20 characters, case-insensitive. Percent-encode `^`, `=` and `&` in a URL (`%5EGSPC`, `ES%3DF`, `M%26M.NS`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "finance": {
                    "result": [
                      {
                        "symbol": "AAPL",
                        "recommendedSymbols": [
                          {
                            "symbol": "MSFT",
                            "score": 0.28
                          },
                          {
                            "symbol": "GOOGL",
                            "score": 0.25
                          },
                          {
                            "symbol": "AMZN",
                            "score": 0.22
                          }
                        ]
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/finance/search": {
      "get": {
        "operationId": "search",
        "summary": "Search API",
        "description": "Search symbols and company names across stocks, ETFs, indices, crypto and currencies, with matching news stories attached.\n\n- A query is fetched from the source when storage holds fewer matches than you asked for, or its news has aged out, and then not again for an hour.\n- A ticker that has never been requested before answers on the first call instead of coming back empty.",
        "tags": [
          "Search and discovery"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/search"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search text, 1–30 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quotesCount",
            "in": "query",
            "required": false,
            "description": "Symbol matches to return, 0–20.",
            "schema": {
              "type": "integer",
              "default": 6
            }
          },
          {
            "name": "newsCount",
            "in": "query",
            "required": false,
            "description": "News stories to return, 0–20.",
            "schema": {
              "type": "integer",
              "default": 4
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "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,
                      "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
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v6/finance/autocomplete": {
      "get": {
        "operationId": "autocomplete",
        "summary": "Autocomplete API",
        "description": "Symbol suggestions as someone types, in YH's legacy ResultSet shape, built for search boxes.\n\n- Send the text as `query` or as `q`; a request with neither is a 400.\n\nAlso accepted for compatibility with existing clients, and ignored: `lang`, `region`.",
        "tags": [
          "Search and discovery"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/autocomplete"
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Text typed so far, 1–30 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Alternative spelling of `query`; `query` wins when both are sent.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "ResultSet": {
                    "Query": "apple",
                    "Result": [
                      {
                        "symbol": "AAPL",
                        "name": "Apple Inc.",
                        "exch": "NMS",
                        "exchDisp": "NasdaqGS",
                        "type": "E",
                        "typeDisp": "Equity"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/finance/trending/{region}": {
      "get": {
        "operationId": "trending",
        "summary": "Trending API",
        "description": "The tickers trending in a region right now, such as US, GB or DE, refreshed every 15 minutes.\n\n- Refreshed from the source every 15 minutes per region, by default.",
        "tags": [
          "Search and discovery"
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://stockdataapi.com/docs/trending"
        },
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "description": "Two-letter region code, case-insensitive: `US`, `GB`, `DE` and others.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Symbols to return, 1–50.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The YH-shaped payload, as in the example.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Minute"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-Cache": {
                "$ref": "#/components/headers/X-Cache"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "finance": {
                    "result": [
                      {
                        "count": 3,
                        "quotes": [
                          {
                            "symbol": "NVDA"
                          },
                          {
                            "symbol": "AAPL"
                          },
                          {
                            "symbol": "TSLA"
                          }
                        ],
                        "jobTimestamp": 1786214520000,
                        "startInterval": 202608150000
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your key from the dashboard (https://stockdataapi.com/dashboard), such as `sk_live_…`. Every key on an account spends one shared allowance."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Your plan's daily request allowance",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left today",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Unix time the daily window resets (00:00 UTC)",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining-Minute": {
        "description": "Requests left in the current minute",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining-Month": {
        "description": "Requests left this month, on capped plans",
        "schema": {
          "type": "integer"
        }
      },
      "X-Cache": {
        "description": "HIT or MISS — whether the payload came from cache",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "On 429 only: seconds to wait",
        "schema": {
          "type": "integer"
        }
      },
      "X-Data-Freshness": {
        "description": "On cache misses: `live` (refetched from the source for this response), `partial` (a batch where some symbols were still fetching at the deadline) or `warehouse` (the stored copy).",
        "schema": {
          "type": "string",
          "enum": [
            "live",
            "partial",
            "warehouse"
          ]
        }
      }
    },
    "schemas": {
      "Message": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A parameter is malformed or out of range, or the request names more symbols than the plan allows. `/v8/finance/chart` and `/v11/finance/quoteSummary` answer in their own YH error envelope; every other endpoint answers `{\"message\": …}`."
      },
      "Unauthorized": {
        "description": "The key is missing or wrong.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Message"
            },
            "example": {
              "message": "Invalid API key"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key is suspended or revoked.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "A per-minute, daily or monthly limit is reached. Wait the number of seconds in Retry-After.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      }
    }
  }
}