@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / react / useLivePriceFeedInfo

Function: useLivePriceFeedInfo()

useLivePriceFeedInfo(asset): PriceFeedInfo | null

Defined in: packages/sdk/src/hooks.ts:583

The live feed metadata of one asset — pair symbol, quote, decimals, and the freshness fields (updatedAtMs / sourceUpdatedAtMs / resynced). Watches the feed while mounted.

Note this does NOT re-render as a price ages: a stalled feed pushes nothing, so the store never notifies. Callers rendering an age must drive their own timer (see PriceFeedInfo.updatedAtMs).

Parameters

asset

string | undefined

Returns

PriceFeedInfo | null