@somnia-chain/markets-sdk


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

Type Alias: FillRow

FillRow = object

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

One fill as the indexer recorded it (mirror of the unified Fill entity — spot, perp and binary fills share it).

Properties

blockNumber?

optional blockNumber?: string

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

Source block as an exact decimal string. SDK reads populate it; caller-built rows may omit it.


logIndex?

optional logIndex?: number

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

Source log position. SDK reads populate it; caller-built rows may omit it.


id

id: string

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

Fill id (${blockNumber}_${logIndex}).


market

market: string

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

The market's bytes32 marketId — the STABLE identity of the market this fill executed in.

Group and label by this, never by pool alone: a binary pool is recycled across successive markets, so fills from a pool's earlier life carry the same pool address as the market currently on it. On SPOT/PERP the pool address IS the market id. Pass it to client.getMarket for the full row.


pool

pool: string

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

Lowercased pool address the fill executed on. A TIME-VARYING binding — see market for the identity that does not move.


fillPrice

fillPrice: string

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

Execution price, raw quote units per whole base (binary: YES-probability scale). SPOT/PERP: the maker's limit price.


quantity

quantity: string

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

Base/outcome-token quantity filled, raw units.


quoteQuantity

quoteQuantity: string

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

Quote/collateral value = quantity × fillPrice / 10^baseDecimals (raw, floored).


maker

maker: string | null

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

Maker (resting) wallet, lowercased; null when unknown.


makerSide

makerSide: BinarySide | null

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

BINARY only — the maker's YES/NO side; null on SPOT/PERP.


taker

taker: string | null

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

Taker wallet, lowercased. Denormalized from the taker's OrderPlaced (which fires after the fill in the same tx) — null until that bridge lands.


takerSide

takerSide: BinarySide | null

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

BINARY only — the taker's YES/NO side; null on SPOT/PERP or until the taker's OrderPlaced is bridged.


kind

kind: BinaryFillKind | null

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

BINARY only — how the fill settled (direct trade vs mint/burn of a pair); null on SPOT/PERP or until the taker side is known.


takerIsBid

takerIsBid: boolean | null

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

True when the taker bought the base/YES (the maker was the ask); null until the taker side is known.


takerOrder

takerOrder: { owner: string; side: BinarySide | null; } | null

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

The taker's ORDER (owner + side), when the indexer has it.

Prefer takerOrder.side over FillRow.takerSide on binary: the latter is a denormalized copy the taker bridge backfills, so it lags and can be null on a row that already names its taker.


makerOrderId

makerOrderId: string

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

uint128 id of the resting (maker) order, decimal string.


takerOrderId

takerOrderId: string

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

uint128 id of the aggressing (taker) order, decimal string.


takerRemainingQuantity

takerRemainingQuantity: string

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

The taker order's unfilled remainder AFTER this fill, raw base/outcome units. "0" means this fill completed the order.

The chain's own number, as OrderFilled carries it — so a caller reconciling partial fills from the tape sees exactly what an event subscriber sees, without re-deriving it from the running quantity.


makerRemainingQuantity

makerRemainingQuantity: string

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

The maker order's unfilled remainder AFTER this fill, on the same terms as FillRow.takerRemainingQuantity.


timestamp

timestamp: string

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

Timestamp (unix seconds) of the fill.


txHash

txHash: string

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

Tx hash the fill landed in.