Propr API Position Updates & Mark Price Stream
Summary
Propr announces a change to live position data for API builders: position.opened/updated/closed fire only on state changes and a new global mark.updated stream provides authoritative marks. Builders must cache position/account state and recompute unrealized PnL, equity, liquidation prices, and other metrics client-side using published TypeScript and Python functions. This reduces bandwidth and aligns with exchange patterns.
@Builders
Important change for API builders: position updates + a new mark price stream
We've changed how live position data flows over the WebSocket. If you consume position.* events or render live PnL/equity/liq/drawdown, this affects you. Please read before your next deploy.
What changed
We no longer push a full position update on every market tick. That was too much overhead on both sides, and it's not how exchanges do it. We've moved to the standard pattern:
-
Semi-regular position events.position.opened / position.updated / position.closed now fire on state changes (fills, margin changes, close) — not on every price move. Cache the fields they carry.
-
A new authoritative mark price stream.mark.updated is a global feed (no userId) carrying our internal authoritative mark for every asset that moved, batched at ~4Hz. Everything price-dependent gets derived client-side from this feed plus your cached position/account state.
What you now compute yourself (or via a builder)
Unrealized PnL, notional, ROE, equity, cross wallet, margin ratio, isolated & cross liquidation price, drawdown used, daily-loss used, profit-target %, and breach price. These are pure functions of the latest mark + your cached state. We publish the exact functions our own UI uses (TypeScript and Python) in the docs, so your numbers match the app tick-for-tick.
The pattern
-
Cache state from events, position.opened/.updated (entryPrice, quantity, positionSide, leverage, marginMode, marginUsed, exchange, asset), account.updated (balance, isolatedPositionMargin, highWaterMark), and your challenge/funded config + daily-metrics once over REST.
-
On every mark.updated, update your marks and recompute.
Render. -
Propr still runs the real liquidation and breach checks server-side, your local values are for display.