Skip to main content
Data API overview · Data API patterns · Balances, cost and returns

Choose the contract

Key points
  • Existing consumers can keep their legacy contract. New integrations use current v1.
  • V1 applies one published policy across supported history. No transition-date parameter is required.
  • /legacy/public/v1/... preserves a previously published financial payload for consumers that need that compatibility surface.
  • Keep original reports and recalculations as separate records; corrections link a new version and reason.

Current queries

  • Use the Scalar reference for calendars, pagination and payloads.
  • Compare the same asset, account scope, time boundaries and balance components when reconciling.

Legacy harvestReport and totalAssets recognition

Legacy endpoints supported accountedBy=harvestReport and accountedBy=totalAssets to attribute keeper report gains before 7-day linear PPS degradation. In v1:
  • Canonical holder earnings and balance are strictly evaluated under valuation=pps (or valuation=estimated_nav for pre-harvest venue estimates). Unreleased locked profit is excluded from official PnL because investors cannot redeem it at report time, and subsequent inflows dilute locked profit across shares.
  • To inspect strategy harvest gains, query GET /v1/harvests for verified report events, net gain, and report-block wallet allocations.
  • To reconcile PPS balances against contract total assets including locked profit, add include=reconciliation to /v1/balances or /v1/earnings.

Average capital

For restored holder/PPS calculations:
Calculation rules
  • Use unrounded capital and earnings for rates; monetary output truncates toward zero.
  • Require positive capital and duration. Legacy annual rates with magnitude above 50 or nonfinite output return null.
  • QA-compatible exponentiation retains its original numeric behavior.
  • Holder/PPS opening selects state at or before start; closing at or before end - 1 second; flows use (start, end - 1 second].
The endpoint average and a time-weighted balance measure are:
  • They coincide for a balance changing linearly over the whole interval.
  • Intraperiod deposits, withdrawals and valuation jumps require the actual path for the time-weighted measure.
  • Holder/PPS uses remaining principal C(t); keep that denominator distinct from market value B(t).
  • Restored vault/PPS uses its captured-checkpoint trapezoid denominator. See source coverage below before selecting a scope.

Vault/PPS capital

The compatible vault checkpoints use this trapezoid denominator:
  • Keep checkpoint products and weighted sums unrounded until final output/rate calculation.
  • This compatibility denominator uses the retained checkpoint selection. V1 boundary valuation uses exact confirmed-block state.

Legacy source coverage

Cautions
  • Specify holder/PPS endDate explicitly. It is inclusive; 2026-09-07 requires evidence through 2026-09-08T00:00:00Z.
  • Today, uncaptured periods and incomplete price/history evidence return 503 until collection completes.
  • Selected price batches retain source IDs and integer values. Later source revisions can select different inputs.
  • Verified reconstruction establishes those inputs and periods. Identity with an issued original requires that original’s evidence.

Export evidence

  • Preserve the exact request, response and headers with each export.
  • Missing prices, history, capital or QA evidence returns a specific legacy_*_unavailable error.