Skip to content

client.vx.list_stock_financials() appears to be ignoring date range operators #382

@bfoz

Description

@bfoz

Describe the bug

Fetching financial reports for a "period of report date" range returns more than the reports for the given range (a lot more).

To Reproduce

reports = client.vx.list_stock_financials(ticker="AAPL", timeframe='annual', period_of_report_date_gte: datetime.date(2023, 1, 1), period_of_report_date_lt: datetime.date(2024, 1, 1))
for report in reports:
    print(f"{report.fiscal_year=}, {report.fiscal_period=}")

I've also tried passing the dates as strings instead of date() objects, but that didn't change the result.

Expected behavior

The API should only return reports for the given date range. Instead, it returns...

report.fiscal_year='2022', report.fiscal_period='FY'
report.fiscal_year='2021', report.fiscal_period='FY'
report.fiscal_year='2020', report.fiscal_period='FY'
report.fiscal_year='2019', report.fiscal_period='FY'
report.fiscal_year='2018', report.fiscal_period='FY'
report.fiscal_year='2017', report.fiscal_period='FY'
report.fiscal_year='2016', report.fiscal_period='FY'
report.fiscal_year='2015', report.fiscal_period='FY'
report.fiscal_year='2014', report.fiscal_period='FY'
report.fiscal_year='2013', report.fiscal_period='FY'
report.fiscal_year='2012', report.fiscal_period='FY'
report.fiscal_year='2011', report.fiscal_period='FY'
report.fiscal_year='2010', report.fiscal_period='FY'
report.fiscal_year='', report.fiscal_period=''

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions