Skip to main content

Spread Order

Subscribe to the order stream to see changes to your orders in real-time.

Topic: spread.order

Response Parameters

ParameterTypeComments
idstringMessage ID
topicstringTopic name
creationTimenumberData created timestamp (ms)
dataarrayObject
> categorystringCategory name, combination, spot_leg, future_leg
> symbolstringCombo or leg's symbol name
> parentOrderIdstringLeg's parent order ID
> orderIdstringCombo or leg's order ID
> orderLinkIdstringCombo's user customised order ID
> sidestringCombo or leg's order side, Buy, Sell
> orderStatusstringCombo or leg's order status
> cancelTypestringCancel type
> rejectReasonstringReject Reason
> timeInForcestringTime in force, GTC, FOK, IOC, PostOnly
> pricestringOrder price
> qtystringOrder qty
> avgPricestringAverage filled price
> leavesQtystringThe remaining qty not executed
> leavesValuestringThe estimated value not executed
> cumExecQtystringCumulative executed order qty
> cumExecValuestringCumulative executed order value
> cumExecFeestringCumulative executed trading fee
> orderTypestringOrder type. Market,Limit
> isLeveragestringAccount-wide, if Spot Margin is enabled, the spot_leg field in the execution message shows 1, combo is "", and future_leg is 0.
> createdTimestringOrder created timestamp (ms)
> updatedTimestringOrder updated timestamp (ms)
> feeCurrencystringTrading fee currency for Spot leg only
> createTypestringOrder create type
> closedPnlstringClosed profit and loss for each close position order

Subscribe Example

{
"op": "subscribe",
"args": [
"spread.order"
]
}

Stream Example

{
"topic": "spread.order",
"id": "1448939_SOLUSDT_28732003549",
"creationTime": 1744170555912,
"data": [
{
"category": "combination",
"symbol": "SOLUSDT_SOL/USDT",
"parentOrderId": "",
"orderId": "aa858ea9-f3a0-40b6-ad57-888d47307345",
"orderLinkId": "",
"side": "Buy",
"orderStatus": "Filled",
"cancelType": "UNKNOWN",
"rejectReason": "EC_NoError",
"timeInForce": "GTC",
"price": "14",
"qty": "2",
"avgPrice": "",
"leavesQty": "0",
"leavesValue": "",
"cumExecQty": "2",
"cumExecValue": "",
"cumExecFee": "",
"orderType": "Limit",
"isLeverage": "",
"createdTime": "1744170534447",
"updatedTime": "1744170555905",
"feeCurrency": "",
"createType": "CreateByUser",
"closedPnl": ""
},
{
"category": "future_leg",
"symbol": "SOLUSDT",
"parentOrderId": "aa858ea9-f3a0-40b6-ad57-888d47307345",
"orderId": "2948d2dc-f8f1-4485-a83d-0bad3dae2c31",
"orderLinkId": "",
"side": "Buy",
"orderStatus": "Filled",
"cancelType": "UNKNOWN",
"rejectReason": "EC_NoError",
"timeInForce": "GTC",
"price": "118.2",
"qty": "2",
"avgPrice": "118.2",
"leavesQty": "0",
"leavesValue": "0",
"cumExecQty": "2",
"cumExecValue": "236.4",
"cumExecFee": "0.01182",
"orderType": "Limit",
"isLeverage": "",
"createdTime": "1744170534447",
"updatedTime": "1744170555910",
"feeCurrency": "",
"createType": "CreateByFutureSpread",
"closedPnl": "0"
}
]
}