@somnia-chain/markets-sdk


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

Interface: UnifiedStopOrder

Defined in: packages/sdk/src/unified/structs.ts:173

A stop / take-profit order resting OFF the book on the market's SpotStopOrderRegistry, human units. Fires as a market or limit order when the pool's mark price crosses triggerPrice.

Properties

id

id: string

Defined in: packages/sdk/src/unified/structs.ts:175

Registry order id (decimal string) — pass to SomniaMarkets.cancelStopOrder.


symbol

symbol: string

Defined in: packages/sdk/src/unified/structs.ts:177

The spot tradable the stop targets.


type

type: "market" | "limit"

Defined in: packages/sdk/src/unified/structs.ts:179

Execution style at trigger time.


side

side: "buy" | "sell"

Defined in: packages/sdk/src/unified/structs.ts:181

Direction of the triggered order.


amount

amount: number

Defined in: packages/sdk/src/unified/structs.ts:183

Order size, human base units.


triggerPrice

triggerPrice: number

Defined in: packages/sdk/src/unified/structs.ts:185

Mark price that arms the trigger, human quote units.


triggerDirection

triggerDirection: "above" | "below"

Defined in: packages/sdk/src/unified/structs.ts:187

Which side of the mark the trigger arms on.


price?

optional price?: number

Defined in: packages/sdk/src/unified/structs.ts:189

Limit price of the triggered order (limit stops only), human quote units.


status

status: UnifiedStopOrderStatus

Defined in: packages/sdk/src/unified/structs.ts:191

Lifecycle state — see UnifiedStopOrderStatus.


triggeredOrderId?

optional triggeredOrderId?: string

Defined in: packages/sdk/src/unified/structs.ts:193

The spot order id the trigger produced, once it fired.


timestamp?

optional timestamp?: number

Defined in: packages/sdk/src/unified/structs.ts:195

Creation time (ms).


datetime?

optional datetime?: string

Defined in: packages/sdk/src/unified/structs.ts:197

ISO-8601 of timestamp.


txHash?

optional txHash?: string

Defined in: packages/sdk/src/unified/structs.ts:199

Tx hash of the create, when known (write results only).


info

info: unknown

Defined in: packages/sdk/src/unified/structs.ts:201

The native registry row / write result.