get_stock_chart
Retrieve historical stock price chart data (OHLC) for technical analysis and visualization. Specify instrument ID and time period to get open, high, low, close values and volume.
Instructions
Get historical price chart data (OHLC) for a stock.
Retrieves time series price data with Open, High, Low, Close values and volume. Perfect for charting and technical analysis.
Args: ctx: MCP context for logging instrument_id: Avanza instrument ID time_period: Time period for chart data. Options: - "today": Intraday data for today - "one_week": Past week - "one_month": Past month - "three_months": Past 3 months - "this_year": Year to date - "one_year": Past year (default) - "three_years": Past 3 years - "five_years": Past 5 years
Returns: Chart data with OHLC values: - ohlc: Array of data points with timestamp, open, high, low, close, volume - metadata: Chart metadata - from/to: Time range - previousClosingPrice: Previous closing price
Examples: Get 1 year daily data: >>> get_stock_chart(instrument_id="5269", time_period="one_year")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instrument_id | Yes | ||
| time_period | No | one_year |