@somnia-chain/markets-sdk


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

Interface: LiveOrder

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

A resting/closed order (mirror of indexer Order).

Properties

id

id: string

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

${pool}_${orderId}


chainId

chainId: number

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

Chain the row came from: the chain of the engine that produced it.

The other identifiers are unique on one chain only, so a caller that merges rows from two engines keys on (chainId, id).


market_id

market_id: string

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

Id of the market the order was placed in. Pools are RECYCLED across markets (never concurrently), so book reads filter on this, not the pool alone.


pool

pool: `0x${string}`

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

Lowercased pool address hosting the order's book.


orderId

orderId: string

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

On-chain order id, unique per pool (decimal string).


owner

owner: `0x${string}`

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

Order owner's address (as emitted — compare case-insensitively).


side

side: BinarySide | undefined

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

Binary outcome side. Undefined on spot orders (spot has no YES/NO).


isBid

isBid: boolean

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

Which side of the book's NATIVE terms the order rests on: true = bid. Native terms are YES terms for binary, quote-per-base for spot.


userData

userData: string

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

Opaque caller bookkeeping from OrderPlaced, carried verbatim (uint256 decimal string) — never decoded; v2 takes the side from BinaryOrderPlaced.kind instead.


price

price: string

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

Limit price in the book's native terms — raw quote/collateral units per whole base/outcome token (decimal string).


fullQuantity

fullQuantity: string

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

Original size at placement — raw base/outcome units (decimal string).


quantityRemaining

quantityRemaining: string

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

Unfilled size still resting — raw base/outcome units (decimal string).


filledQuantity

filledQuantity: string

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

Cumulative size filled so far — raw base/outcome units (decimal string).


expireTimestampNs

expireTimestampNs: string

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

Order expiry as a uint64 nanosecond timestamp (decimal string). GTC orders carry type(uint64).max, so they never expire; the matcher rejects a 0/past expiry at placement, so a resting order always has a real future ns value.


status

status: OrderStatus

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

Lifecycle state (see OrderStatus).


rested

rested: boolean

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

True once OrderRested landed — the order is ON the book. Only rested open orders count toward the materialized book levels.


createdAt

createdAt: string

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

Placement block timestamp — unix seconds (decimal string).


txHash

txHash: string

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

Transaction that placed the order.