Stop Orders
Set Stop Order
Changed onSet a stop order for a particular position defined by market and direction. Optionally pass builderCode to attribute the eventual triggered close to a builder for commission. For how stop orders work, see Take profit and stop loss.
post/v1/perps/stop_order
Request
- Base URLhttps://api.ondoperps.xyz
- URLhttps://api.ondoperps.xyz/v1/perps/stop_order
- Auth
- HTTP bearer
- or API key in header ONDO-KEY-ID
Request body
Example request
{
"market": "AAPL-USD.P",
"positionDirection": "long",
"type": "stopLoss",
"triggerPrice": "9.00",
"quantity": "0.5",
"builderCode": {
"code": "yourCode",
"feeRateBps": 5,
"feeRateBpsFractional": 2.5
}
}Response
Updated stop orders for the market
Example response
{
"success": true,
"result": {
"market": "AAPL-USD.P",
"positionDirection": "long",
"stopLoss": "8.00",
"takeProfit": "9.00"
}
}Changes
- info
added the new optional request property
- info
added the new optional request property
- info