subscribe_unrealized_pnl, and the unrealizedPnlProjectionChanged payload that subscription delivers.
Subscribing to unrealized PnL updates
Subscribe to invalidation hints for the live Unrealized PnL leaderboards by emittingsubscribe_unrealized_pnl. No authentication required. Two scopes are available: one leaderboard per open market, and a global biggest-open-positions list.
unsubscribe_unrealized_pnl with the same payload shape.
At most 50
MARKET scopes per connection. Additional subscribe_unrealized_pnl calls with new marketIds beyond the limit are rejected with an error frame carrying code: "UNREALIZED_PNL_SCOPE_LIMIT". The BIGGEST_POSITIONS scope does not count against the market limit.state on the hint tracks the projection. state: "READY" means the leaderboard you refetch will be current; BUILDING, STALE, or DEGRADED mean the REST route may return an empty or stale snapshot. Retry shortly.Event payload
unrealizedPnlProjectionChanged
Invalidation hint delivered to subscribe_unrealized_pnl subscribers when the underlying projection for their scope changes. It does not carry the leaderboard rows. Refetch the matching REST route to get the updated snapshot.
Market scope:
Related
- WebSocket overview: connection details, handshake authentication, and the full event reference