Future - isolated mode: no way to identify when a position has been margin adjusted

There is barely any reliable way at the moment to identify when a position in isolated mode has seen his margin adjusted when receiving such event in the websocket API:

  • /fapi/v1/positionMargin/history shows adjusted margins, but it shows also funding fees as well as limit orders getting filled.
  • It would be possible to cross-check with /fapi/v1/income?incomeType=FUNDING_FEE for the funding fees and /fapi/v1/allOrders for filled (limit) orders. Then a comparison on the quantity and approximate timestamps could help too, but it’s obviously complicated, very error prone and doesn’t even guarantee a correct identification.

Long story short, it would be really great if the Websocket API would return more information what fired the ACCOUNT_UPDATE event: is it a funding fee, is it a limit order closed, or is it the margin adjusted?

For now, I’m afraid the only way is to fetch isolatedMargin from {{url}}/fapi/v1/positionRisk and monitor if margin is updated.

If that would work, that would be great, but there are different ways to “update” the margin: adding margin through fapi/v1/positionMargin, of course. But also a Market order or a Limit order getting filled (in addition to the current, open, position) will update the isolatedMargin as well…