Skip to main content

Endpoint

GET
string
https://api.llmquant.com/prices/equity/historical

Parameters

Required

ticker
string
required
The stock ticker symbol (e.g. AAPL, TSLA).
period
string
required
Bar interval. One of: day, week, month.

Optional

limit
integer
default:100
Maximum number of bars to return.
date
date
Filter by exact date (YYYY-MM-DD).
date_gte
date
Filter by date greater than or equal to (YYYY-MM-DD).
date_lte
date
Filter by date less than or equal to (YYYY-MM-DD).
adjusted
boolean
default:true
Whether to return split and dividend adjusted prices.

Response

prices
array
Array of EquityPriceBar objects, sorted by date descending.

Code Examples

import requests

headers = {"X-API-KEY": "your_api_key_here"}

ticker = "AAPL"
period = "day"
limit = 30

url = (
    f"https://api.llmquant.com/prices/equity/historical"
    f"?ticker={ticker}"
    f"&period={period}"
    f"&limit={limit}"
)

response = requests.get(url, headers=headers)
prices = response.json().get("prices")