@somnia-chain/markets-sdk


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

Type Alias: BinaryMarketCountOptions

BinaryMarketCountOptions = BinaryMarketFilter & object

Defined in: packages/sdk/src/markets.ts:1181

Options for countBinaryMarkets / countBinaryMarketsBounded — the BinaryMarketFilter plus an optional lifecycle phase and a now override.

Type Declaration

phase?

optional phase?: "live" | "past"

Lifecycle phase to count: "live" = expiry > now, "past" = expiry <= now. OMITTED counts across both — every binary market the filter matches, whatever its expiry. Omit it for a count keyed on something other than expiry, such as BinaryMarketFilter.resolvedSince, so an early void is not dropped by a phase it is not in yet.

nowSec?

optional nowSec?: number

Override "now" (unix seconds) for the phase cut; defaults to Date.now().