Hi @laxm,
Apologies for delayed response.
We have recently implemented a API to calculate required margin
Kindly refer to the below API documentation to get the required margin for respective segment.
https://smartapi.angelbroking.com/docs/MarginCalculator
Thanks & Regards,
SmartAPI team