成交
訂閱 execution 或 execution.event 主題,實時接收 Event Contract 成交更新推送。
Topic: execution / execution.event
信息
- 訂閱私有主題前需先完成身份驗證。
- 當 Event Contract 訂單發生成交(完全或部分成交)時推送。
返回參數
| 參數 | 類型 | 說明 |
|---|---|---|
| id | string | 消息 ID |
| topic | string | Topic 名稱 |
| creationTime | number | 數據創建時間戳(毫秒) |
| data | array | 對象 |
| > category | string | 產品類型。event |
| > transId | string | 交易 ID |
| > execId | string | 成交 ID |
| > orderId | string | 訂單 ID |
| > orderLinkId | string | 用戶自定義訂單 ID |
| > symbol | string | 交易對名稱 |
| > symbolId | integer | 交易對 ID |
| > baseCoin | string | 標的幣種 |
| > quoteCoin | string | 計價幣種 |
| > settleCoin | string | 結算幣種 |
| > side | string | 方向:Buy 或 Sell |
| > feeCoin | string | 手續費幣種 |
| > execType | string | 成交類型:Trade、Settle |
| > execPrice | string | 成交價格(賠付比率) |
| > execValue | string | 成交金額 |
| > execFee | string | 成交手續費 |
| > execFeeRate | string | 成交手續費率 |
| > orderPrice | string | 訂單價格 |
| > ecContractType | integer | 事件合約類型 |
| > ecDirection | integer | 方向 |
| > ecDurationWindow | integer | 持續時間窗口(秒) |
| > ecTargetPrice | string | 目標價格,僅 Target 類型適用 |
| > ecLowerBound | string | 下限價格,僅 Range 類型適用 |
| > ecUpperBound | string | 上限價格,僅 Range 類型適用 |
| > ecOrderValue | string | Event Contract 訂單金額 |
| > ecIndexPrice | string | 成交時的指數價格 |
| > ecPayout | string | 本次成交的 Event Contract 賠付金額 |
| > entryPrice | string | 入場價格 |
| > settlePrice | string | 結算價格 |
| > grossPayoutRatio | string | 毛賠付比率 |
| > sessionRpl | string | 本次持倉已結盈虧 |
| > transTime | string | 成交時間(毫秒) |
| > settleTimeMs | string | 結算時間(毫秒) |
| > crossSeq | string | 跨業務序號 |
| > timeInForce | string | 訂單有效期,如 GoodTillCancel |
| > extraFees | array | 額外費用 |
訂閱示例
{
"op": "subscribe",
"args": [
"execution"
]
}
推送示例
{
"topic": "execution",
"id": "1509583_ETHUSDT-5MIN-UP_1311",
"creationTime": 1787635282379,
"data": [
{
"category": "event",
"transId": "0176bba4-66fa-542b-af33-cea000a83dc0",
"execId": "0176bba4-66fa-542b-af33-cea000a83dc0",
"orderId": "746a6c87-a6dd-4008-8889-37e694046681",
"orderLinkId": "cjm1119",
"symbol": "ETHUSDT-5MIN-UP",
"symbolId": 500000,
"baseCoin": "ETH",
"quoteCoin": "USDT",
"settleCoin": "USDT",
"side": "Sell",
"feeCoin": "USDT",
"execType": "Trade",
"execPrice": "3.5",
"execValue": "100",
"execFee": "4.28571429",
"execFeeRate": "0.04285715",
"orderPrice": "3.5",
"ecContractType": 1,
"ecDirection": 1,
"ecDurationWindow": 300,
"ecTargetPrice": "",
"ecLowerBound": "",
"ecUpperBound": "",
"ecOrderValue": "5000",
"ecPayout": "350",
"entryPrice": "3.5",
"settlePrice": "2503.50730825",
"grossPayoutRatio": "3.5",
"sessionRpl": "0",
"transTime": "1787635282374",
"settleTimeMs": "1787635582374",
"crossSeq": "1311",
"timeInForce": "GoodTillCancel",
"extraFees": []
}
]
}