@somnia-chain/markets-sdk


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

Type Alias: BlockActivity

BlockActivity = object

Defined in: packages/sdk/src/activity.ts:633

Everything the protocol traded in one block, grouped by market.

Properties

blockNumber

blockNumber: bigint

Defined in: packages/sdk/src/activity.ts:635

The block, as the caller asked for it.


timestamp

timestamp: bigint

Defined in: packages/sdk/src/activity.ts:637

The block timestamp the reads were anchored on (unix seconds).


markets

markets: BlockMarketActivity[]

Defined in: packages/sdk/src/activity.ts:642

The markets this block touched, in descending order of activity. EMPTY is the normal case: most blocks contain no markets activity at all.


marketsById

marketsById: Record<string, Market>

Defined in: packages/sdk/src/activity.ts:647

Market rows for every id in markets, keyed by lowercased id — so a caller can NAME each group without a lookup per group.


truncated

truncated: boolean

Defined in: packages/sdk/src/activity.ts:656

True when a stream came back exactly limit rows and the block may hold more.

A block's activity is not a bounded set — a busy block can outrun any page — so the cap is reported rather than hidden. Page with offset while this is true; see BlockActivityOptions.