跳至主要内容

個人成交

訂閱價差交易發生的成交

Topic: spread.execution

響應參數

參數類型說明
idstring消息ID
topicstringTopic名
creationTimenumber消息數據創建時間 (ms)
dataarray<object>
> categorystring組合或單腿類型, combination: 組合, spot_leg: 現貨單腿, future_leg: 合約單腿
> symbolstring組合或單腿的合約名稱
> isLeveragestring帳戶維度, 如果現貨槓桿打開了, 那麼對於category=spot_leg, 該字段暫時為1, 組合總是"", category=future_leg總是"0"
> orderIdstring組合訂單ID, 單腿展示""
> orderLinkIdstring組合訂單IDD, 單腿展示""
> sidestring組合或單腿訂單方向. Buy,Sell
> orderPricestring組合或單腿的訂單價格
> orderQtystring組合或單腿的訂單數量
> leavesQtystring剩餘未成交數量
> createTypestring訂單創建類型
> orderTypestring訂單類型. Market,Limit
> execFeestring手續費, 組合暫時為""
> parentExecIdstring單腿的母成交ID, 即對應組合的成交ID, 組合暫時""
> execIdstring成交ID
> execPricestring成交價格
> execQtystring成交數量
> execPnlstring每筆平倉成交的盈虧, 僅合約單腿成交有效
> execTypestring成交類型, 組合總是Trade
> execValuestring成交價值, 僅適用於單腿成交
> execTimestring成交時間(ms)
> isMakerboolean是否是maker成交. true: maker, false: taker
> feeRatestring手續費率, 僅適用於單腿成交
> markPricestring成交執行時, 該 symbol 當時的標記價格, markPrice
> closedSizestring平倉數量, 僅適用於單腿成交
> seqlong序列號, 用於關聯成交和倉位的更新

訂閱示例

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

推送示例

// Combo execution
{
"topic": "spread.execution",
"id": "cvqes8141ilt347i9l20",
"creationTime": 1744104992226,
"data": [
{
"category": "combination",
"symbol": "SOLUSDT_SOL/USDT",
"closedSize": "",
"execFee": "",
"execId": "82c82077-0caa-5304-894d-58a50a342bd7",
"parentExecId": "",
"execPrice": "20.9848",
"execQty": "2",
"execType": "Trade",
"execValue": "",
"feeRate": "",
"markPrice": "",
"leavesQty": "0",
"orderId": "5e010c35-2b44-4f03-8081-8fa31fb73376",
"orderLinkId": "",
"orderPrice": "21",
"orderQty": "2",
"orderType": "Limit",
"side": "Buy",
"execTime": "1744104992220",
"isLeverage": "",
"isMaker": false,
"seq": 241321,
"createType": "CreateByUser",
"execPnl": ""
}
]
}

//Future leg execution
{
"topic": "spread.execution",
"id": "1448939_SOLUSDT_28731107101",
"creationTime": 1744104992229,
"data": [
{
"category": "future_leg",
"symbol": "SOLUSDT",
"closedSize": "0",
"execFee": "0.039712",
"execId": "99a18f80-d3b5-4c6f-a1f1-8c5870e3f3bc",
"parentExecId": "82c82077-0caa-5304-894d-58a50a342bd7",
"execPrice": "124.1",
"execQty": "2",
"execType": "FutureSpread",
"execValue": "248.2",
"feeRate": "0.00016",
"markPrice": "119",
"leavesQty": "0",
"orderId": "",
"orderLinkId": "",
"orderPrice": "124.1",
"orderQty": "2",
"orderType": "Limit",
"side": "Buy",
"execTime": "1744104992224",
"isLeverage": "0",
"isMaker": false,
"seq": 28731107101,
"createType": "CreateByFutureSpread",
"execPnl": "0"
}
]
}