Set a stop-loss
set_stop_lossProtect an open perp position by placing an exchange-held stop-loss that closes the whole position at market when triggerPrice is reached. Replaces prior stops and logs your reason.
Instructions
Protect an open position with a stop-loss held on the exchange: once the price reaches triggerPrice, the whole position is closed at market, whether or not you are running at the time. Replaces any stop already on that symbol. Below the market for a long, above it for a short. Logged with your reason, like an order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why this level: what would have to happen for your view to be wrong, in one or two sentences. A human will read this later. | |
| symbol | Yes | Perp symbol with an open position, for example ETH. | |
| triggerPrice | Yes | Price at which the position is closed. |