market

Get Ohlc

Retrieve OHLC candlestick data for a given symbol.

Returns a time-series list of Open, High, Low, Close, and Volume data points for the requested symbol, period, and interval.

curl example:

curl -X GET "http://localhost:8000/api/ohlc/AAPL?period=1y&interval=1d"

Python requests example:

import requests
resp = requests.get(
    "http://localhost:8000/api/ohlc/AAPL",
    params={"period": "1y", "interval": "1d"},
)
candles = resp.json()
get/api/ohlc/{symbol}

Request

  • Base URL: https://api.halalterminal.com
  • URL: https://api.halalterminal.com/api/ohlc/{symbol}
  • Auth: API key in header X-API-Key

Path parameters

symbolstring required

Ticker symbol, e.g. AAPL.

Query parameters

periodstring

Lookback period, e.g. 1d, 5d, 1mo, 1y, 5y, max.

intervalstring

Candle interval, e.g. 1m, 5m, 1d, 1wk.

Response

List of OHLC candlestick data points

Datestring required

Trading date in ISO-8601 format

Opennumber required

Opening price

Highnumber required

Highest price during the period

Lownumber required

Lowest price during the period

Closenumber required

Closing price

Volumeinteger required

Number of shares traded

Example response

[
  {
    "Close": 187.44,
    "Date": "2025-03-21",
    "High": 188.5,
    "Low": 185.73,
    "Open": 186.12,
    "Volume": 54638921
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.