@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / PriceWatchHandle

Interface: PriceWatchHandle

Defined in: packages/sdk/src/priceFeed/priceFeed.ts:41

A live price watch. stop() releases it (idempotent); the underlying subscriptions are shared and torn down when the last handle stops.

Methods

stop()

stop(): void

Defined in: packages/sdk/src/priceFeed/priceFeed.ts:51

Release this handle's reference on the asset's watch (idempotent — extra calls are no-ops). Handles on the same asset share one subscription; stopping the LAST one tears the asset down after a short linger (which absorbs unmount/remount without re-snapshotting): the asset's subscriptions end, its rows are purged, and live price reads for it return null/empty again. The socket is shared by every watched asset on the endpoint; it closes when the last asset on it is torn down.

Returns

void