Create Strategy Order
Create a strategy order. Supported strategy types: chaseOrder, twap, iceberg.
Strategy Types
TWAP (Time-Weighted Average Price)
Splits a large order into equal-sized sub-orders executed at fixed time intervals, minimizing market impact and achieving a price close to the time-weighted average.
Execution logic: Number of sub-orders = Running Time (seconds) ÷ Frequency. Sub-orders that fail to fill are retried once; if unsuccessful, they are canceled and the strategy continues.
Please refer to Introduction to TWAP Strategy to get more details.
| Parameter | Constraint |
|---|---|
Total quantity (size) | Must be ≥ Max(MinNotional × subOrders ÷ LastPrice × 1.1, MinSize × subOrders) |
Running time (duration) | 5 minutes – 24 hours |
Sub-order interval (interval) | 5 – 120 seconds |
| Sub-order quantity | ≤ 50% of the exchange's maximum single order size (Perpetual/Futures) |
| Random quantity variance | ±20% if isRandom is enabled |
Chase Order (Chase Limit Order)
Continuously places and adjusts a limit order at the best bid/ask price to track market movements until the order is fully filled, canceled, or reaches the maximum chase distance.
Execution logic: The order price updates every second. All Chase Limit Orders are Post Only by default (maker execution). If the order is rejected by the Post Only condition 5 consecutive times, the strategy is canceled.
Please refer to Chase Limit Order to get more details.
Iceberg Order
Splits a large order into multiple smaller sub-orders that are placed sequentially, revealing only a small portion of the total order size to the market at any one time.
Execution logic: Each sub-order enters the order book → upon fill, the next sub-order is automatically placed → repeats until the full quantity is executed.
Please refer to Iceberg Order to get more details.
Order preferences:
| Preference | Execution behavior |
|---|---|
Chase Limit (Taker) | Buy at Ask1 / Sell at Bid1; prioritizes speed |
Chase Limit | Buy at Bid1 / Sell at Ask1; maker execution |
Chase Limit (offset) | Fixed distance from Ask1/Bid1; balances speed and cost |
Fixed Prices | All sub-orders placed at a single fixed price |
HTTP Request
POST/v5/strategy/createRequest Parameters
- TWAP
- Chase Order
- Iceberg
| Parameter | Required | Type | Comments |
|---|---|---|---|
| category | true | string | Product type. UTA_USDT(USDT Perpetual), UTA_USDC(USDC Perpetual), UTA_SPOT(Spot), UTA_INVERSE(Inverse Perpetual), UTA_INVERSE_FUTURE(Inverse Futures), UTA_USDT_FUTURE(USDT Futures) |
| symbol | true | string | Symbol name, e.g. BTCUSDT |
| side | true | string | Buy, Sell |
| size | false | string | Total order quantity (coin). Either "size" or "positionValue" is needed |
| positionValue | false | string | Total order quantity (value). Either "size" or "positionValue" is needed |
| strategyType | true | string | Strategy type. twap |
| duration | true | integer | Total execution duration in seconds. Range: [300, 86400]. Must be divisible by interval |
| reduceOnly | false | boolean | Reduce-only order, must set true when reducing the position. true, false |
| positionIdx | false | integer | Position index. 0: one-way mode, 1: buy side of hedge mode, 2: sell side of hedge mode. Required for hedge mode |
| leverageType | false | integer | Spot leverage type. 0: normal, 1: borrow to trade (UTA_SPOT only) |
| interval | false | integer | Sub-order placement interval in seconds. 5, 10, 15, 30(default), 60, 120 |
| isRandom | false | boolean | Whether to randomize each sub-order quantity by ±20% |
| triggerPrice | false | string | Advanced settings (Trigger price): Strategy activates when the market price reaches this value |
| maxChasePrice | false | string | Advanced settings (Stop Price): Strategy terminates when the last traded price reaches this value |
| chaseDistance | false | string | Advanced settings - ordertype=Limit (default: market): Price distance from best bid/ask (absolute value), e.g. "0.5". Mutually exclusive with chasePercentE4; chaseDistance takes priority if both are set |
| chasePercentE4 | false | integer | Advanced settings - ordertype=Limit (default: market): Price offset from best bid/ask in basis points (1/10000), e.g. 100 = 1%. Mutually exclusive with chaseDistance |
| Parameter | Required | Type | Comments |
|---|---|---|---|
| category | true | string | Product type. UTA_USDT(USDT Perpetual), UTA_USDC(USDC Perpetual), UTA_SPOT(Spot), UTA_INVERSE(Inverse Perpetual), UTA_INVERSE_FUTURE(Inverse Futures), UTA_USDT_FUTURE(USDT Futures) |
| symbol | true | string | Symbol name, e.g. BTCUSDT |
| side | true | string | Buy, Sell |
| size | false | string | Total order quantity (coin). Either "size" or "positionValue" is needed |
| positionValue | false | string | Total order quantity (value). Either "size" or "positionValue" is needed |
| strategyType | true | string | Strategy type. chaseOrder |
| reduceOnly | false | boolean | Reduce-only order, must set true when reducing the position. true, false |
| positionIdx | false | integer | Position index. 0: one-way mode, 1: buy side of hedge mode, 2: sell side of hedge mode. Required for hedge mode |
| leverageType | false | integer | Spot leverage type. 0: normal, 1: borrow to trade (UTA_SPOT only) |
| chaseDistance | false | string | Price distance from best bid/ask (absolute value), e.g. "0.5". Mutually exclusive with chasePercentE4; chaseDistance takes priority if both are set |
| chasePercentE4 | false | integer | Price offset from best bid/ask in basis points (1/10000), e.g. 100 = 1%, range: [0, 500]. Mutually exclusive with chaseDistance |
| triggerPrice | false | string | Advanced setting (Trigger price): Strategy activates when the market price reaches this value |
| maxChasePrice | false | string | Advanced setting (Max chase price): Stop chasing when the last traded price reaches this value |
| Parameter | Required | Type | Comments |
|---|---|---|---|
| category | true | string | Product type. UTA_USDT(USDT Perpetual), UTA_USDC(USDC Perpetual), UTA_SPOT(Spot), UTA_INVERSE(Inverse Perpetual), UTA_INVERSE_FUTURE(Inverse Futures), UTA_USDT_FUTURE(USDT Futures) |
| symbol | true | string | Symbol name, e.g. BTCUSDT |
| side | true | string | Buy, Sell |
| size | false | string | Total order quantity (coin). Either "size" or "positionValue" is needed |
| positionValue | false | string | Total order quantity (value). Either "size" or "positionValue" is needed |
| strategyType | true | string | Strategy type. iceberg |
| reduceOnly | false | boolean | Reduce-only order, must set true when reducing the position. true, false |
| positionIdx | false | integer | Position index. 0: one-way mode, 1: buy side of hedge mode, 2: sell side of hedge mode. Required for hedge mode |
| leverageType | false | integer | Spot leverage type. 0: normal, 1: borrow to trade (UTA_SPOT only) |
| subSize | false | string | Quantity per sub-order. Mutually exclusive with orderCount; subSize takes priority if both are set |
| orderCount | false | integer | Number of sub-orders. Mutually exclusive with subSize or subPositionValue |
| subPositionValue | false | string | Order value per sub-order. Mutually exclusive with orderCount; subPositionValue takes priority if both are set |
| postOnly | false | integer | Maker-only mode. 0: post-only (maker only), 1: taker allowed |
| maxChasePrice | false | string | Price limit parameter. Buy orders are only placed when the price is at or below this limit and pause if the price rises above it. Sell orders are only placed when the price is at or above this limit and pause if the price falls below it |
| limitPrice | false | string | Order preferences: Limit Price, limit price applied to all sub-orders |
| chaseDistance | false | string | Order preferences: Chase Limit (offset), Price distance from best bid/ask (absolute value), e.g. "0.5". Mutually exclusive with chasePercentE4; chaseDistance takes priority if both are set. Order preferences: Chase Limit (Taker), "-1" means immediate fill at counterparty price |
| chasePercentE4 | false | integer | Order preferences: Chase Limit (offset), Price offset from best bid/ask in basis points (1/10000), e.g. 100 = 1%, range: [0, 100]. Mutually exclusive with chaseDistance |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| strategyId | string | Strategy ID (UUID format) |
| result | string | Execution result. null if creation succeeded |
Request Example
- HTTP
- Python
- Node.js
POST /v5/strategy/create HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1773711467000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"side": "Buy",
"symbol": "BTCUSDT",
"reduceOnly": false,
"category": "UTA_USDT",
"size": "0.1",
"positionIdx": 1,
"strategyType": "chaseOrder",
"chasePrice": "75967.7",
"maxChasePrice": "83564.5",
"triggerPrice": "75000.0"
}
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"strategyId": "119b6211-2611-461b-be5e-5ac557099e82",
"result": null
},
"retExtInfo": {},
"time": 1773711467052
}