Does quantconnect have any built in functions for selling credit spreads? When I try to do so manually using self.Sell and self.Buy, I often get “insufficient margin” for the sell order, so it cancels, but then the buy goes through anyway.

Since these are vertical spreads, the margin should be just the difference in strike price, but the margin it's demanding is much higher.

Does QC have any helper functions for this?