Set Trading Stop
Set trade stop.
Header Parameters
- apiKey string
A UTA sub account API key is provided by default
- secret string
A UTA sub account API key is provided by default
- application/json
Request Body
- category string required
Possible values: [
linear
,inverse
]Product type
- symbol string required
Symbol name
- takeProfit string
Take profit price
- stopLoss string
Stop loss price
- tpSize string
Take profit size
- slSize string
Stop loss size
- tpTriggerBy string
Possible values: [
LastPrice
,MarkPrice
,IndexPrice
]Take profit trigger price type
- slTriggerBy string
Possible values: [
LastPrice
,MarkPrice
,IndexPrice
]Stop loss trigger price type
- trailingStop string
Trailing stop
- activePrice string
Trailing stop trigger price
- positionIdx integer required
Possible values: [
0
,1
,2
]Position index. 0=one-way-mode, 1=buy-hedge-mode, 2=sell-hedege-mode. REQUIRED for hedge-mode
- tpLimitPrice string
The limit order price when take profit price is triggered
- slLimitPrice string
The limit order price when stop loss price is triggered
- tpOrderType string
Possible values: [
Market
,Limit
]The order type when take profit is triggered
- slOrderType string
Possible values: [
Market
,Limit
]The order type when stop loss is triggered
- 200
successful operation
POST /v5/position/trading-stop
Request
Request
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/position/trading-stop' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"takeProfit": "1600",
"stopLoss": "1000",
"tpSize": null,
"slSize": null,
"tpTriggerBy": "MarkPrice",
"slTriggerBy": "MarkPrice",
"trailingStop": null,
"activePrice": null,
"positionIdx": 0,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'