@somnia-chain/markets-sdk


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

Interface: PlaceSpotOrdersParams

Defined in: packages/sdk/src/trade.ts:543

Inputs to Trader.placeSpotOrders — place several orders on ONE SpotPool in a single transaction.

Properties

pool

pool: `0x${string}`

Defined in: packages/sdk/src/trade.ts:545

SpotPool address every order in this batch targets.


orders

orders: SpotOrderRequest[]

Defined in: packages/sdk/src/trade.ts:547

The orders to place, in the order the results come back.


baseDecimals?

optional baseDecimals?: number

Defined in: packages/sdk/src/trade.ts:554

Base-token decimals. The pool now reports each order's exact funding requirement, so the SDK no longer uses this value.

Deprecated

Retained for source compatibility. New calls can omit it.


quoteToken

quoteToken: `0x${string}`

Defined in: packages/sdk/src/trade.ts:556

Quote token (approved once for the batch's total buy-side escrow).


baseToken

baseToken: `0x${string}`

Defined in: packages/sdk/src/trade.ts:558

Base token (approved once for the batch's total sell-side quantity).


baseIsNative?

optional baseIsNative?: boolean

Defined in: packages/sdk/src/trade.ts:565

True when the base asset is native SOMI. Batch writes are NON-payable, so a native-base sell here funds from the pool's vault balance — pre-deposit native to the vault first (the batch cannot send msg.value, and nothing is approved for a native base).


autoApprove?

optional autoApprove?: boolean

Defined in: packages/sdk/src/trade.ts:567

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


gas?

optional gas?: bigint

Defined in: packages/sdk/src/trade.ts:573

Gas ceiling for this tx.

Default

TraderConfig.gas (10,000,000)