Place Order
Place an order.
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
,option
,spot
]Product type
- symbol string required
Symbol name
- isLeverage integer
Possible values: [
0
,1
]Whether to loan, only for spot. 0:No;1:Yes.
- side string required
Possible values: [
Buy
,Sell
] - orderType string required
Possible values: [
Market
,Limit
]Order type
- qty string required
Order qty
- price string
ignore it if Market order
- triggerPrice string
param for StopOrder
- triggerDirection integer
param for StopOrder. 1=rise, 2=fall
- triggerBy string
Possible values: [
LastPrice
,MarkPrice
,IndexPrice
]param for StopOrder
- orderFilter string
Possible values: [
Order
,tpslOrder
,StopOrder
]Default value:
Order
Take profit stop loss, normal order or conditional order. Only valid for spot.
- orderIv string
Implied volatility. param for option order
- timeInForce string
Possible values: [
GTC
,IOC
,FOK
,PostOnly
]Time in force
- positionIdx integer
Possible values: [
0
,1
,2
]0=one-way mode, 1=buy-hedge-mode, 2=sell-hedge-mode
- orderLinkId string
required param for option order
- takeProfit string
Take profit price
- stopLoss string
Stop loss price
- tpTriggerBy string
Possible values: [
LastPrice
,MarkPrice
,IndexPrice
]Trigger take profit price price type
- slTriggerBy string
Possible values: [
LastPrice
,MarkPrice
,IndexPrice
]Trigger stop loss price price type
- reduceOnly boolean
Possible values: [
true
,false
]specify true if a close position order
- closeOnTrigger boolean
Possible values: [
true
,false
]close on trigger
- smpType string
Possible values: [
None
,CancelMaker
,CancelTaker
,CancelBoth
]Smp execution type
- mmp boolean
Possible values: [
true
,false
]market marker protection. for option order
- tpslMode string
Possible values: [
Full
,Partial
]TP/SL 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/order/create
Request
Request
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'
curl -L -X POST 'https://api-testnet.bybit.com/v5/order/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"category": "linear",
"symbol": "ETHUSDT",
"isLeverage": 0,
"side": "Buy",
"orderType": "Limit",
"qty": "1",
"price": "1000",
"triggerPrice": null,
"triggerDirection": null,
"triggerBy": null,
"orderFilter": null,
"orderIv": null,
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "test-xx1",
"takeProfit": null,
"stopLoss": null,
"tpTriggerBy": null,
"slTriggerBy": null,
"reduceOnly": false,
"closeOnTrigger": false,
"smpType": null,
"mmp": null,
"tpslMode": null,
"tpLimitPrice": null,
"slLimitPrice": null,
"tpOrderType": null,
"slOrderType": null
}'