querying max removable margin

It seems there’s no api for querying how much can i remove margins from certain position at ISOLATED margin mode.
also it isn’t calculable from the ‘GET /fapi/v2/account (HMAC SHA256)’ endpoint info.
Is there any way that i can query/calculate this info?
should be a function of (isolatedMargin, initialMargin,unrealizedProfit,maintMargin) but simply adding/sub them doesn’t match exactly. There should be an exact calculation…what would it be?

Use this endpoint to get all isolated margin details -/fapi/v2/positionRisk

yeah but it doesn’t contain the info about max removable margin.

Us the “isolatedMargin” minus the maintenance margin from /fapi/v2/account

Us the “isolatedMargin” minus the maintenance margin from /fapi/v2/account

then include PNL; please understand you can only estimate that and the max value is as volatile as the market price

but it’s not. isolatedMargin - MM is a lot more than max withdrawable amt b/c MM is only below 50% of the initial margin. And if you have PNL, you can withdraw more or less. Should be an exact official formula for this…