Chartdata

class avanza.chartdata.ChartData

Bases: object

Grab json chartdata and output as pandas DataFrame

static get_distribution_chartdata()

Returns values from account distribution pie chart

Returns:pandas.core.frame.DataFrame – Fallback to dict if pandas is not imported

Note

Authentication necessary

Will “unpack” original drilldown

static get_overview_chartdata(time_period='one_month')

Returns chartdata from overview page

Parameters:time_period (str) – time period
Returns:pandas.core.frame.DataFrame – Fallback to dict if pandas is not imported

Note

Authentication necessary

static get_ticker_chartdata(orderbook_id, **kwargs)

Returns chartdata from overview page

Parameters:
  • orderbook_id (int) – Id of ticker
  • time_period (str) – time period
  • chart_type (str) –

    The kind of chartdata to retrieve

    • area: Data for typical line chart (default)
    • candlestick: Data for candlestick/ohlc chart
    • ohlc: Produces same result as candlestick
  • chart_resolution (str) – resolution of chart
Returns:

pandas.core.frame.DataFrame – Fallback to dict if pandas is not imported

Note

Authentication necessary