@somnia-chain/markets-sdk


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

Type Alias: SweepableOrder

SweepableOrder = object

Defined in: packages/sdk/src/orders.ts:907

A resting order that is PAST ITS EXPIRY but has not been cleaned off the book — the target of a permissionless sweep.

Carries exactly what the two sweep verbs need: orderId for SomniaMarketsClient.createTrader's cancelExpiredOrders, and isBid + price for sweepExpiredAtLevel.

Properties

id

id: string

Defined in: packages/sdk/src/orders.ts:909

Row id (${pool}_${orderId}).


orderId

orderId: string

Defined in: packages/sdk/src/orders.ts:911

uint128 OrderId as a decimal string — pass to cancelExpiredOrders.


market

market: string

Defined in: packages/sdk/src/orders.ts:920

The market's bytes32 marketId — the market this order rests on, stably.

A sweepable order is by definition still RESTING, and a pool's book is emptied before the pool is recycled, so this read cannot be mislabelled the way order HISTORY can. It is carried anyway so all three order reads name a market the same way.


marketInfo

marketInfo: OrderMarket | null

Defined in: packages/sdk/src/orders.ts:922

The market's labelling context. Null only if the indexer has no market row.


pool

pool: string

Defined in: packages/sdk/src/orders.ts:924

The pool the order rests on (lowercased). A time-varying binding — see market.


marketType

marketType: MarketType

Defined in: packages/sdk/src/orders.ts:926

Which market kind the pool is — sweeping works the same on all of them.


owner

owner: string

Defined in: packages/sdk/src/orders.ts:928

The order's owner (lowercased).


isBid

isBid: boolean

Defined in: packages/sdk/src/orders.ts:930

True = bid side, false = ask — pass to sweepExpiredAtLevel.


price

price: string

Defined in: packages/sdk/src/orders.ts:932

The exact price level, raw pool units — pass to sweepExpiredAtLevel.


quantityRemaining

quantityRemaining: string

Defined in: packages/sdk/src/orders.ts:934

Unfilled remainder that would be released, raw base/outcome units.


expireTimestampNs

expireTimestampNs: string

Defined in: packages/sdk/src/orders.ts:936

Expiry as a uint64 NANOsecond timestamp (decimal string).


placedAtTimestamp

placedAtTimestamp: string

Defined in: packages/sdk/src/orders.ts:938

Timestamp (unix seconds) the order was placed.