How to get open positions using the REST API?

How can I get only open positions in my account using the API, is there a method for this?
/fapi/v2/positionRisk returns all positions, but there is no way to understand which of them are open.

this endpoint returns the position info that you are looking for.

1 Like