Beispiel #1
0
 /// <summary>
 /// 利用交易对的信息,控制数量。使他符合标准
 /// </summary>
 /// <param name="symbol"></param>
 /// <param name="outputQuantity">Quantity</param>
 /// <returns>Clamped quantity</returns>
 protected decimal ClampOrderQuantity(Symbol symbol, decimal outputQuantity)
 {
     return(symbol == null ? outputQuantity : CryptoUtility.ClampDecimal(symbol.MinTradeSize, symbol.MaxTradeSize, symbol.QuantityStepSize, outputQuantity));
 }
Beispiel #2
0
        //未来移植到交易模块里面去

        /// <summary>
        /// 利用交易对的相关信息,控制价格。使他符合标准
        /// </summary>
        /// <param name="symbol"></param>
        /// <param name="outputPrice">Price</param>
        /// <returns>Clamped price</returns>
        protected decimal ClampOrderPrice(Symbol symbol, decimal outputPrice)
        {
            return(symbol == null ? outputPrice : CryptoUtility.ClampDecimal(symbol.MinPrice, symbol.MaxPrice, symbol.PriceStepSize, outputPrice));
        }