@somnia-chain/markets-sdk / index / OrderRow
Type Alias: OrderRow
OrderRow =
OpenOrder&object
Defined in: packages/sdk/src/orders.ts:136
An order row with its lifecycle status + fill progress (from SomniaMarketsClient.getOrders).
Type Declaration
status
status:
OrderStatus
Reconciled lifecycle status (Open/Filled/Cancelled/Expired/Closed).
fullQuantity
fullQuantity:
string
Original order size, raw base/outcome units.
filledQuantity
filledQuantity:
string
Cumulative filled quantity, raw base/outcome units.
rested
rested:
boolean
Whether the order ever rested on the book (an OrderRested fired).
expireTimestampNs
expireTimestampNs:
string
Order expiry as a uint64 nanosecond timestamp (decimal string). There is no GTC
sentinel — the contract treats any future expiry as live, and this SDK writes GTC
as now + 50 years (farFutureNs). The matcher rejects a 0/past expiry at
placement, so "0" is never a live value.
placedTxHash
placedTxHash:
string
Tx hash the order was placed in.
placedAtTimestamp
placedAtTimestamp:
string
Timestamp (unix seconds) the order was placed.
cancelReason
cancelReason:
string|null
WHY the order was cancelled, when the PROTOCOL removed it rather than the owner.
Null for an owner cancel and for orders that were never cancelled — so a
Cancelled status with a null reason means the owner did it.
SelfMatch same-owner match (the CancelMaker path) ExceedsPosition perps guard: the fill would push the maker past maxPositionSize NegativeEquity perps guard: the maker's equity would go negative PreFill the base pre-fill guard fired with no more specific tag
PERP only today; spot pools emit the base cancel without a reason tag.
amendedFromOrderId
amendedFromOrderId:
string|null
Amendment linkage: the order this one REPLACED, and the one that replaced it. Lets an amend chain be followed rather than read as unrelated place/cancel pairs. Both null on an order that was never amended.
amendedToOrderId
amendedToOrderId:
string|null