event | string | Yes | exposure |
msgType | string | Yes | exposure |
topic | string | Yes | exposure |
seq | string | Yes | The stream position, as a decimal string — an int64 a JSON number would truncate. |
seqTs | string | Yes | The stream timestamp, epoch-ns as a decimal string. |
isSnapshot | boolean | Yes | One of true, false. |
snapshotId | string | No | Present on a snapshot part only, and the same on every part of one image; the next image of any topic carries a different one. Opaque — compare it for equality and nothing else. It is not a sequence, a version or a timestamp, and its shape may change; a client that ordered by it would be relying on how a member happens to mint it. Use it to keep two images apart. A repeat subscribe re-pushes the image — that is the resync, and there is no separate op — so a client can start image N+1 while N is still arriving, and without a name on each part it cannot tell which last: true closes which, nor stop a straggling part of N landing in the map N+1 just cleared. Discard any part whose snapshotId is not the one you are currently applying. |
part | integer | No | Present on a snapshot part only; 1-based. |
last | boolean | No | Present on a snapshot part only. The image is complete when true — including for an empty channel, which is still one part. |
data | array of objects | Yes | One account’s exposure in one asset, keyed by (accountId, assetId) — the pair is the upsert key. The same row GET /risk/exposures serves on the HTTP lane, with the names beside the ids. It moves on a business event touching the asset, and when the asset’s rateQuality or unvalued changes (cause VALUATION, causeRef 0) — never on a price move within a rate tier. |
> accountId | integer | Yes | |
> account | string, nullable | Yes | |
> assetId | integer | Yes | |
> asset | string, nullable | Yes | |
> pricedAtNs | string | Yes | When the change the row states happened, epoch-ns. |
> cause | string | Yes | What moved a risk row. MANUAL_ADJUSTMENT is a hand-made correction of the account’s books applied (since 4.5.0), causeRef its id. Append-only: read an unknown value as UNKNOWN. One of UNKNOWN, FILL, BUST, CORRECTION, ATTRIBUTION, MANUAL_ADJUSTMENT, ORDER_EVENT, VALUATION, BALANCE, FUNDING, LIMIT, SNAPSHOT, POSITION_TRANSFER, FORCE_FLATTEN, BOOK_DELETED. |
> causeRef | string | Yes | The execution, adjustment or balance behind the cause; “0” when none. |
> actualExposure | string | Yes | The account’s filled exposure to the asset in its own units, signed: the holding plus every derivative position’s leg in it, at the scale it was stated — never finer than the asset’s unit scale (eight places for an asset without one). |
> inventoryQty | string | Yes | What the account holds of the asset: the venue’s last restated balance plus the account’s own fills since, at the same scale rule as actualExposure. |
> costBasisUsd | string, nullable | Yes | What the holding cost in USD; null for a cash asset (USD, USD stablecoins). |
> realizedPnlUsd | string, nullable | Yes | Cumulative realized PnL in USD on the holding, against its average cost; null for a cash asset. |
> rateQuality | string | Yes | A USD rate’s tier: PRIMARY (current), LKG_FRESH and LKG_STALE (a last-known rate up to 60 s and 10 min old), MISSING. Append-only: read an unknown value as UNKNOWN. One of UNKNOWN, PRIMARY, LKG_FRESH, LKG_STALE, MISSING. |
> unvalued | boolean | Yes | True when the asset has no USD rate and nothing open depends on it: it is left out of NLV and of every leverage figure. |