{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: PlaceSpotOrderParams

Defined in: trade.ts:219

Properties

pool

pool: `0x${string}`

Defined in: trade.ts:221

SpotPool address.


isBid

isBid: boolean

Defined in: trade.ts:223

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


price

price: bigint

Defined in: trade.ts:226

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

Base quantity, raw base units.


baseDecimals

baseDecimals: number

Defined in: trade.ts:230

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


quoteToken

quoteToken: `0x${string}`

Defined in: trade.ts:232

Quote token (approved on a buy).


baseToken

baseToken: `0x${string}`

Defined in: trade.ts:234

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


baseIsNative?

optional baseIsNative?: boolean

Defined in: trade.ts:236

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


orderType?

optional orderType?: number

Defined in: trade.ts:238

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


autoApprove?

optional autoApprove?: boolean

Defined in: trade.ts:240

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


gas?

optional gas?: bigint

Defined in: trade.ts:241