@somnia-chain/markets-sdk


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

Interface: ReduceOrderParams

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

Shrink a resting order's remaining quantity IN PLACE — keeps its price-time queue priority (unlike Trader.placeOrder + amend, which re-queues at the back). Works on spot AND binary pools: BinaryPool implements the reduce-refund hook, so the freed escrow (collateral for a buy, outcome tokens for a sell) is returned to the owner.

Properties

pool

pool: `0x${string}`

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

BinaryPool (or SpotPool) address hosting the resting order.


orderId

orderId: string | bigint

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

uint128 OrderId of the resting order to shrink (decimal string or bigint).


newQuantityRemaining

newQuantityRemaining: bigint

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

The order's NEW remaining quantity. Must be a lotSize multiple, >= minQuantity, and strictly less than the current remaining. Reverts on-chain (ExpiredOrderMustBeCancelled) if the order has already expired — use Trader.cancelOrder to recover an expired order's funds.


gas?

optional gas?: bigint

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

Gas ceiling for this tx.

Default

TraderConfig.gas (10,000,000)