Cross Margin Position Event
Debt Ratio Change
{
"type": "message",
"topic": "/margin/position",
"subject": "debt.ratio",
"channelType": "private",
"data": {
"debtRatio": 0.7505, //Debt ratio
"totalDebt": "21.7505", //Total debt in BTC (interest included)
"totalAsset": "30", //Total asset in BTC (interest included)
"debtList": { "BTC": "1.21", "USDT": "2121.2121", "EOS": "0" }, //Debt list (interest included)
"assetList": {"WIF": {"total": "2","available": "2","hold": "0"}},
"timestamp": 15538460812100 //Timestamp (millisecond)
}
}
Topic: /margin/position
The system will push the current debt message periodically when there is a liability.
Margin Position Status Change
{
"type": "message",
"topic": "/margin/position",
"subject": "position.status",
"channelType": "private",
"data": {
"type": "FROZEN_FL", //Event type
"timestamp": 15538460812100 //Timestamp (millisecond)
}
}
Topic: /margin/position
The system will push the change event when the position status changes.
Event type:
FROZEN_FL: When the debt ratio exceeds the liquidation threshold and the position is frozen, the system will push this event.
UNFROZEN_FL: When the liquidation is finished and the position returns to “EFFECTIVE” status, the system will push this event.
FROZEN_RENEW: When the auto-borrow renewing is complete and the position returns to “EFFECTIVE” status, the system will push this event.
UNFROZEN_RENEW: When the account reaches a negative balance, the system will push this event.
LIABILITY: When the account reaches a negative balance, the system will push this event.
UNLIABILITY: When all the liabilities is repaid and the position returns to “EFFECTIVE” status, the system will push this event.