@somnia-chain/markets-sdk


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

Type Alias: FillsOptions

FillsOptions = object

Defined in: packages/sdk/src/fills.ts:37

Options for SomniaMarketsClient.getFills / SomniaMarketsClient.getUserFills. All optional.

Properties

limit?

optional limit?: number

Defined in: packages/sdk/src/fills.ts:39

Max rows (default 50).


offset?

optional offset?: number

Defined in: packages/sdk/src/fills.ts:41

Row offset for paging the tape (default 0).


since?

optional since?: number

Defined in: packages/sdk/src/fills.ts:43

Only fills at/after this unix-seconds timestamp.


until?

optional until?: number

Defined in: packages/sdk/src/fills.ts:45

Only fills at/before this unix-seconds timestamp.


sinceBlock?

optional sinceBlock?: number | bigint

Defined in: packages/sdk/src/fills.ts:59

Only fills from this block onwards (Fill.blockNumber), inclusive.

The exact resume bound a reader wants after processing up to a known block: two blocks can share a timestamp, so a since bound in seconds either repeats or skips those rows. Accepts the bigint a transaction receipt carries.

On these pool- and account-scoped reads the bound is a filter, not an access path: the plan rides the pool or account index and tests the block. SomniaMarketsClient.getFillsPage is the read that has an index behind the range itself.


toBlock?

optional toBlock?: number | bigint

Defined in: packages/sdk/src/fills.ts:68

Only fills up to this block (Fill.blockNumber), inclusive.

The upper half of FillsOptions.sinceBlock, and inclusive for the same reason: a reader that walks the chain in ranges wants the boundary to be exact and repeatable, so [a, b] followed by [b + 1, c] covers every fill exactly once. Supplying it alone bounds the tape from above only.