Skip to Content
BlitzPulse docs are live. Looking for the app? Visit https://app.blitzglobalcapital.com.
Api ReferenceComparison API

Comparison API

Auto-generated from openapi-snapshot.json. Do not edit by hand — changes are overwritten by scripts/docs/generate_api_reference.py.

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_idqueryintegeroptional
yearqueryoptional

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_idqueryoptional

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_idqueryoptional

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error