@somnia-chain/markets-sdk


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

Interface: LiveFill

Defined in: packages/sdk/src/store.ts:192

One fill in the live store, with indexer-compatible identifiers and raw units.

Details

Binary-side fields are enriched from the related live orders. Spot fills leave the binary-only fields undefined.

Gotchas

A just-received fill can temporarily omit maker, taker, or side data because the related order event can arrive later in the same transaction.

Properties

id

id: string

Defined in: packages/sdk/src/store.ts:194

${blockNumber}_${logIndex} — matches the indexer Fill id


market_id

market_id: string

Defined in: packages/sdk/src/store.ts:196

Id of the market the fill executed in (Hasura FK naming; joins LiveMarket).


pool

pool: `0x${string}`

Defined in: packages/sdk/src/store.ts:198

lowercased pool address (the log source)


taker

taker: `0x${string}` | undefined

Defined in: packages/sdk/src/store.ts:204

Taker info is unresolved at OrderFilled emission time (the taker's OrderPlaced fires AFTER the fill in the same tx). Resolved via the takerOrder_id foreign key — enrichFill back-joins to LiveOrder.


maker

maker: `0x${string}` | undefined

Defined in: packages/sdk/src/store.ts:209

Maker's address. Undefined until the maker's resting order is known — set when it was witnessed live, else back-joined from the order row via makerOrder_id.


takerSide

takerSide: BinarySide | undefined

Defined in: packages/sdk/src/store.ts:214

Taker's outcome side. Undefined on spot fills, and on binary fills until the taker order is joined (see taker).


makerSide

makerSide: BinarySide | undefined

Defined in: packages/sdk/src/store.ts:219

Maker's outcome side. Undefined on spot fills, and until the maker order is joined (see maker).


kind

kind: BinaryFillKind | undefined

Defined in: packages/sdk/src/store.ts:224

How the fill settled (see BinaryFillKind). Undefined on spot fills, and on binary fills until BOTH sides are joined (classification needs both).


takerIsBid

takerIsBid: boolean | undefined

Defined in: packages/sdk/src/store.ts:232

True when the taker bought the base/YES (the maker was the ask) — the tape's aggressor direction, valid on every market kind. Seeded from the indexer row on snapshot fills; on live fills derived at OrderFilled from the maker's resting side (undefined only when the maker order was never witnessed, until enrichFill joins the taker's OrderPlaced).


takerOrder_id

takerOrder_id: string

Defined in: packages/sdk/src/store.ts:234

Foreign keys to LiveOrder rows for join-side recovery.


makerOrder_id

makerOrder_id: string

Defined in: packages/sdk/src/store.ts:236

Maker-side counterpart of takerOrder_id (a LiveOrder key).


fillPrice

fillPrice: string

Defined in: packages/sdk/src/store.ts:238

Raw quote/collateral units per whole base/outcome token.


quantity

quantity: string

Defined in: packages/sdk/src/store.ts:243

Base/outcome tokens exchanged — raw units scaled by the market's baseDecimals (decimal string).


quoteQuantity

quoteQuantity: string

Defined in: packages/sdk/src/store.ts:245

quote value = quantity * fillPrice / 10^baseDecimals


takerRemainingQuantity

takerRemainingQuantity: string

Defined in: packages/sdk/src/store.ts:247

Taker order's unfilled size after this fill — raw base/outcome units (decimal string).


makerRemainingQuantity

makerRemainingQuantity: string

Defined in: packages/sdk/src/store.ts:249

Maker order's unfilled size after this fill — raw base/outcome units (decimal string).


timestamp

timestamp: string

Defined in: packages/sdk/src/store.ts:251

Block timestamp of the fill — unix seconds (decimal string).


blockNumber

blockNumber: number

Defined in: packages/sdk/src/store.ts:253

Block the fill landed in.


logIndex

logIndex: number

Defined in: packages/sdk/src/store.ts:255

Log index within the block — with blockNumber, the fill's tape position.


txHash

txHash: string

Defined in: packages/sdk/src/store.ts:257

Transaction that produced the fill.