How to calculate initial margin requirements and maintenance margin via API

Hello,

is there a way to send a position or a portfolio and have the initial margin requirements and the maintenance margin returned from the API?

Tks a lot for the help!

Hi @Bernardo_Dore , you can look into Binance API Documentation, /fapi/v2/account returns response with Margin info

Tks for the reply @aisling2

This returns the margin only for open positions. The idea would be to have the margin calculator of the UI available via the API.

I see, unfortunately this is not available thorough API, you’ll need to calculate locally following the right formulas (for this you’ll need to research online or consult a customer support.)