Margin API doesn't take existing positions into consideration

Hi Team,

Say, I have bought 1 lot of option A.

I want to calculate margin required for selling 1 lot of option A.

The API returns full margin not taking into consideration that I already have 1 lot A.

Is this feature planned?

Thanks

Hi @Kislay

In the example you’ve provided, no margin is required to sell 1 unit of option A since it involves closing an existing position.

Additionally, it’s true that the Margin API doesn’t account for your current positions when calculating margins. However, you can simulate your positions in the API payload to get the correct margin requirements.

For instance, if you hold position B and wish to buy option C, you would need to include position B in the payload before option C to obtain an accurate margin calculation.

Thank you.

1 Like