Repository navigation
Conversation
Yahoo zeroes the volume of the first intraday bar of period1's trading day, even when period1 precedes the session's open. After its first poll, the poller restarts two days before the newest bar, which can land on an open; the zeroed bar then reached Tea as a revision of a committed bar, and the visible-range volume profile failed with "Out-of-order input or committed revision in input 'bars' at root". Intraday reads now start a day earlier, so that bar falls before the window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| // Yahoo zeroes the volume of the first intraday bar of period1's trading | ||
| // day, even when period1 precedes that bar, such as before a session's | ||
| // open. Starting a day earlier leaves that bar before the window. | ||
| const lead = interval < Day ? Day : 0; |
There was a problem hiding this comment.
🔴 Monday opening bars retain zero volume
When a window starts at Monday's open, lead puts the request on Sunday without an earlier trading bar. Yahoo can still zero Monday's opening volume, causing the poll correction to fail in Tea.
Learn more
Yahoo can zero the first intraday bar of the trading day represented by period1. A fixed 24-hour lead crosses one calendar day, not necessarily one trading session. When a Monday poll begins at the open, sourceStart lands on Sunday. Without weekend trading bars, the first returned session can still be Monday, so its opening volume can be zero. The poller forwards that correction through the Feed adapter, triggering the ordering failure this change targets. The new test models Saturday and Sunday bars, unlike an equity exchange.
Example: An AAPL 60m window starts Monday at 14:30 UTC. Its period1 becomes Sunday at 14:30 UTC; there are no Sunday AAPL bars. The Monday 14:30 bar remains the first session bar returned with zero volume, instead of retaining its actual volume.
Recommended fix: Choose a lead that guarantees an earlier trading session for the listing, including weekends and exchange holidays, or explicitly detect and retry a first-session bar with suspect zero volume using an earlier valid source window. Add a fixture with no weekend bars and a Monday opening bar.
Was this helpful? React with 👍 or 👎 to provide feedback.
Problem
The volume profile on Yahoo charts failed with:
Yahoo zeroes the volume of the first intraday bar of
period1's trading day, even whenperiod1is before the session's open. After its first poll, the poller restarts two days before the newest bar. That can land exactly on an open, such as Monday 14:30 UTC for AAPL. The bar then comes back with volume 0, the Feed forwards it as a correction to a bar two days old, and Tea rejects it.Reproduced live against Yahoo for AAPL 30m and 60m.
Fix
Intraday reads now start one day before the window instead of one interval. The zeroed bar then falls before the window and is filtered out. The 1m request still fits Yahoo's 7-day limit. Daily and coarser reads are unchanged.
Verification
server/data/providers/yfinance,server/feedandserver/tea: 335 tests pass.just checkdoes not pass locally, for reasons outside this change: Prettier flags an untracked file underdocs/superpowers/, and many app UI test files fail.🤖 Generated with Claude Code