How can we determine a closed or open position?

I’m using the ListPositionsAsync method to get all positions.

If the Quantity = 0 then it is closed else if it is open. Is it correct?

I am not too familar with the C# code, but as API response, position qty is never 0, because that means your position is closed (flat). But yes, else it means it’s open.