{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: PlaceSpotOrderParams

Defined in: trade.ts:295

Inputs to Trader.placeSpotOrder — a spot limit or market order on a SpotPool.

Properties

pool

pool: `0x${string}`

Defined in: trade.ts:297

SpotPool address.


isBid

isBid: boolean

Defined in: trade.ts:299

True = buy the base asset (pay quote); false = sell base (pay base/native).


price

price: bigint

Defined in: trade.ts:304

Limit price — raw quote units per whole base token. For a MARKET order pass a crossing price (best opposite level ± slippage); it bounds the escrow.


quantity

quantity: bigint

Defined in: trade.ts:306

Base quantity, raw base units.


baseDecimals

baseDecimals: number

Defined in: trade.ts:308

Base-token decimals (for the buy-side escrow math).


quoteToken

quoteToken: `0x${string}`

Defined in: trade.ts:310

Quote token (approved on a buy).


baseToken

baseToken: `0x${string}`

Defined in: trade.ts:312

Base token (approved on a non-native sell).


baseIsNative?

optional baseIsNative?: boolean

Defined in: trade.ts:314

True when the base asset is native SOMI (sell pays via msg.value).


orderType?

optional orderType?: number

Defined in: trade.ts:316

0 limit (default) or 2 market (IOC). See ORDER_TYPE.


autoApprove?

optional autoApprove?: boolean

Defined in: trade.ts:318

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


gas?

optional gas?: bigint

Defined in: trade.ts:320

Gas ceiling for this tx.

Default Value

TraderConfig.gas (10,000,000)