Risk statistics for a derivative contract.
Mark and index are not the same price, and neither is the last trade
:mark_price is the venue's own valuation — what it marks positions and computes
liquidations against. :index_price is the external reference it is derived from. They
diverge, sometimes sharply, and the divergence is the point: a venue marking away from the
index is why a position can be liquidated at a price the market never printed.
Neither is a traded price. Types.Quote carries that. Three prices for one instrument,
each meaning something different, is exactly the situation in which a single "price" field
produces a confident wrong answer.
Open interest in contracts and in notional
:open_interest counts contracts; :open_interest_notional values them. A venue publishes
both because neither substitutes for the other across instruments with different contract
sizes.
Summary
Types
Functions
Builds a t/0, failing closed if a required field is absent or nil.
@enforce_keys guards presence, not nil — see DpExchange.Core.Types.Validate.