Schema Tax

1099-B JSON Format for Lots, Basis and Wash Sales

By Schema TaxPublished Updated

A 1099-B JSON format that keeps every sale intact puts each lot in an array, one object per sale, with its description, acquisition and sale dates, proceeds, cost basis, wash sale loss disallowed, term and covered status. Statement-level facts such as the broker, the account and the tax year sit once in the envelope above the lots.

Why does a 1099-B JSON format need an array of lots?

A 1099-B JSON format needs an array of lots because one brokerage statement reports many sales, and each sale has its own set of boxes. Flat fields work for a W-2, where each box appears once. On a 1099-B, Boxes 1a to 1g repeat for every sale, so each sale is a row, not a field.

The IRS treats each sale as its own report. The IRS Instructions for Form 1099-B tell brokers to report each transaction, other than regulated futures, foreign currency and Section 1256 option contracts, on a separate Form 1099-B. The same instructions say brokers using substitute statements may be able to report a customer's transactions for the year on a single substitute statement. So the paper a customer receives is often one long statement holding what would otherwise be dozens of separate forms.

A JSON format that mirrors that has two layers. The envelope holds what is true for the whole statement: the broker's name and TIN, the masked recipient TIN, the account number and the tax year. The lots array holds one object per sale, with the boxes that belong to that sale.

Here is an illustrative lots array with three fictional lots. The shape and field names are an example only; Schema Tax has no public API documentation, and the URL below is a placeholder.

POST https://api.example.com/v1/extractions
Content-Type: application/pdf
{
  "form_type": "1099-B",
  "tax_year": 2026,
  "broker": { "name": "Northgate Securities LLC", "tin": "XX-XXX7702" },
  "recipient_tin": "XXX-XX-4417",
  "account_number": "XXXX-2291",
  "lots": [
    {
      "description": "40 SH EXAMPLE CORP COM",
      "date_acquired": "2025-02-10",
      "date_sold": "2026-03-14",
      "proceeds": "6120.00",
      "cost_basis": "4880.00",
      "accrued_market_discount": null,
      "wash_sale_loss_disallowed": null,
      "term": "long",
      "ordinary": false,
      "noncovered": false,
      "basis_reported_to_irs": true,
      "pages": [4]
    },
    {
      "description": "25 SH SAMPLE TECH INC",
      "date_acquired": "2026-01-05",
      "date_sold": "2026-04-22",
      "proceeds": "2150.00",
      "cost_basis": "2900.00",
      "accrued_market_discount": null,
      "wash_sale_loss_disallowed": "450.00",
      "term": "short",
      "ordinary": false,
      "noncovered": false,
      "basis_reported_to_irs": true,
      "pages": [5]
    },
    {
      "description": "100 SH OLDFIELD UTILITIES",
      "date_acquired": null,
      "date_acquired_note": "acquired on various dates",
      "date_sold": "2026-06-30",
      "proceeds": "3400.00",
      "cost_basis": null,
      "accrued_market_discount": null,
      "wash_sale_loss_disallowed": null,
      "term": null,
      "ordinary": false,
      "noncovered": true,
      "basis_reported_to_irs": false,
      "pages": [7]
    }
  ]
}

What each lot field holds

Field1099-B box and IRS labelTypeNotes
description1a Description of PropertytextShares and security name as printed
date_acquired1b Date Acquireddate or nullISO 8601 full date; null when blank
date_sold1c Date Sold or DisposeddateISO 8601 full date
proceeds1d Proceedssigned moneyCan be negative
cost_basis1e Cost or Other Basismoney or nullNull when the broker does not report basis
accrued_market_discount1f Accrued Market Discountmoney or nullUsually blank for stock
wash_sale_loss_disallowed1g Wash Sale Loss Disallowedmoney or nullPositive amount added back
term2 Type of Gain or Loss"short", "long" or nullAs printed, never derived
ordinary2 "Ordinary" checkboxbooleanSeparate from term
noncovered5 Check if a Noncovered Securityboolean
basis_reported_to_irs12 Check if Basis Reported to IRSboolean
pagesnonearray of integersWhere the lot appears in the PDF

Keeping pages on every lot pays off during review. When one sale out of 140 is flagged, a reviewer jumps straight to page 5 instead of scrolling a statement.

Dates acquired and sold in a 1099-B JSON format

Dates acquired and sold in a 1099-B JSON format should be ISO 8601 full dates, written year, month, day, such as 2026-03-14. When the broker leaves the acquisition date blank, store null and say why in a note field, rather than inventing a date or storing the word printed on the statement in the date field.

The ISO style matters because brokers print dates in different ways, and some use two-digit years. RFC 3339, a profile of ISO 8601, defines the full-date form as a four-digit year, a two-digit month and a two-digit day, separated by hyphens. JSON Schema's date format uses the same rule, so a validator can check it. Normalize every date to that form before storing it.

The blank acquisition date is a real case, not a reading failure. The 1099-B instructions say Box 1b is left blank when "the securities sold were acquired on a variety of dates", and that it may also be left blank when Box 5 is checked for a noncovered security and the broker chooses not to complete it. Some statements print a word in that space instead of leaving it empty. Either way, the date field should be null, and a short note like "acquired on various dates" keeps the reason visible.

Holding period is a separate question from dates. It is tempting to compute short or long term by subtracting the acquisition date from the sale date. Do not. The instructions tell brokers to determine the term under Section 1222 and to "apply the rules for stock acquired from a decedent", so the term is a rule applied by the broker, not simple date arithmetic. The broker's Box 2 is the record. Store what it says in term, and if your code computes its own figure, keep it in a separately named field so nobody confuses the two.

The sale date has no blank case on a normal sale, so a missing date_sold is worth flagging. Most often it means the reader split one lot across two lines of a statement.

Cost basis and wash sale fields in 1099-B JSON

Cost basis and wash sale fields in 1099-B JSON should store exactly what the broker printed: proceeds in Box 1d, cost basis in Box 1e and wash sale loss disallowed in Box 1g, each as a decimal money string. Proceeds can be negative, basis can be missing, and the wash sale amount is a positive figure that reduces a loss.

Proceeds need a signed type. The 1099-B instructions describe Box 1d as gross cash proceeds, reduced by commissions and transfer taxes, and say a loss is shown as a negative amount in parentheses, with a closing transaction on a written option as the example. A reader that drops the parentheses turns a loss into a gain. Convert "(125.00)" to "-125.00" at extraction time, and test that case on purpose.

Cost basis needs a nullable type. When Box 5 marks a noncovered security, the instructions allow the broker to leave Box 1e blank. A null basis is not zero. A zero basis means the shares cost nothing, which changes the gain entirely. Never fill a missing basis with zero to make a column add up.

The wash sale amount needs a clear sign convention. The instructions require brokers to report the loss disallowed when the sale and the purchase occur in the same account, involve covered securities and share the same CUSIP number, and say reporting is optional in some other cases. In the example, lot two sold for $2,150.00 against a basis of $2,900.00, a $750.00 loss, and Box 1g shows $450.00 disallowed. Store the $450.00 as printed, as a positive amount. If your app also shows the allowed loss, compute it as proceeds minus basis plus the wash sale amount, here $2,150.00 minus $2,900.00 plus $450.00, which is a $300.00 loss, and label it as computed.

What a wash sale or a cost basis adjustment means for the taxpayer, and how either one moves to Form 8949, is covered in the 1099-B brokerage category. For how to represent the amounts themselves, the post on decimal versus float for money in JSON explains why strings avoid rounding drift.

Covered and noncovered lots in 1099-B JSON

Covered and noncovered lots in 1099-B JSON are told apart by two boolean fields: noncovered from the Box 5 checkbox and basis_reported_to_irs from the Box 12 checkbox. Together with the term from Box 2, those flags tell a consumer whether the broker reported the basis and which group of sales a lot belongs to.

A covered security is one whose basis the broker must report. The 1099-B instructions list several kinds, the first being stock acquired for cash in an account after 2010, except stock for which the average basis method is available. A noncovered security is any security that is not a covered security. On the form, the broker marks Box 5 for a noncovered sale and Box 12 when basis is reported to the IRS. The instructions say Box 12 is checked when Box 5 is not, or when Box 5 is checked but basis is still reported in Box 1e.

Store both flags even though they usually move together. The case where they disagree, a noncovered lot whose basis the broker reported anyway, is exactly the one a consumer needs to see. Collapsing the two into one field hides it.

Noncovered lots also explain blank boxes. The instructions say that when Box 5 is checked, Boxes 1b, 1e, 1f, 1g and 2 may be left blank. In the example, lot three has no acquisition date, no basis and no term, and every null is consistent with that rule. A validator that requires term on every lot would wrongly reject it. Make those fields required only when noncovered is false.

The instructions also say a broker "may not report both short term and long term gain or loss on the same Form 1099-B." On a substitute statement that usually shows up as separate sections, often with noncovered sales grouped apart. Keep the section a lot came from, or derive it from the term and flags, so totals by group match the statement.

How should 1099-B JSON handle consolidated brokerage statements?

1099-B JSON for a consolidated brokerage statement should split the statement into one record per form type, keep every 1099-B sale as a lot, and store the broker's summary totals separately from the lot rows. A consolidated statement often holds a 1099-DIV, a 1099-INT and a 1099-B in one PDF across many pages.

Separate the forms first. A consolidated statement is several information returns bound together, so the dividend and interest sections belong in their own 1099-DIV and 1099-INT records with their own fields. Mixing them into the 1099-B envelope makes every consumer untangle them again. The post on splitting mixed PDFs with a document classification API covers how pages get sorted by form type.

Then keep summary rows apart from detail rows. Brokers often print a summary by category, such as short-term covered, next to the detail of each sale. Both show proceeds and basis, and a reader that loads both into lots counts every sale twice. Store the summary in a summary array tagged with its category, and check that the lot totals per category equal it. That check catches a missed page faster than any other. The post on 1099-B summary versus transaction detail shows how the two sections look on paper.

Long statements bring one more problem: a single lot split across a page break. Look for a description with no amounts at the bottom of one page and amounts with no description at the top of the next, and join them before validation.

Every 1099-B lot reads into the same fixed field set, whichever broker printed the statement, and Schema Tax returns those lots alongside the other forms in the file, as listed in the forms Schema Tax supports.

Other complex forms follow the same row-based approach. The K-1 JSON schema for boxes, codes and Part III models coded items as rows, and the tax return parsing API guide to Form 1040 lines covers reading the finished return itself as data.

All posts in Tax Form APIs for Developers