@somnia-chain/markets-sdk


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

Interface: LiveFundingUpdate

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

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

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


pool

pool: string

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

Perp pool (lowercased).


fundingRate

fundingRate: string

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

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


cumulativeFundingPerUnit

cumulativeFundingPerUnit: string

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

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


indexPrice

indexPrice: string

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


markPrice

markPrice: string | null

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

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


intervalsSettled

intervalsSettled: string

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

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


fundingWindowSec

fundingWindowSec: number | null

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

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


timestamp

timestamp: string

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


blockNumber

blockNumber: string

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


logIndex

logIndex: number

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

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