@somnia-chain/markets-sdk


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

Interface: OnchainOrder

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

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

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


isBid

isBid: boolean

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

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


owner

owner: `0x${string}`

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

The account the order rests for.


userData

userData: bigint

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

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


price

price: bigint

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

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


fullQuantity

fullQuantity: bigint

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

Quantity as originally placed, raw base units.


quantityRemaining

quantityRemaining: bigint

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

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


expireTimestampNs

expireTimestampNs: bigint

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

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