{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: ReduceOrderParams

Defined in: trade.ts:172

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: trade.ts:174

BinaryPool (or SpotPool) address hosting the resting order.


orderId

orderId: string | bigint

Defined in: trade.ts:176

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


newQuantityRemaining

newQuantityRemaining: bigint

Defined in: trade.ts:181

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: trade.ts:182