@somnia-chain/markets-sdk


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

Interface: OnchainOrder

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

One resting order exactly as the pool holds it — raw units, bigint fields.

Order ids are unique per POOL, not globally: always carry the pool alongside the id.

Properties

orderId

orderId: bigint

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

The pool's order id (OrderId, a uint128).


isBid

isBid: boolean

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

True for a bid (buy), false for an ask (sell).


owner

owner: `0x${string}`

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

The account the order rests for.


userData

userData: bigint

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

Caller-supplied tag echoed back by the book; 0 when unused.


price

price: bigint

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

Limit price, raw quote/collateral units per whole base unit.


fullQuantity

fullQuantity: bigint

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

Quantity as originally placed, raw base units.


quantityRemaining

quantityRemaining: bigint

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

Quantity still resting, raw base units — what a cancel would return.


expireTimestampNs

expireTimestampNs: bigint

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

Expiry as a UNIX timestamp in NANOseconds; 0 means no expiry.