@somnia-chain/markets-sdk / index / PriceFeedHealth
Type Alias: PriceFeedHealth
PriceFeedHealth =
"unwatched"|"hydrating"|"hydrated"|"streaming"|"stale"|"error"
Defined in: packages/sdk/src/priceFeed/types.ts:232
Per-asset watch state: "unwatched" (no active watch — live reads return
null/empty), "hydrating" (snapshot/subscribe in progress), "hydrated"
(snapshot ready), "streaming" (both subscriptions delivered valid data),
"stale" (known delivery loss; last values remain), "error" (the server
rejected or terminated this asset's subscription).
Treat "error" as "the data has stopped and will not resume on its own".
Reads keep answering with the last values they held, so a view that renders
them without checking the status shows a frozen price as a live one. The
server sends this for a validation failure (a schema change) or a permission
denial, so it will not heal by itself: stop the watch and start a new one.
Each rejection is also emitted as a warn event on the client's debug
channel (see ClientConfig.debug) with the server payload.