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

GroupTpSlDesiredSides

The desired take profit and/or stop loss for one child. An omitted side is left entirely untouched.

interface GroupTpSlDesiredSide { /** Trigger price (decimal string), or `""` to clear the side. */ triggerPrice: string; /** Mark vs last-close. Defaults to the child's current price type when omitted. */ priceType?: TpSlPriceType; } interface GroupTpSlDesiredSides { tp?: GroupTpSlDesiredSide; sl?: GroupTpSlDesiredSide; } /** Keyed by `GroupTpSlChild.key`. */ type GroupTpSlDesiredMap = Readonly<Record<string, GroupTpSlDesiredSides>>;

An empty triggerPrice means clear this sideplanGroupTpSl turns that into a delete when the handler holds a live order, and drops it otherwise.

Applying one price across a whole position is a one-liner:

const desired = Object.fromEntries(children.map((child) => [child.key, { tp: { triggerPrice: "150" } }]));
Last updated on