@somnia-chain/markets-sdk


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

Interface: PerpFeedStatus

Defined in: packages/sdk/src/perp/state.ts:263

Whether a perp pool's MARK feed is live, and how much open interest is riding on it.

Properties

markPriceOk

markPriceOk: boolean

Defined in: packages/sdk/src/perp/state.ts:269

The pool's OWN verdict on its mark feed, from tryGetMarkPrice. Never re-derive it by comparing a timestamp: the staleness bound lives on FundingParametersEpoch per pool and moves per epoch, so an outside comparison can disagree with the pool.


markPrice

markPrice: bigint

Defined in: packages/sdk/src/perp/state.ts:275

The mark itself, because markPriceOk is not the whole verdict: a feed can report ok and hand back 0, and a zero mark is never a real price for a live perp. Treat markPriceOk && markPrice > 0n as live — the same test perpMarkForPnl makes.


openInterest

openInterest: bigint

Defined in: packages/sdk/src/perp/state.ts:278

Total open interest in base units. What makes a stale mark dangerous rather than merely untidy: margin and liquidation prices are struck against the mark.


indexUpdatedAt?

optional indexUpdatedAt?: bigint

Defined in: packages/sdk/src/perp/state.ts:287

The INDEX oracle's timestamp (epoch seconds) — a DIFFERENT feed from the mark, so it corroborates a verdict rather than dating it.

undefined when that leg reverted, which is the case this read exists to survive: it is diagnostic, and it must never take the verdict down with it. See the note on client.getPerpFeedStatus.