Repository navigation
feat(taxes): read fidelity tax info ytd summary into the dataset and the sheet - #440
Merged
Merged
Conversation
…the sheet The userscript reads the Tax Info YTD summary (the read Fidelity's own page makes) of the taxable accounts on the page, every hour and after a Positions read, never within 5 minutes; the year before too until April 15. New data set taxes and tab fidelity_tax_summary; the dataset carries taxSummary and taxSummaryAt. Userscript 0.1.89.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
src/shared/tax-summary.ts: the Tax Info YTD summary read (POST /ftgw/digital/api-ytd-tax-info/api/tax-info-summary/v1, body{ returnGainLoss, acctDetails, taxYear }), its parser (box rows of recordType A with a number, zeros kept, texts like Various and N/A and the total rows left out, short and long term gains, throws when the accounts list is gone), the years to read (the year before too from January 1 to April 15), the merge per year, the due rule (every hour and after a Positions read, never within 5 minutes) and the sheet rowshistory-sync.tsALLOWED, no extra headers)main.tssyncTaxSummary: the taxable accounts on the page (Roth and other retirement accounts get no 1099), one request a year for all of them, stored in the dataset (taxSummary,taxSummaryAt), its own read time per account (here.tskindtaxSummary), a notice the first time and when the sheet got new numbers (taxSummaryRead, EN and RU)taxes, tabfidelity_tax_summary(account_number,tax_year,form_type,box_number,amount,as_of; gains as formgain-loss, boxshort-termorlong-term); the viewer reads it back into the dataset likefidelity_performanceWhy
Owner 2026-12-03 asked for a Fidelity Tax Summary and allowed the read ("no read as you reading, its not so hard": along with the other reads). This PR brings the data; the viewer page comes next
Checks
bun test(561 pass, 0 fail)bun run userscript(0.1.89)parcel build --no-cache --no-source-maps --dist-dir ./.check/out+DIST=.check/out bun src/build/postbuild.ts, thenrm -rf .check.claude/tools/etfs/tc/check.shon every changed or new .ts file: prints nothinggit diff --check