Cost Basis overview

Send the transactions your platform already records. Taxbit builds lot-level inventory from them and computes realized gains and losses under the cost-basis method that applies.

How it works

  1. You send transactions. Acquisitions, dispositions, and transfers, with timestamps and asset amounts.
  2. Inventory updates automatically. Each processed transaction triggers a background recalculation that matches dispositions to lots.
  3. You retrieve gains. Short-term and long-term gains per account, ready for tax screens in your app or a 1099-DA.

Inventory updates in the background, so it lags the transactions you send. The lag depends on where the transaction lands in the account's history: see how long the lag is. To know when inventory is current, subscribe to the INVENTORY_UPDATE webhook and poll as a fallback; delivery is not guaranteed after every write. See how to know when figures are current.

Guides

Work through these in order the first time.

  1. Send transactions and read gains: the end-to-end path, transactions in and gains out.
  2. Choose a cost-basis method: HIFO (highest in, first out), FIFO (first in, first out), LIFO (last in, first out), and LOFO (lowest in, first out), where each is set, and what changing one does.
  3. Handle transfers: move basis between accounts without creating a taxable event.
  4. Show tax data in your app: show unrealized positions and year-to-date gains in your own UI.

API resources