Comparison API

5 endpoints in this group.

POST /api/market/fmv

Fetch Fmv

Fetch year-end Fair Market Value prices for a list of symbols using yfinance. Prices are pulled from the last trading day of December for the requested year. Optionally upserts into year_end_positions.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/positions/year-end

Get Year End Positions

Return year-end open positions. If year is omitted, returns the most recent year available.

Parameters

NameInTypeRequiredDescription
tenant_idquery—optional
yearquery—optional

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/reports/mtm-bridge

Generate Mtm Bridge

Calculate the Mark-to-Market bridge between two year-end position snapshots.

For each symbol: starting_value = prior year-end FMV (falls back to cost_basis if no prior mark) ending_value = current year-end FMV adjustment = ending_value - starting_value

Total adjustment = total unrealized MTM gain/(loss) between years.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/reports/section-481

Generate Section 481

Compute Section 481(a) adjustment for first-year Section 475(f) MTM election.

The adjustment = sum(year-end FMV - tax cost basis) for all prior-year open positions. Positive adjustments are spread over 4 years (Rev. Proc. 2011-14). Negative adjustments are taken entirely in year 1.

Attach output to Form 3115.

Parameters

NameInTypeRequiredDescription
account_idquery—optional

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/reports/securities-mtm

Generate Securities Mtm

Generate a Mark-to-Market Securities report (analogous to Form 4797 Section II).

For each position:

  • Opening value = cost_basis
  • Closing value = fmv_value (year-end FMV)
  • MTM gain/loss = fmv_value - cost_basis

Also includes realized gains from realized_trades for the year.

Parameters

NameInTypeRequiredDescription
account_idquery—optional

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

Occasional BlitzPulse product updates and offers, sent only if you tick the box and confirm your address.

How we handle your email

Footer Disclaimer BlitzPulse is educational decision support only. Not investment, tax, or legal advice. Not a broker. Trade at your own risk.