In setting up a new algorithm I want to pull the margin remaining from Interactive Brokers.

I have found self.Portfolio.MarginRemaining

What does this return? I can't find documentation anywhere.

I have a feeling it will return Current Available Funds, however as I want to be able to hold trades overnight without a Reg-T Margin call I need to determine the amount in SMA available.

Is there anything built in to do this? Does anyone have a solution?

Author