账户频道
描述
订阅账户频道
请求参数
| 参数名 | 参数类型 | 是否必须 | 描述 |
|---|---|---|---|
| event | String | 是 | 操作, subscribe unsubscribe |
| channel | String | 是 | 频道名 |
请求示例
{
"event": "subscribe",
"channel": "account"
}
返回参数
| 返回字段 | 参数类型 | 字段说明 |
|---|---|---|
| event | String | 操作, subscribed unsubscribed |
| channel | String | 频道名 |
订阅返回示例
{
"event": "subscribed",
"channel": "account"
}
推送数据参数
| 返回字段 | 参数类型 | 字段说明 |
|---|---|---|
| coinId | String | 货币id |
| marginMode | String | 保证金模式 |
| crossContractId | String | 当 marginMode=CROSS 时,表示全仓保证金模式关联的合约id。其他情况必为0 |
| isolatedPositionId | String | 当 marginMode=ISOLATED 时,表示逐仓保证金关联的仓位id。其他情况必为0 |
| amount | String | 抵押品数额 |
| pendingDepositAmount | String | 正在处理中的充值数量 |
| pendingWithdrawAmount | String | 正在处理中的提现数量 |
| pendingTransferInAmount | String | 正在处理中的转入数量 |
| pendingTransferOutAmount | String | 正在处理中的转出数量 |
| isLiquidating | String | 是否触发清算,正在强平处理中 |
| legacyAmount | String | 余额字段,仅展示不参与计算 |
| cumDepositAmount | String | 累计的充值数量 |
| cumWithdrawAmount | String | 累计的提现数量 |
| cumTransferInAmount | String | 累计的转入数量 |
| cumTransferOutAmount | String | 累计的转出数量 |
| cumMarginMoveInAmount | String | 累计的保证金转入数量 |
| cumMarginMoveOutAmount | String | 累计的保证金转出数量 |
| cumPositionOpenLongAmount | String | 累计开多对应的抵押品数量 |
| cumPositionOpenShortAmount | String | 累计开空对应的抵押品数量 |
| cumPositionCloseLongAmount | String | 累计平多对应的抵押品数量 |
| cumPositionCloseShortAmount | String | 累计平空对应的抵押品数量 |
| cumPositionFillFeeAmount | String | 累计的成交手续费数量 |
| cumPositionLiquidateFeeAmount | String | 累计的清算费数量 |
| cumPositionFundingAmount | String | 累计资金费用数量 |
| cumOrderFillFeeIncomeAmount | String | 累计的委托单手续费收入数量 |
| cumOrderLiquidateFeeIncomeAmount | String | 累计的委托单清算手续费收入数量 |
| createdTime | String | 创建时间 |
| updatedTime | String | 更新时间 |
推送返回示例
{
"type": "trade-event",
"channel": "account",
"event": "payload",
"msg": {
"msgEvent": "PositionFundingSettle",
"version": 46571,
"data": {
"collateral": [
{
"coinId": "USDT",
"marginMode": "SHARED",
"crossContractId": "0",
"isolatedPositionId": "0",
"amount": "6625267.708162",
"pendingDepositAmount": "0.000000",
"pendingWithdrawAmount": "0.000000",
"pendingTransferInAmount": "0",
"pendingTransferOutAmount": "0",
"legacyAmount": "6628108.535375",
"cumDepositAmount": "6850179.708361",
"cumWithdrawAmount": "118.284985",
"cumTransferInAmount": "151.912400",
"cumTransferOutAmount": "0",
"cumMarginMoveInAmount": "0",
"cumMarginMoveOutAmount": "114.587618",
"cumPositionOpenLongAmount": "3551408.796139",
"cumPositionOpenShortAmount": "287685.101200",
"cumPositionCloseLongAmount": "3406364.752975",
"cumPositionCloseShortAmount": "287789.808420",
"cumPositionFillFeeAmount": "32.199683",
"cumPositionLiquidateFeeAmount": "76.930498",
"cumPositionFundingAmount": "-5778.744009",
"cumOrderFillFeeIncomeAmount": "0",
"cumOrderLiquidateFeeIncomeAmount": "0",
"createdTime": "1728493664997",
"updatedTime": "1747188961302",
"liquidating": false
}
]
},
"time": 1747188961302
}
}