@somnia-chain/markets-sdk


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

Interface: OnchainOrder

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

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:577

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


isBid

isBid: boolean

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

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


owner

owner: `0x${string}`

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

The account the order rests for.


userData

userData: bigint

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

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


price

price: bigint

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

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


fullQuantity

fullQuantity: bigint

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

Quantity as originally placed, raw base units.


quantityRemaining

quantityRemaining: bigint

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

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


expireTimestampNs

expireTimestampNs: bigint

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

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