@somnia-chain/markets-sdk


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

Interface: UnifiedFundingRate

Defined in: packages/sdk/src/unified/structs.ts:299

A perp funding-rate snapshot (live chain read; rates are fractions, not %).

Properties

symbol

symbol: string

Defined in: packages/sdk/src/unified/structs.ts:301

The perp's tradable symbol, e.g. "BTC/USDSO:USDSO".


markPrice

markPrice: number | undefined

Defined in: packages/sdk/src/unified/structs.ts:309

Mark price, human quote units.

Undefined when the mark feed is stale — a live read reports that explicitly, and a historical row carries the contract's 0 sentinel, neither of which should be flattened to a price of zero.


indexPrice

indexPrice: number

Defined in: packages/sdk/src/unified/structs.ts:311

Oracle index price, human quote units.


fundingRate

fundingRate: number

Defined in: packages/sdk/src/unified/structs.ts:321

Funding rate per 8 HOURS as a plain fraction (0.0001 = 0.01%).

Normalized to a fixed 8h axis (the Hyperliquid/Binance convention) from the chain's per-calculation-window value, so it stays comparable across a parameter change. NOT the amount charged at each settlement: that is this divided by n = fundingWindowSec / fundingIntervalSec, which is 96 on testnet and expected to be 8 on mainnet. info carries both figures.


fundingTimestamp?

optional fundingTimestamp?: number

Defined in: packages/sdk/src/unified/structs.ts:329

When funding next settles, or when this row settled (ms).

For a live read this is the last settlement anchor plus the settlement interval; because settlement is permissionless and LAZY it can be in the past, which means a settlement is due rather than that anything is wrong.


timestamp

timestamp: number

Defined in: packages/sdk/src/unified/structs.ts:331

When this snapshot was read (ms, local clock).


datetime

datetime: string

Defined in: packages/sdk/src/unified/structs.ts:333

ISO-8601 of timestamp.


info

info: unknown

Defined in: packages/sdk/src/unified/structs.ts:335

The native on-chain perp state (raw 1e18/quote-unit bigints).