@somnia-chain/markets-sdk


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

Interface: LiveFundingUpdate

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

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:127

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


pool

pool: string

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

Perp pool (lowercased).


fundingRate

fundingRate: string

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

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


cumulativeFundingPerUnit

cumulativeFundingPerUnit: string

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

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


indexPrice

indexPrice: string

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


markPrice

markPrice: string | null

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

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


intervalsSettled

intervalsSettled: string

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

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


fundingWindowSec

fundingWindowSec: number | null

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

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:141


timestamp

timestamp: string

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


blockNumber

blockNumber: string

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


logIndex

logIndex: number

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

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