跳至主要内容

訂單

訂閱價差交易訂單推送

Topic: spread.order

響應參數

參數類型說明
idstring消息ID
topicstringTopic名
creationTimenumber消息數據創建時間 (ms)
dataarray<object>
> categorystring組合或單腿類型, combination: 組合, spot_leg: 現貨單腿, future_leg: 合約單腿
> symbolstring組合或單腿的合約名稱
> parentOrderIdstring單腿訂單的所屬組合訂單ID
> orderIdstring組合或單腿的訂單ID
> orderLinkIdstring組合單的用戶自定義ID
> sidestring組合或單腿的訂單方向, Buy, Sell
> orderStatusstring組合或單腿的訂單狀態
> cancelTypestring訂單被取消類型
> rejectReasonstring拒絕原因
> timeInForcestring執行策略, GTC, FOK, IOC, PostOnly
> pricestring訂單價格
> qtystring訂單數量
> avgPricestring平均成交價格
> leavesQtystring訂單剩餘未成交的數量
> leavesValuestring訂單剩餘未成交的價值
> cumExecQtystring訂單累計成交數量
> cumExecValuestring訂單累計成交價值
> cumExecFeestring訂單累計成交的手續費
> orderTypestring訂單類型. Market,Limit
> isLeveragestring帳戶維度, 如果現貨槓桿打開了, 那麼對於category=spot_leg, 該字段暫時為1, 組合總是"", category=future_leg總是"0"
> createdTimestring創建訂單的時間戳 (毫秒)
> updatedTimestring訂單更新的時間戳 (毫秒)
> feeCurrencystring手續費幣種, 僅適用於現貨單腿訂單
> createTypestring訂單創建類型
> closedPnlstring平倉單盈虧, 部分平倉時, 減去了平攤的開倉手續費和期間產生的資金費以及平倉手續費

訂閱示例

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

推送示例

{
"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"
}
]
}