Published invariants

Nine assertions, run continuously against production, by a suite anyone can run.

The suite

The invariant suite is open source and runnable against any endpoint implementing the same contract — ours, or a competitor's. Results against our production API are published continuously.

npx @robinhoodrpc/invariants \  --endpoint https://api.robinhoodrpc.io/v1 \  --sample 500

What is asserted

FieldTypeDescription
1arithmeticbalance_ui == balance_raw × multiplier_at(block), for every sampled account and block.
2historyHistorical queries never apply the current multiplier when as_of is in the past.
3sessionsSession boundaries match the published calendar, including half-days.
4actionsA corporate action's details variant always matches its declared type.
5streamingEvery SEQUENCED record reaches INCLUDED, DROPPED or REORGED — none dangle.
6pricespremium_bps recomputes exactly from the component fields in the same record.
7tapetape_sequence is strictly monotonic with no gaps.
8candlesCandles flagged crosses_session_boundary genuinely span a boundary.
9replayReprocessing any range at a given code_version is byte-identical.

Correctness

Correctness note

A failing invariant is published as a failing invariant. We would rather show a red assertion than quietly drop a check that stopped passing — a suite that only ever shows green is not evidence of anything.

Related