Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreTP/SLGroupTpSlAction

GroupTpSlAction

What planGroupTpSl decided for one child. A discriminated union on action.

type GroupTpSlAction = | { action: "set"; key: string; quoteId: bigint; virtualAccount: Address; symbolId: bigint; positionType: PositionType; /** Decimal string, from the child's `openQuantity`. */ quantity: string; /** Present only when the take-profit side actually changed. */ tp?: SetTpSlSide; /** Present only when the stop-loss side actually changed. */ sl?: SetTpSlSide; } | { action: "delete"; key: string; quoteId: bigint; virtualAccount: Address; cohQuoteId: string; conditionalOrderType: TpSlConditionalOrderType; } | { action: "skip"; key: string; reason: GroupTpSlSkipReason; /** Per-side errors, when `reason` is `"invalid"`. */ validation?: TpSlValidation; };

A set action is shaped to spread straight into setQuoteTpSl — add subAccount and pricePrecision and it is a complete call.

Skip reasons

unchangedGroupTpSlSkipReason

Every desired side already matches the child’s confirmed snapshot.

nothing-to-doGroupTpSlSkipReason

The child has no desired entry, or nothing to write and nothing to remove.

not-anchoredGroupTpSlSkipReason

Not anchored on-chain yet, or no Virtual Account resolved.

no-open-quantityGroupTpSlSkipReason

No open size left to attach a conditional order to.

invalidGroupTpSlSkipReason

The resulting pair failed validateTpSl.

Last updated on