Dashboard

Historical Prices

GET/api/price/history

Free Starter Stock ETF Pro

Historical OHLCV bars for one symbol at one resolution, returned as compact [ts_ms, adjClose] tuples for efficient charting. The latest bar's full OHLCV detail is also included.

Resolutions: 1d (default), 1wk, 1mo.

History depth per plan: Free = last 2 years, Starter = last 5 years, Stock / ETF / Pro = 20 years.

Get API key Try it live in the API explorer

Query parameters

Example request

curl 'https://api.stockfit.io/v1/api/price/history?symbol=AAPL&cik=320193&cusip=037833100&composite_figi=BBG000B9XRY4&share_class_figi=BBG001S5N8V8&resolution=1d&from=2024-01-01&to=2024-12-31' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

Responses

200 OK

Historical bars + latest quote detail.

Response schema

  • ticker string
  • resolution string
  • data array of array of number

    Array of `[ts_ms, adjClose]` tuples sorted ascending by ts. Direct-pluggable into Highcharts/Recharts/TradingView lightweight charts.

  • latestQuote object | null

    Full OHLCV for the most recent bar. Null if no data is available.

    • ts string (date-time)
    • open number | null
    • high number | null
    • low number | null
    • close number
    • adjClose number | null
    • volume number

Example response

{
  "ticker": "AAPL",
  "resolution": "1d",
  "data": [
    [
      1704153600000,
      185.64
    ],
    [
      1704240000000,
      184.25
    ]
  ],
  "latestQuote": {
    "ts": "2025-01-31T00:00:00.000Z",
    "open": 0,
    "high": 0,
    "low": 0,
    "close": 0,
    "adjClose": 0,
    "volume": 0
  }
}

400 Bad Request

Invalid parameters or unknown symbol.

Response schema

  • error string

    Human-readable error message

Example response

{}

403 Forbidden

Feature not available on current plan.

Response schema

  • error string

    Human-readable error message

Example response

{}