Historical Data API

Endpoint: /api/stocks/historical
Method: GET
Description: Fetches historical price and volume data for a stock.
Parameters:

  • ticker (string, required): Stock ticker symbol.
  • start_date (string, required): Start date for historical data (YYYY-MM-DD).
  • end_date (string, optional): End date for historical data (YYYY-MM-DD).

Response:

jsonCopyEdit{
  "status": "success",
  "data": [
    {
      "date": "2025-01-24",
      "open": 148.0,
      "close": 150.0,
      "high": 151.0,
      "low": 147.5,
      "volume": 1250000
    },
    ...
  ]
}