@somnia-chain/markets-sdk


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

Interface: LiveFundingUpdate

Defined in: packages/sdk/src/store.ts:263

A funding settlement observed by the live tail, shaped to splice onto the indexed FundingRateUpdate series.

Deliberately NOT the full indexed row. The tail sees only what FundingUpdated carries, and two of the indexed fields are DERIVED from state the tail does not have: intervalsAccrued needs n from the funding-parameters epoch series, and the covered span needs the settlement anchor. Rather than guess them, they are absent here and arrive with the indexed row a moment later.

Properties

id

id: string

Defined in: packages/sdk/src/store.ts:265

${pool}_${blockNumber}_${logIndex} — matches the indexer FundingRateUpdate id.


chainId

chainId: number

Defined in: packages/sdk/src/store.ts:272

Chain the row came from: the chain of the engine that produced it.

The other identifiers are unique on one chain only, so a caller that merges rows from two engines keys on (chainId, id).


pool

pool: string

Defined in: packages/sdk/src/store.ts:274

Perp pool (lowercased).


fundingRate

fundingRate: string

Defined in: packages/sdk/src/store.ts:276

Per-CALCULATION-WINDOW rate, 1e18-scaled, signed. Normalize with fundingWindowSec.


cumulativeFundingPerUnit

cumulativeFundingPerUnit: string

Defined in: packages/sdk/src/store.ts:278

Cumulative index AFTER this settlement (1e18 x quote per whole base, signed).


indexPrice

indexPrice: string

Defined in: packages/sdk/src/store.ts:279


markPrice

markPrice: string | null

Defined in: packages/sdk/src/store.ts:281

Null when the event's 0 sentinel fired for a stale mark feed.


intervalsSettled

intervalsSettled: string

Defined in: packages/sdk/src/store.ts:283

UNCLAMPED interval span, as emitted. Accrual is capped at n = window / interval.


fundingWindowSec

fundingWindowSec: number | null

Defined in: packages/sdk/src/store.ts:285

Params as last known for the market; null before the first indexed funding row.


fundingIntervalSec

fundingIntervalSec: number | null

Defined in: packages/sdk/src/store.ts:286


timestamp

timestamp: string

Defined in: packages/sdk/src/store.ts:287


blockNumber

blockNumber: string

Defined in: packages/sdk/src/store.ts:288


logIndex

logIndex: number

Defined in: packages/sdk/src/store.ts:290

Log index within the block — with blockNumber, the settlement's position in the series.