{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: PlaceOrderParams

Defined in: trade.ts:112

Properties

pool

pool: `0x${string}`

Defined in: trade.ts:114

BinaryPool address.


side

side: BinarySide

Defined in: trade.ts:115


price

price: bigint

Defined in: trade.ts:117

YES limit price as raw collateral units per whole outcome token (price × 10^decimals).


quantity

quantity: bigint

Defined in: trade.ts:119

Outcome-token quantity, raw units.


outcomeToken?

optional outcomeToken?: `0x${string}`

Defined in: trade.ts:122

Outcome-token singleton + this pool's YES/NO ids. Resolved from the pool (IBinaryPool.outcomeToken/yesId/noId) if omitted.


yesId?

optional yesId?: bigint

Defined in: trade.ts:123


noId?

optional noId?: bigint

Defined in: trade.ts:124


collateral?

optional collateral?: `0x${string}`

Defined in: trade.ts:125


expireTimestampNs?

optional expireTimestampNs?: bigint

Defined in: trade.ts:127

Order expiry in ns. Defaults to ~50y (GTC).


orderType?

optional orderType?: number

Defined in: trade.ts:131

OrderBook OrderType (see ORDER_TYPE): 0 NormalOrder (rest), 1 FillOrKill, 2 ImmediateOrCancel, 3 PostOnly. Defaults to 0. A market order is an IOC (2) placed at the price extreme so it crosses immediately and cancels the remainder.


autoApprove?

optional autoApprove?: boolean

Defined in: trade.ts:133

Approve the escrow token to the pool if allowance is short (default true).


builder?

optional builder?: `0x${string}`

Defined in: trade.ts:137

Routing/builder frontend address to attribute the order to. Requires the trader to have opted this builder in via Trader.approveBuilder. Omit (or zero) for no routing fee.


builderFeeBpsTimes1k?

optional builderFeeBpsTimes1k?: bigint

Defined in: trade.ts:140

Per-order builder/routing fee in the pool's native bps×1000 unit (≤ the venue's frozen maxBuilderFee ceiling AND ≤ the trader's approval). 0 = none.


userData?

optional userData?: bigint

Defined in: trade.ts:144

Opaque market-maker bookkeeping tag (v2). Forwarded verbatim to the pool (stored on the order + emitted in OrderPlaced); the SDK never interprets it and the pool no longer uses it for side derivation. Default 0.


gas?

optional gas?: bigint

Defined in: trade.ts:145