TaxLot
One open lot in Plaid's tax_lots[] shape (SPEC §6.2, DECISIONS
"Plaid TaxLot mapping").
institution_lot_id is the deterministic id from
lot_id, so the same acquisition
reports the same lot across runs and across backends.
quantity, cost_basis and current_value all describe what
is LEFT of the lot: units remaining, the exact un-disposed part of
the basis rounded once into Money, and those units at the mark.
purchase_price is the exception. It is
cost_total / quantity_original, a fact of the ACQUISITION that
does not move as the lot is drawn down, so a half-consumed lot still
reports the price it was bought at.
purchase_price and cost_basis are None together when the
acquisition was unpriced; current_value is None when the
asset has no mark. Only lots with units remaining are ever emitted.
Fields
institution_lot_idstroriginal_purchase_datetimeintquantityDecimalpurchase_priceMoney | Nonecost_basisMoney | Nonecurrent_valueMoney | Noneposition_typestrdefault 'LONG'flagstuple[str, ...]default ()__init__
__init__(self, institution_lot_id: str, original_purchase_datetime: int, quantity: Decimal, purchase_price: Money | None, cost_basis: Money | None, current_value: Money | None, position_type: str = LONG, flags: tuple[str, ...] = ()) -> None
Parameters
institution_lot_idrequired, strnone
original_purchase_datetimerequired, intnone
quantityrequired, Decimalnone
purchase_pricerequired, Money | Nonenone
cost_basisrequired, Money | Nonenone
current_valuerequired, Money | Nonenone
position_typeoptional, str, default 'LONG'none
flagsoptional, tuple[str, ...], default ()none