The historic_agg_v2 function appears to be returning an extra under some circumstances.
api.polygon.historic_agg_v2(“SPY”, 1, “day”, _from=“2020-08-17”, to=“2020-08-19”)
returns
open high low close volume vwap
timestamp
2020-08-17 00:00:00-04:00 337.94 338.34 337.48 337.91 35092877.0 337.8453
2020-08-18 00:00:00-04:00 338.34 339.10 336.61 338.64 38627631.0 338.3195
2020-08-19 00:00:00-04:00 339.05 339.61 336.62 337.23 68215296.0 338.2099
2020-08-20 00:00:00-04:00 335.36 338.80 335.22 338.28 42408654.0 337.4729
and
api.polygon.historic_agg_v2(“SPY”, 1, “day”, _from=“2020-11-12”, to=“2020-11-12”)
returns
open high low close volume vwap
timestamp
2020-11-12 00:00:00-05:00 355.58 356.7182 351.26 353.21 66838046.0 353.6225
2020-11-13 00:00:00-05:00 355.27 358.2000 354.71 358.10 44288743.0 356.4866
From what I could tell I think this may have something to do with the fix_daily_bar_date(date, timespan) function.
Any help would be appreciated. Thank you,
David