Skip to main content

Strategy

Subscribe to the strategy stream to get the strategy (twap / iceberg / ChaseOrder) feeds.

Topic: strategy

Response Parameters

ParameterTypeComments
idstringMessage ID
topicstringTopic name
creationTimenumberData created timestamp (ms)
dataarrayObject
> strategyIdstringStrategy ID
> strategyTypestringStrategy type. twap, chaseOrder, iceberg
> categorystringProduct type. UTA_USDT, UTA_USDC, UTA_USDC_FUTURE, UTA_SPOT, UTA_INVERSE, UTA_INVERSE_FUTURE, UTA_USDT_FUTURE
> symbolstringSymbol name
> sizestringTotal strategy quantity
> sidestringBuy, Sell
> durationintegerExecution duration in seconds. TWAP strategy only
> statusintegerStrategy status. 2: running, 3: terminated, 4: terminated but orders are not filled, 5: paused, 6: not yet triggered
> terminateTypeintegerTermination type. 0: not terminated, 1: user stopped, 2: completed normally, 3: insufficient balance. Refer to terminateType enum
> terminateRemarkstringTermination reason description
> executedDurationintegerElapsed execution duration
> executedSizestringExecuted quantity
> executedAvgPricestringAverage execution price
> executedStartTimeE3integerExecution start time (ms)
> executedEndTimeE3integerExecution end time (ms). 0 means not yet ended
> createdTimeE3integerStrategy creation time (ms)
> updatedTimeE3integerStrategy last updated time (ms)
> isRandombooleanWhether to randomize order quantity. TWAP strategy only
> reduceOnlybooleanReduce-only
> limitPricestringFixed limit price
> triggerCountintegerTrigger count (number of times strategy executed)
> tradingCountintegerTrading count (number of orders placed)
> chaseDistancestringChase distance (absolute value). Chase / Iceberg strategy
> ChasePercentE4integerChase percentage in basis points. e.g. 100 = 1%. Chase / Iceberg strategy
> maxChasePricestringMax chase price protection. Chase / Iceberg strategy
> chaseOrderPricestringCurrent chase order price. Chase strategy only
> strategyPreferstringStrategy preference. limit: fixed price, priceSpeedBalance: balanced, fastestExecution: fastest execution, quickExecution: quick execution
> intervalintegerOrder interval in seconds. TWAP strategy only
> leverageTypeintegerLeverage type. 0: normal, 1: margin (spot only)
> postOnlyintegerPost-only. 0: non-post-only, 1: post-only. Iceberg strategy only
> triggerPricestringTrigger price. Strategy starts executing when this price is reached
> isTriggeredbooleanWhether the strategy has been triggered
> strategyTpstringStrategy take-profit price
> strategySlstringStrategy stop-loss price
> orderTypestringOrder type. 1: market order, 2: limit order
> orderPriceOffsetstringLimit order price offset percentage
> positionValuestringTotal strategy value. Returned for value-based orders, otherwise empty string
> filledPositionValuestringFilled position value

Subscribe Example

{
"op": "subscribe",
"args": [
"strategy"
]
}

Stream Example

{
"id": "62f79ebea4794f767cad0bd937f7ad01",
"topic": "strategy",
"creationTime": 1776734985598,
"data": [
{
"strategyId": "cf7303ae-29c0-480a-8f3d-eaa9330054bc",
"strategyType": "iceberg",
"category": "UTA_USDT",
"symbol": "BTCUSDT",
"size": "0.36",
"side": "Buy",
"duration": 0,
"status": 3,
"terminateType": 2,
"terminateRemark": "RunningStop",
"executedDuration": 268,
"executedSize": "0.36",
"executedAvgPrice": "134301.53",
"executedStartTimeE3": 1776734716717,
"executedEndTimeE3": 1776734985592,
"createdTimeE3": 1776734716717,
"updatedTimeE3": 1776734985592,
"isRandom": false,
"reduceOnly": false,
"limitPrice": "",
"triggerCount": 0,
"tradingCount": 0,
"chaseDistance": "0",
"ChasePercentE4": 0,
"maxChasePrice": "198000",
"chaseOrderPrice": "135682.4",
"strategyPrefer": "quickExecution",
"interval": 30,
"leverageType": 0,
"postOnly": 0,
"triggerPrice": "",
"isTriggered": false,
"strategyTp": "",
"strategySl": "",
"orderType": "UNKNOWN",
"orderPriceOffset": "",
"positionValue": "",
"filledPositionValue": ""
}
]
}