Extraction schema:
{"$schema": "https://json-schema.org/draft/2020-12/schema", "title": "BrokerageConsolidated1099", "description": "Schema for a US brokerage consolidated 1099 / composite tax statement. Bundles 1099-DIV / 1099-INT / 1099-B / 1099-OID / 1099-MISC for one account-year. The long-doc list is the 1099-B per-lot Proceeds From Broker and Barter Exchange transactions section. Doc-type taxonomy: (1) filled per-recipient composite statement = extract everything; (2) pure-explainer guide PDF with no recipient header = all fields null/[]; (3) guide PDF with an embedded sample composite inside = extract from the embedded sample as if it were a real composite.", "type": "object", "$defs": {"BrokerageLot": {"type": "object", "description": "One per-lot row from the official 1099-B 'Proceeds From Broker and Barter Exchange Transactions' section. Do NOT include rows from a 'Year-End Summary' / 'Realized Gain or (Loss)' supplemental section even when the same security appears there — those are issuer-supplemental rollups and the PDF itself usually says 'this information is not provided to the IRS'. Do NOT emit Security Subtotal / Sale Date Total / Total Short-Term / Total Long-Term / category-total rows as lots.", "properties": {"section_category": {"type": ["string", "null"], "description": "Which 1099-B section this row appears under. One of: 'short_term_covered' (Box A, basis reported to IRS), 'short_term_noncovered' (Box B), 'short_term_noncovered_no_basis' (Box B, basis missing), 'long_term_covered' (Box D, basis reported), 'long_term_noncovered' (Box E, basis NOT reported), 'long_term_noncovered_no_basis' (Box E, basis missing), 'undetermined' (Box C or F, holding period unknown). Map source phrasings: 'Short-Term Transactions for Which Basis Is Reported' / 'Box A' -> short_term_covered; 'Box B' short-term -> short_term_noncovered; 'Box D' -> long_term_covered; 'Box E' -> long_term_noncovered. Do NOT confuse with the holding_period or basis_reporting_status separate fields (those split this enum into two axes for users who want them separately)."}, "holding_period": {"type": ["string", "null"], "description": "Holding period axis derived from section_category. One of: 'short_term', 'long_term', 'undetermined'. Mirrors the section header's 'Short-Term' / 'Long-Term' / 'Holding Period Unknown' label."}, "basis_reporting_status": {"type": ["string", "null"], "description": "Basis-reporting axis derived from section_category. One of: 'basis_reported_to_irs' (Box A or D), 'basis_not_reported_to_irs' (Box B or E with basis shown), 'basis_missing' (Box B or E with basis blank or '—'). The 1099-B section header indicates this."}, "form_8949_box": {"type": ["string", "null"], "description": "Which Form 8949 box the section header instructs the taxpayer to use. One letter: A, B, C, D, E, F. From phrasings like 'report on Form 8949, Part I, with Box A checked' (A); 'Box B checked' (B); 'Part II ... Box D checked' (D). Strip the word 'Box' and any 'checked' qualifier."}, "transaction_action": {"type": ["string", "null"], "description": "Disposition/transaction type as printed in the 'Disposition Transaction' / 'Action' / leftmost column, or as a short code right after the CUSIP. Pershing-style long-form values: 'SELL', 'BUY TO COVER', 'SHORT SELL', 'REDEEM', 'TENDER', 'MERGER', 'CALLED', 'MATURED', 'Sale'. Schwab-style short codes (1–2 letters appended to or right of the CUSIP): 'S' = Sale, 'SS' = Short Sale, 'R' = Redemption, 'P' = Principal Payment, 'C' = Cancellation/Conversion, 'MT' = Maturity. Extract VERBATIM (preserve case/length as printed). Return null if no action column or code is present. Do NOT confuse with section_category (covered/noncovered) or with state-code letters that appear in a separate 'State' field."}, "security_description": {"type": ["string", "null"], "description": "Security or property description for this lot as printed in 'Description (Box 1a)' or '1a-Description of property'. Common label aliases: 'Description (Box 1a)', '1a-Description of property/CUSIP/Symbol', 'Security Description', '8-Description'. Extract VERBATIM as printed — preserve casing, spacing, trailing qualifiers like 'CALLED', 'MATURED', 'DUE mm/dd/yy', and section subtitle ('SAMPLE CORP BOND CALLED', not 'SAMPLE CORP BOND'). STRIP any leading quantity number that some brokers (Schwab) inline in the description column. STRIP a trailing CUSIP-or-Symbol substring that some brokers concatenate ('SAMPLE CORP / CUSIP: 68075N103 / Symbol: OPK' → 'SAMPLE CORP'). STRIP markdown formatting artifacts ('**', '*', leading/trailing '_' underscores). When a security has a description sub-header above several lot rows (Pershing layout), COPY the sub-header description into every lot row. Do NOT confuse with section banners ('Short-Term Transactions for Which Basis Is Reported') — those are section_category, not description. Do NOT confuse with subtotal/total row labels."}, "cusip": {"type": ["string", "null"], "description": "9-character CUSIP identifier for the security. Sources: 'CUSIP', 'CUSIP Number', 'CUSIP:', '1b CUSIP', or right-aligned next to security_description. Extract ONLY the CUSIP portion — if printed as '30246XXXX / Symbol: XXYY' or '30246XXXX/XXYY', extract '30246XXXX' (the 9-character CUSIP standard). Preserve masked digits as printed (e.g. '30246XXXX' if X's are in the source). For Schwab statements that print the ticker symbol on the line below the CUSIP, do NOT merge them. Return null if no CUSIP printed. CUSIPs apply to ALL lot rows under the same security-description group header — copy onto every lot."}, "symbol": {"type": ["string", "null"], "description": "Stock ticker symbol when printed alongside or below the CUSIP (Schwab format: 'XXYY' / 'ABCXX' / 'OPK' on the line below the CUSIP). Extract VERBATIM (uppercase as printed). Some brokers do not print a symbol separately — return null in that case. Do NOT include the CUSIP here; that's a separate field."}, "quantity": {"type": ["number", "null"], "description": "Quantity of shares / units / par value sold for this lot. Source columns: 'Quantity (Box 1a)', 'Quantity', '1e Quantity sold', 'Quantity Sold'. Numeric; strip commas; preserve decimals as printed (e.g. 100.0000, 26.8200, 5952.00, 5000.0000). If the broker (Schwab) inlines quantity in the description column like '5,952 SAMPLE CORP', extract '5952' here. If 'VARIOUS' appears, that's a Sale-Date-Total aggregator row — skip the row entirely. Return null only if the lot row truly has no printed quantity."}, "date_acquired": {"type": ["string", "null"], "description": "Date the security was acquired (1099-B Box 1b). Sources: 'Date Acquired (Box 1b)', '1b-Date acquired', 'Date of acquisition'. Format VERBATIM as printed (e.g. '01/01/20XX', '04/01/12', '12/09/16'). May literally be 'VARIOUS' or 'Various' when multiple acquisition dates roll up to one disposition — preserve as-is. May be BLANK on Box B / Box E noncovered lots where the broker doesn't know the acquisition date — return null (do NOT drop the lot just because date_acquired is null). May be printed as '––' / '—' / 'Not Provided' / 'NOT PROVIDED' on no-basis lots — these also map to null. Do NOT confuse with date_sold (sister column) or with the statement preparation date in the header. **Schwab layout convention**: when the per-lot row spans two physical lines, the TOP physical line carries date_acquired (the '1b–Date of acquisition' header is stacked above '1a–Date of sale'). When only ONE line shows a date for a lot, that date goes in date_acquired ONLY if context makes acquisition the natural read; otherwise it goes in date_sold and date_acquired is null."}, "date_sold": {"type": ["string", "null"], "description": "Sale or disposition date (1099-B Box 1c). Sources: 'Date Sold or Disposed (Box 1c)', '1c-Date sold or disposed', 'Date of sale or exchange', '1a–Date of sale or exchange'. Format VERBATIM as printed (e.g. '06/01/20XX', '04/01/23', '04/08/12'). Do NOT reformat. Do NOT incorporate 'Net proceeds' annotations that may appear under the date. **Schwab layout convention**: when the per-lot row spans two physical lines, the BOTTOM physical line carries date_sold (the '1a–Date of sale or exchange' header is stacked below '1b–Date of acquisition'). This is the inverse of the Pershing convention where the sale date is typically on the same line as the disposition action."}, "proceeds": {"type": ["number", "null"], "description": "Gross or net proceeds for this lot (1099-B Box 1d). Sources: 'Proceeds (Box 1d)', '1d-Proceeds', 'Sales price of stocks, bonds, etc.', '2a-Sales price'. Numeric USD; strip '$', commas; preserve sign (parentheses or trailing minus = negative); preserve cents. Strip footnote-marker asterisks ('100.00*' → 100.00). Do NOT confuse with cost_basis (immediately to the right) or with Security Subtotal / Sale Date Total / category-total rows."}, "cost_basis": {"type": ["number", "null"], "description": "Cost or other basis (1099-B Box 1e). Sources: 'Cost or Other Basis (Box 1e)', '1e-Cost or other basis', '3-Cost or other basis'. Numeric USD; strip '$', commas. May be null/blank legitimately on Box B / Box E noncovered lots where the broker doesn't report basis — return null (do NOT compute it yourself). May literally read 'Missing' / 'Not Provided' / '––' / '—' on no-basis sections — all of these map to null. May carry a single-letter footnote suffix like '(k)', '(e)', '(f)' indicating a basis adjustment note — strip the suffix and return only the numeric value."}, "wash_sale_loss_disallowed": {"type": ["number", "null"], "description": "Wash-sale loss disallowed for this lot (1099-B Box 1g). Sources: '1g-Wash Sale Loss Disallowed', '5-Wash sale loss disallowed', or a value tagged with 'W' indicator in a combined-adjustments column. Numeric, positive (it's a disallowed loss amount, not a signed gain). If the row has only a 'D' (market discount) or 'O' (option premium) indicator, this field is null. Do NOT confuse with accrued_market_discount or option_premium."}, "accrued_market_discount": {"type": ["number", "null"], "description": "Accrued market discount for this lot (1099-B Box 1f). Sources: '1f-Accrued Market Discount', 'Accrued mkt disc', or a value tagged with 'D' indicator in a combined column. Numeric USD. Null if the indicator is 'O' or 'W' instead, or if the column is blank/dashed."}, "option_premium": {"type": ["number", "null"], "description": "Option premium adjustment tagged with an 'O' indicator in the combined-adjustments column (or a dedicated 'Option Premium' column). Numeric. Null if no 'O' tag."}, "realized_gain_or_loss": {"type": ["number", "null"], "description": "Realized gain or loss for this lot. Sources: 'Realized Gain or (Loss)', 'Gain/Loss(-)', '6-Gain or loss'. Numeric USD; losses negative (extract '(123.45)' or '-123.45' as -123.45). Preserve cents. For wash-sale-disallowed rows, the realized_gain_or_loss is typically 0 with the disallowed amount in wash_sale_loss_disallowed. Do NOT compute it from proceeds - cost_basis if the field is blank; return null."}, "federal_income_tax_withheld": {"type": ["number", "null"], "description": "Federal income tax withheld for THIS individual lot (1099-B Box 4). Sources: '4-Federal income tax withheld', 'Federal income tax withheld' column at the right of the per-lot row. Numeric USD. Null if the column is absent or blank for this row. Do NOT confuse with the top-level 1099-B total federal_tax_withheld scalar or with state_tax_withheld."}, "state": {"type": ["string", "null"], "description": "State 2-letter abbreviation for state tax withholding on this lot, when shown ('13-State', 'State'). E.g. 'CA', 'NY'. Null if no state withholding row."}, "state_tax_withheld": {"type": ["number", "null"], "description": "State tax withheld for this lot ('15-State Tax Withheld', 'State tax withheld'). Numeric USD. Null if no state withholding row."}, "loss_not_allowed_indicator": {"type": ["boolean", "null"], "description": "True if the lot row carries a '2b - Loss based on above amount in 2a is not allowed' or similar 'loss not allowed' annotation (some Fidelity rows). False or null otherwise. Affects Form 8949 reporting."}}, "required": ["section_category", "security_description", "date_sold", "proceeds"]}}, "properties": {"tax_year": {"type": ["integer", "null"], "description": "4-digit tax year for this statement, from the page header 'TAX YEAR YYYY' / '2025 TAX AND YEAR-END STATEMENT' / '2024 Consolidated 1099 Tax Statement'. Return null only if no tax year is printed (extremely rare on actual statements; common on explainer-only PDFs which should return null for all top-level fields)."}, "recipient_name": {"type": ["string", "null"], "description": "Recipient's name as printed in 'Recipient's Name and Address'. May be in any casing as printed (e.g. 'JOHN Q. PUBLIC', 'dana JONES john JONES'). Extract VERBATIM. If multiple recipient names appear stacked (joint account), concatenate with ' / ' or capture as a single string preserving newlines. Do NOT include the address. Return null for pure-explainer PDFs without a recipient header."}, "recipient_tin_masked": {"type": ["string", "null"], "description": "Recipient's TIN as masked-printed (e.g. '***-**-6789', '***-**-9999', '123-45-XXXX'). Extract VERBATIM including the masking characters. Sources: 'Recipient's TIN', 'Recipient's Identification Number', 'Recipient's ID No.'. Return null on explainer PDFs."}, "account_number": {"type": ["string", "null"], "description": "Brokerage account number (e.g. '123-456789', '1111-9999', '123-45678'). Extract VERBATIM with any printed dashes or spaces. Sources: 'Account Number', 'Account No.'."}, "payer_name": {"type": ["string", "null"], "description": "Payer (brokerage firm) name as printed in 'Payer Information' or the masthead. Examples: 'PERSHING LLC', 'Charles Schwab & Co., Inc.', 'Fidelity Brokerage Services LLC', 'BEAR STEARNS'. Extract VERBATIM (casing as printed)."}, "payer_federal_id": {"type": ["string", "null"], "description": "Payer's Federal Identification Number (EIN), formatted as printed (e.g. '13-2741729', '04-3523567', '94-1737782'). Sources: 'Federal Identification Number', 'Federal ID Number', 'Payer's Federal ID Number', 'PAYER'S TIN'."}, "statement_date": {"type": ["string", "null"], "description": "Statement preparation date as printed (e.g. '02/13/20XX', 'January 11, 2013'). Sources: 'Date Prepared', or the date next to the 'TAX AND YEAR-END STATEMENT' masthead. Extract VERBATIM. Do NOT confuse with any per-lot date_acquired/date_sold."}, "form_1099_div": {"type": ["object", "null"], "description": "Summary box values from the 1099-DIV (Dividends and Distributions) section. Null if no 1099-DIV section is printed. **Box numbers shifted between the 2012 and 2024+ form revisions; this schema uses SEMANTIC field names where the box number changed, and the box-number aliases live inside each field description.** Subdivisions like 'Includes amount shown in box 1b' under box 1a are informational and do NOT make the value into a per-row list.", "properties": {"box_1a_total_ordinary_dividends": {"type": ["number", "null"], "description": "1099-DIV Box 1a 'Total Ordinary Dividends' (stable across form revisions). Numeric USD. Includes amounts shown in box 1b (qualified) but those are reported separately."}, "box_1b_qualified_dividends": {"type": ["number", "null"], "description": "1099-DIV Box 1b 'Qualified Dividends' (stable). Subset of box 1a."}, "box_2a_total_capital_gain_distributions": {"type": ["number", "null"], "description": "1099-DIV Box 2a 'Total Capital Gain Distributions' (stable). Includes amounts in boxes 2b, 2c, 2d, 2f."}, "box_2b_unrecap_section_1250_gain": {"type": ["number", "null"], "description": "1099-DIV Box 2b 'Unrecaptured Section 1250 Gain' (stable). Subset of box 2a; used for real estate / REIT depreciation recapture taxation."}, "box_2c_section_1202_gain": {"type": ["number", "null"], "description": "1099-DIV Box 2c 'Section 1202 Gain' (qualified small business stock; stable). Subset of box 2a."}, "box_2d_collectibles_28pct_gain": {"type": ["number", "null"], "description": "1099-DIV Box 2d 'Collectibles (28%) Gain' (stable). Subset of box 2a."}, "section_897_ordinary_dividends": {"type": ["number", "null"], "description": "Section 897 Ordinary Dividends — Box 2e on 2024+ form (NEW after 2022; absent on Schwab 2012). Used for nonresident alien tax reporting."}, "section_897_capital_gain": {"type": ["number", "null"], "description": "Section 897 Capital Gain — Box 2f on 2024+ form (NEW after 2022; absent on Schwab 2012)."}, "box_3_nondividend_distributions": {"type": ["number", "null"], "description": "1099-DIV Box 3 'Nondividend Distributions' (stable). Return of capital; reduces cost basis, not taxable as dividend."}, "box_4_federal_income_tax_withheld": {"type": ["number", "null"], "description": "1099-DIV Box 4 'Federal Income Tax Withheld' (stable). The 1099-DIV summary total."}, "section_199a_dividends": {"type": ["number", "null"], "description": "Section 199A Dividends — Box 5 on 2024+ form (NEW after 2018 with TCJA; absent on Schwab 2012). REIT dividends eligible for 199A deduction."}, "investment_expenses": {"type": ["number", "null"], "description": "Investment Expenses pass-through. Box 5 on 2012 form, Box 6 on 2024+ form (renumbered after Section 199A was added). RIC/REMIC pass-through; rarely populated post-TCJA on individual statements."}, "foreign_tax_paid": {"type": ["number", "null"], "description": "Foreign Tax Paid. Box 6 on 2012 form, Box 7 on 2024+ form (renumbered). Used for the Foreign Tax Credit on Form 1116. Value is total USD across all foreign sources."}, "cash_liquidation_distributions": {"type": ["number", "null"], "description": "Cash Liquidation Distributions. Box 8 on 2012 form, Box 9 on 2024+ form."}, "noncash_liquidation_distributions": {"type": ["number", "null"], "description": "Noncash Liquidation Distributions. Box 9 on 2012 form, Box 10 on 2024+ form."}, "exempt_interest_dividends": {"type": ["number", "null"], "description": "Exempt-Interest Dividends (e.g. municipal-bond mutual fund dividends). Box 10 on 2012 form, Box 12 on 2024+ form. Federally tax-exempt but may be taxable at state level."}, "specified_private_activity_bond_interest_dividends": {"type": ["number", "null"], "description": "Specified Private Activity Bond Interest Dividends. Box 11 on 2012 form, Box 13 on 2024+ form. Subset of exempt_interest_dividends; subject to AMT."}}}, "form_1099_int": {"type": ["object", "null"], "description": "Summary box values from the 1099-INT (Interest Income) section. Null if no 1099-INT section is printed. 1099-INT box numbers have been roughly stable across recent years; field names mirror the box numbers.", "properties": {"box_1_interest_income": {"type": ["number", "null"], "description": "1099-INT Box 1 'Interest Income'. Does NOT include amounts in box 3 (US Treasury) or box 8 (tax-exempt)."}, "box_3_interest_on_us_treasury": {"type": ["number", "null"], "description": "1099-INT Box 3 'Interest on U.S. Savings Bonds and Treasury Obligations'. Generally exempt from state income tax."}, "box_4_federal_income_tax_withheld": {"type": ["number", "null"], "description": "1099-INT Box 4 'Federal Income Tax Withheld' (1099-INT summary)."}, "box_5_investment_expenses": {"type": ["number", "null"], "description": "1099-INT Box 5 'Investment Expenses' (pass-through). Rarely populated post-TCJA."}, "box_6_foreign_tax_paid": {"type": ["number", "null"], "description": "1099-INT Box 6 'Foreign Tax Paid'."}, "box_8_tax_exempt_interest": {"type": ["number", "null"], "description": "1099-INT Box 8 'Tax-Exempt Interest' (municipal bond interest etc.). Federally tax-exempt."}, "box_9_specified_private_activity_bond_interest": {"type": ["number", "null"], "description": "1099-INT Box 9 'Specified Private Activity Bond Interest'. Subset of box 8; subject to AMT."}, "box_10_market_discount": {"type": ["number", "null"], "description": "1099-INT Box 10 'Market Discount' (for covered transactions only). Pershing shows this; Schwab 2012 form did not."}, "box_11_bond_premium": {"type": ["number", "null"], "description": "1099-INT Box 11 'Bond Premium' (for covered transactions only)."}, "box_12_bond_premium_on_treasury_obligations": {"type": ["number", "null"], "description": "1099-INT Box 12 'Bond Premium on Treasury obligations' (for covered transactions only)."}, "box_13_bond_premium_on_tax_exempt_bond": {"type": ["number", "null"], "description": "1099-INT Box 13 'Bond Premium on Tax-Exempt Bond' (for covered transactions only)."}, "state_tax_withheld": {"type": ["number", "null"], "description": "1099-INT State Tax Withheld summary across states. Box 13 on Schwab 2012 form, Box 17 on 2024+ form (renumbered to make room for bond-premium boxes)."}}}, "form_1099_oid": {"type": ["object", "null"], "description": "Summary box values from the 1099-OID (Original Issue Discount) section. Null if no 1099-OID section is printed. Pershing also adds covered-transaction tracking fields (other periodic interest, acquisition premium, tax-exempt OID) — these live as semantic-named fields here.", "properties": {"box_1_original_issue_discount": {"type": ["number", "null"], "description": "1099-OID Box 1 'Total Original Issue Discount' (NOT on US Treasury — see box 6 for that)."}, "box_4_federal_income_tax_withheld": {"type": ["number", "null"], "description": "1099-OID Box 4 'Federal Income Tax Withheld'."}, "box_6_original_issue_discount_on_us_treasury_obligations": {"type": ["number", "null"], "description": "1099-OID Box 6 'Original Issue Discount on U.S. Treasury Obligations'. Exempt from state and local income tax."}, "other_periodic_interest": {"type": ["number", "null"], "description": "Other Periodic Interest (Pershing-specific summary; not a numbered IRS box but rolls into the broader OID reporting)."}, "market_discount": {"type": ["number", "null"], "description": "Market Discount for covered transactions (Pershing OID summary aggregates this)."}, "acquisition_premium": {"type": ["number", "null"], "description": "Acquisition Premium for covered transactions (Pershing OID summary). Reduces taxable OID."}, "tax_exempt_oid": {"type": ["number", "null"], "description": "Tax-Exempt OID for covered transactions. OID on tax-exempt obligations."}, "tax_exempt_oid_specified_private_activity_bonds": {"type": ["number", "null"], "description": "Tax-Exempt OID on Specified Private Activity Bonds. Subset of tax_exempt_oid; subject to AMT."}}}, "form_1099_misc": {"type": ["object", "null"], "description": "Summary box values from the 1099-MISC (Miscellaneous Information) section. Null if no 1099-MISC section is printed. Box numbering has been stable for the major brokerage-relevant boxes (1, 2, 4, 8); state-withholding moved 16→17 in some years.", "properties": {"box_1_rents": {"type": ["number", "null"], "description": "1099-MISC Box 1 'Rents'."}, "box_2_royalties": {"type": ["number", "null"], "description": "1099-MISC Box 2 'Royalties'."}, "box_3_other_income": {"type": ["number", "null"], "description": "1099-MISC Box 3 'Other Income'."}, "box_4_federal_income_tax_withheld": {"type": ["number", "null"], "description": "1099-MISC Box 4 'Federal Income Tax Withheld'."}, "box_8_substitute_payments": {"type": ["number", "null"], "description": "1099-MISC Box 8 'Substitute payments in lieu of dividends or interest'."}, "state_tax_withheld": {"type": ["number", "null"], "description": "1099-MISC State Tax Withheld summary. Box 16 on Schwab 2012 form, Box 16 on 2024+ form (stable for MISC)."}}}, "form_1099_b_lots": {"anyOf": [{"type": "array", "items": {"$ref": "#/$defs/BrokerageLot"}}, {"type": "null"}], "description": "The 1099-B long-doc list: every per-lot disposition row from the official 'Proceeds From Broker and Barter Exchange Transactions' section. EXCLUDE: (a) subtotal rows (Security Subtotal, Sale Date Total, Total Short-Term, Total Long-Term, category Total); (b) Year-End Summary / supplemental realized gain rows even if the same security appears there (the PDF usually says these are NOT reported to the IRS); (c) the blank-template row of a pure explainer PDF (a fully-blank template doesn't represent real lots). For doc-type 'pure explainer with no recipient header': return null. For doc-type 'filled composite with recipient' and 'guide+embedded filled sample': return the array of actual lot rows from the official 1099-B section."}, "form_1099_b_summary": {"type": ["object", "null"], "description": "Summary totals from the 1099-B section (separate from the per-lot list). On Pershing this appears as the 'Summary of Form 1099-B' panel on page 1. On Schwab this is the 'Total Sales Price' / 'Total Federal Income Tax Withheld' totals at the bottom of the per-section pages. On Fidelity sample, it's the TOTALS row at the bottom of the sample 1099-B table. Null when no 1099-B section is printed (pure-explainer PDFs).", "properties": {"gross_proceeds": {"type": ["number", "null"], "description": "1099-B total Gross Proceeds across all sections (covered + noncovered). Label aliases: 'Gross Proceeds (For Covered and Noncovered Transactions)', 'Total Sales Price of Stocks, Bonds, etc.', 'TOTALS' column under sales price. Should equal sum(form_1099_b_lots[].proceeds) for the same PDF."}, "total_cost_or_other_basis": {"type": ["number", "null"], "description": "1099-B total Cost or Other Basis (typically covered transactions only, sometimes also noncovered when basis is available). Label aliases: 'Cost or Other Basis (For Covered Transactions Only)', 'Total Cost or Other Basis', TOTALS column under cost basis."}, "federal_income_tax_withheld_proceeds": {"type": ["number", "null"], "description": "1099-B Federal Income Tax Withheld summary (on Proceeds — distinct from per-lot or from the Reg Futures variant). Label aliases: 'Federal Income Tax Withheld – Proceeds', 'Total Federal Income Tax Withheld'. Numeric USD."}, "state_tax_withheld_proceeds": {"type": ["number", "null"], "description": "1099-B State Tax Withheld summary (on Proceeds — distinct from per-lot or from the Reg Futures variant). Label aliases: 'State Tax Withheld – Proceeds'. Numeric USD."}, "short_term_realized_gain_total": {"type": ["number", "null"], "description": "Total Box A Short-Term Realized Gain (positive amounts only). Often printed below the 1099-B table as 'Box A Short-Term Realized Gain'."}, "short_term_realized_loss_total": {"type": ["number", "null"], "description": "Total Short-Term Realized Loss (negative; printed as 'Box A Short-Term Realized Loss' or similar). Numeric — preserve negative sign."}, "wash_sale_loss_disallowed_total": {"type": ["number", "null"], "description": "Total Wash Sale Loss Disallowed summary across all sections. Label aliases: 'Box A Wash Sale Loss Disallowed', 'Total Wash Sale Loss Disallowed'."}}}, "form_1099_b_regulated_futures": {"type": ["object", "null"], "description": "Pershing-style 'Regulated Futures and Foreign Currency Forward Contracts' sub-section of 1099-B (Section 1256 contracts). Null if not present. This is a Pershing-specific layout — most Schwab/Fidelity samples don't have it.", "properties": {"profit_or_loss_realized_in_year": {"type": ["number", "null"], "description": "'Profit or (Loss) Realized in 2025' (current-year realized). Numeric USD; preserve sign — parenthesized values are losses."}, "unrealized_profit_or_loss_open_contracts_prior_year_end": {"type": ["number", "null"], "description": "'Unrealized Profit or (Loss) on Open Contracts – 12/31/<prior year>'. Numeric USD; signed."}, "unrealized_profit_or_loss_open_contracts_current_year_end": {"type": ["number", "null"], "description": "'Unrealized Profit or (Loss) on Open Contracts – 12/31/<current year>'. Numeric USD; signed."}, "aggregate_profit_or_loss": {"type": ["number", "null"], "description": "Aggregate Profit or (Loss) across the realized + unrealized adjustments. Numeric USD; signed."}, "federal_income_tax_withheld": {"type": ["number", "null"], "description": "Federal Income Tax Withheld on Regulated Futures and Foreign Currency Forward Contracts."}, "state_tax_withheld": {"type": ["number", "null"], "description": "State Tax Withheld on Regulated Futures and Foreign Currency Forward Contracts."}}}}, "required": ["tax_year", "recipient_name", "form_1099_b_lots"]}

Expected output:
{"tax_year": 2012, "recipient_name": "John Q Public", "recipient_tin_masked": "***- **- 6789", "account_number": "123-456789", "payer_name": "Fidelity Brokerage Services LLC", "payer_federal_id": "04-3523567", "statement_date": null, "form_1099_div": null, "form_1099_int": null, "form_1099_oid": null, "form_1099_misc": null, "form_1099_b_lots": [{"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "COACH INC", "cusip": "189754104", "symbol": "COH", "quantity": 153.259, "date_acquired": "02/12/2012", "date_sold": "03/15/2012", "proceeds": 30452.25, "cost_basis": 28452.25, "wash_sale_loss_disallowed": null, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": 2000.0, "federal_income_tax_withheld": null, "state": null, "state_tax_withheld": null, "loss_not_allowed_indicator": true}, {"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "COACH INC", "cusip": "189754104", "symbol": "COH", "quantity": 22.223, "date_acquired": "03/12/2012", "date_sold": "03/15/2012", "proceeds": 6258.29, "cost_basis": 6250.25, "wash_sale_loss_disallowed": null, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": 8.04, "federal_income_tax_withheld": null, "state": null, "state_tax_withheld": null, "loss_not_allowed_indicator": null}, {"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "FIDELITY ASSET MANAGER 20%", "cusip": "316069400", "symbol": "FASIX", "quantity": 200.0, "date_acquired": "Various", "date_sold": "03/13/2012", "proceeds": 2125.23, "cost_basis": 2000.0, "wash_sale_loss_disallowed": null, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": 125.23, "federal_income_tax_withheld": null, "state": null, "state_tax_withheld": null, "loss_not_allowed_indicator": null}, {"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "UNITED STATES TREAS NTS 4.25000% 11/15/2014", "cusip": "912828DC1", "symbol": null, "quantity": 153.259, "date_acquired": "02/12/2012", "date_sold": "03/15/2012", "proceeds": 30452.25, "cost_basis": 28452.25, "wash_sale_loss_disallowed": null, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": 2000.0, "federal_income_tax_withheld": null, "state": null, "state_tax_withheld": null, "loss_not_allowed_indicator": null}, {"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "UNITED STATES TREAS NTS 4.25000% 11/15/2014", "cusip": "912828DC1", "symbol": null, "quantity": 22.223, "date_acquired": "03/12/2012", "date_sold": "04/15/2012", "proceeds": 6258.29, "cost_basis": 6250.25, "wash_sale_loss_disallowed": null, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": 8.04, "federal_income_tax_withheld": 60.0, "state": "CA", "state_tax_withheld": 5.0, "loss_not_allowed_indicator": null}, {"section_category": "short_term_covered", "holding_period": "short_term", "basis_reporting_status": "basis_reported_to_irs", "form_8949_box": "A", "transaction_action": "Sale", "security_description": "ZHONGPIN INC COM", "cusip": "98952K107", "symbol": "HOGS", "quantity": 43.225, "date_acquired": "04/13/2012", "date_sold": "05/05/2012", "proceeds": 147.83, "cost_basis": 153.44, "wash_sale_loss_disallowed": 2.23, "accrued_market_discount": null, "option_premium": null, "realized_gain_or_loss": -5.61, "federal_income_tax_withheld": null, "state": null, "state_tax_withheld": null, "loss_not_allowed_indicator": null}], "form_1099_b_summary": {"gross_proceeds": 75694.14, "total_cost_or_other_basis": 71558.44, "federal_income_tax_withheld_proceeds": 60.0, "state_tax_withheld_proceeds": null, "short_term_realized_gain_total": 4141.31, "short_term_realized_loss_total": -5.61, "wash_sale_loss_disallowed_total": 2.23}, "form_1099_b_regulated_futures": null}