PearPear

Take Profit / Stop Loss

Attach take-profit and stop-loss triggers to an open basket.

Arm a close trigger on an open basket with POST /triggers/close (SDK: sdk.core.triggers.close). It rests off-book and closes the position when your take-profit or stop-loss condition is met.

Plan the take-profit and the stop-loss as separate triggers. A condition can be expressed in profit terms or against a price or ratio; the exact threshold schema is in @pear-protocol/types and the API Specification. Cancel a close trigger like any other, with PATCH /triggers/:triggerId/cancel. Fires stream over the WebSocket as trigger.triggered, then position.closed.