v36

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2024-11-1856109168.6 KB

OHLC Data

Returns the Open High Low Close (OHLC) candle data for a given ticker.

get/api/stock/{ticker}/ohlc/{candle_size}

Path parameters

tickerstring required
candle_size'1m' | '5m' | '10m' | '15m' | '30m' | '1h' | '4h' required

Query parameters

datestring date
end_datestring date
limitinteger
timeframestring

The timeframe of the data to return. Allowed formats:

  • YTD
  • 1D, 2D, etc.
  • 1W, 2W, etc.
  • 1M, 2M, etc.
  • 1Y, 2Y, etc. Default: 1Y

Response

The candle data for the requested timeframe.

closestring

The closing price of the candle.

end_timestring date-time

The end time of the candle as a UTC timestamp.

highstring

The highest price of the candle.

lowstring

The lowest price of the candle.

market_time'r' | 'po' | 'pr'

The market time. PR = premarket, r = regular trading hours, po = postmarket. - pr - r - po

openstring

The opening price of the candle.

start_timestring date-time

The start time of the candle as a UTC timestamp.

total_volumeinteger

The total volume of the ticker for the full trading day till now.

volumeinteger

The volume of the candle.

Example response

[
  {
    "close": "56.79",
    "end_time": "2023-09-07T20:07:00Z",
    "high": "58.12",
    "low": "51.90",
    "market_time": "pr",
    "open": "54.29",
    "start_time": "2023-09-07T20:06:00Z",
    "total_volume": 13744676,
    "volume": 10699
  }
]