@somnia-chain/markets-sdk


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

Interface: PlaceSpotOrdersParams

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

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

SpotPool address every order in this batch targets.


orders

orders: SpotOrderRequest[]

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

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


baseDecimals?

optional baseDecimals?: number

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

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

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


baseToken

baseToken: `0x${string}`

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

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


baseIsNative?

optional baseIsNative?: boolean

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

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

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


gas?

optional gas?: bigint

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

Gas ceiling for this tx.

Default

TraderConfig.gas (10,000,000)