bayesline.api.equity.AsyncReportApi#
- class bayesline.api.equity.AsyncReportApi#
Abstract base class for report APIs.
This class defines the interface for portfolio report APIs that provide access to report data and metadata.
- __init__()#
Methods
__init__()dates()Get the available dates for this report.
get_report(order, *[, date, date_start, ...])Get a report accessor for the specified parameters.
get_report_as_task(order, *[, date, ...])Get a report accessor for the specified parameters as a task.
Attributes
Get the settings used to create this report.
- abstract property settings: ReportSettings#
Get the settings used to create this report.
Returns#
- ReportSettings
The settings used to create this report.
- abstract async dates() list[date]#
Get the available dates for this report.
Returns#
- list[dt.date]
A list of available dates for this report.
- abstract async get_report(order: dict[str, list[str]], *, date: str | date | datetime | None = None, date_start: str | date | datetime | None = None, date_end: str | date | datetime | None = None, subtotals: list[str] | None = None) AsyncReportAccessorApi#
Get a report accessor for the specified parameters.
Parameters#
- orderdict[str, list[str]]
The ordering configuration for the report.
- dateDateLike | None, default=None
The specific date for the report.
- date_startDateLike | None, default=None
The start date for the report.
- date_endDateLike | None, default=None
The end date for the report.
- subtotalslist[str] | None, default=None
The subtotals to include in the report.
Returns#
- AsyncReportAccessorApi
A report accessor API for the specified parameters.
- abstract async get_report_as_task(order: dict[str, list[str]], *, date: str | date | datetime | None = None, date_start: str | date | datetime | None = None, date_end: str | date | datetime | None = None, subtotals: list[str] | None = None) AsyncTask[AsyncReportAccessorApi]#
Get a report accessor for the specified parameters as a task.
Parameters#
- orderdict[str, list[str]]
The ordering configuration for the report.
- dateDateLike | None, default=None
The specific date for the report.
- date_startDateLike | None, default=None
The start date for the report.
- date_endDateLike | None, default=None
The end date for the report.
- subtotalslist[str] | None, default=None
The subtotals to include in the report.
Returns#
- AsyncTask[ReportAccessorApi]
A task that returns a report accessor API for the specified parameters.