/// <summary> /// </summary> /// <param name="amount"></param> public override void ValidateAmount(decimal amount) { decimal trucated = Numerical.TruncateDecimal(amount, 4); WildLog.Assert(trucated == amount, "Amount should have 4 decimal places max"); WildLog.Assert(amount >= kMinAmount, "Minimum tradable amount is " + kMinAmount); }
/// <summary> /// </summary> /// <param name="price"></param> private void ValidatePrice(decimal price) { decimal trucated = Numerical.TruncateDecimal(price, 2); WildLog.Assert(trucated == price, "Price should have 2 decimal places max"); }