That's not a real fix. Better fix either the leverage, or the margin cost in your asset list. If your broker API does not provide these parameters, or returns nonsense, you must get them from the broker's website.