Place PF Stop order
POST /frontoffice/api/perpetual/v4/stop-orders
Summary
Use this method to create and submit a new Stop order for Perpetual markets.
Request
Header parameters
accountId required
The trading account identifier.
Body
order object
Order creation data.
order.marketId string
The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.
Must match one of the available markets returned by the Get markets endpoint.
order.side string
The order side, indicating the direction of the trade.
Possible values:
BuySell
order.orderType string
The order type.
Possible values:
MarketLimit
order.timeInForce string
The time-in-force policy for the order, controlling its lifetime.
Possible values:
GtcIocFokGtdDay
order.requestedLotAmount decimal string
The quantity of the base asset to buy or sell, in lots. Lot size is defined per market and determines the base asset quantity represented by one lot. Upon execution, this defines the opened position size in lots.
order.requestedPrice decimal string | nullable
The limit price for Limit orders (the maximum price for a buy or minimum price for a sell).
Must be null or omitted for Market orders.
order.activationPrice decimal string | nullable
The trigger price that activates the Stop order.
order.cancellationDate string | nullable
For GTD orders: The date and time when the order will be automatically canceled if not executed, in the following format: YYYY-MM-DDTHH:MM:SS.sssZ.
Required if timeInForce is set to Gtd; ignored for other time-in-force values.
order.leverage integer
The leverage factor applied to the position. Leverage determines margin required to open and maintain the position (for example, with leverage 10, only 10% of the position's notional value is required as margin).
order.stopLoss object
The Stop loss settings.
order.stopLoss.price decimal string
The Stop loss price.
order.stopLoss.isTrailing boolean
Indicates if the Stop loss is Trailing.
order.takeProfit object
The Take profit settings.
order.takeProfit.price decimal string
The take profit price.
Request example
POST /frontoffice/api/perpetual/v4/stop-orders HTTP/1.1
Host: {host}
Authorization: Bearer JWT
accountId: {accountId}
Content-Type: application/json; x-api-version=4.0
Accept: */*
{
"order": {
"marketId": "perp.btc_usdt",
"side": "Sell",
"orderType": "Market",
"activationPrice": 115000,
"requestedLotAmount": 1,
"timeInForce": "Fok",
"leverage": 22,
"stopLoss": {
"price": "118020",
"isTrailing": true
},
"takeProfit": {
"price": "113873"
}
}
}
Response
In case of success, an object will be returned.
Each object contains the following information:
order object
The created order.
order.orderId string
The unique identifier of the order assigned by the system.
order.status string
The current order status.
Possible values:
WaitingForActivationActivatedRejected
Response example β 200: OK
{
"order": {
"orderId": "01K2MNM0S8B2R9DS7BWJ8PGYPR",
"status": "WaitingForActivation"
}
}
