@somnia-chain/markets-sdk


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

Variable: CADENCE_TOLERANCE_SEC

const CADENCE_TOLERANCE_SEC: 5 = 5

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

How far a market's window may sit from a ladder rung and still BE that cadence — 5 seconds either side. A rolled market's window is expiry − tradingStart, and trading routinely opens a second or two late, so a 15m market is indexed at 898s or 899s about as often as at 900s. Treating those as their own cadence is what split one series across three groups and made a cadence filter silently miss most of its own markets.

Deliberately ABSOLUTE, not proportional: the jitter is a scheduling delay measured in seconds, so it does not grow with the cadence. A genuinely different window (a 10-minute series, a 52-minute bootstrap partial) stays outside every rung and keeps its own identity.