You can have low carb and high fat margarine on keto. It will help you to stay in a ketosis state. However, margarine is rich in saturated fat which may not be a good choice for healthy heart function.