chart
suspend fun chart(symbol: String, interval: Interval = Interval.OneDay, period: Period = Period.OneYear, vararg events: ChartEventType): ChartData(source)
Retrieves historical OHLCV (Open, High, Low, Close, Volume) chart data.
This method provides historical price and volume data with configurable time intervals and periods. Optionally includes corporate events like dividends and stock splits.
Return
Chart data containing historical prices, volumes, and requested events
Parameters
symbol
The ticker symbol (e.g., "AAPL")
interval
Time interval for each data point (e.g., OneDay, OneHour, FiveMinutes)
period
Historical time range (e.g., OneYear, FiveYears, Max)
events
Optional corporate events to include (DIV for dividends, SPLIT for stock splits)
Throws
if the symbol is invalid or the request fails