@somnia-chain/markets-sdk


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

Function: marketIntervalLabel()

marketIntervalLabel(m): string | null

Defined in: packages/sdk/src/interval.ts:92

The served timeframe label for a binary market: resolve the cadence (resolveIntervalSec), snap off sub-unit noise (snapIntervalSec), then label it (formatIntervalLabel) — so a steady-state market reads as "15m" / "1h" / "4h" / "24h" (a series' bootstrap partial keeps its own short window). Returns null when the market has no determinable cadence (SPOT/PERP). This is what the SDK stamps onto BinaryMarket.interval and trade-history rows.

Parameters

m

IntervalSource

Returns

string | null