Step 1 - subscribe
market echoed back in the subscribed confirmation for these)
Step 2 - render tickers
mini_tickers arrives ~every 1.5s as a single map of market → { lastPrice,
priceChangePercent24h, volume24h }. Replace your view wholesale each frame.
Step 3 - react to listings/status
market_updates frames:
-
type: "listed"—datais the full market object (same shape asGET /v1/markets/{address}). Add the row. -
type: "status_changed"—data = { address, status, reason }wherestatus ∈ {"active","paused","closed"}. Update the row’s badge. -
type: "delisted"—data = { address }. Remove the row.
A market close emits two frames: astatus_changedwithstatus:"closed"and adelisted. Listen todelistedif you only want the terminal “market is gone” signal;status_changedif you track the full active ↔ paused ↔ closed lifecycle.delistedfires only on the close transition.