v1

latestOpenAPI 3.0.32026-07-267278168.1 KB
Stop Orders

Set Stop Order

Set a stop order for a particular position defined by market and direction. For how stop orders work, see Take profit and stop loss.

post/v1/perps/stop_order

Request body

marketstring required

Perps market

positionDirection'long' | 'short' required

Position direction this stop order watches

type'stopLoss' | 'takeProfit' required

The type of stop order to set

triggerPricestring required

The trigger price

Example request

{
  "market": "AAPL-USD.P",
  "positionDirection": "long",
  "type": "stopLoss",
  "triggerPrice": "9.00"
}

Response

Updated stop orders for the market

successboolean required

Whether the request was successful

errorstring

Error message, present only on failure

error_codestring

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecatedstring

Deprecation notice, if applicable

Example response

{
  "success": true,
  "result": {
    "market": "AAPL-USD.P",
    "positionDirection": "long",
    "stopLoss": "8.00",
    "takeProfit": "9.00"
  }
}