public static MeMultiOrderItemModel Create( string id, OrderAction orderAction, double volume, double price, MeLimitOrderFeeModel fee, string oldUid) { return(new MeMultiOrderItemModel { Id = id, Volume = orderAction == OrderAction.Buy ? volume : -volume, Price = price, Fee = fee, OldUid = oldUid }); }
public static MeNewLimitOrderModel CreateMeLimitOrder( string id, string clientId, string assetPairId, OrderAction orderAction, double volume, double price, bool cancelAllPreviousLimitOrders, MeLimitOrderFeeModel fee, MeLimitOrderFeeModel[] fees) { var order = CreateBasicOrder(id, clientId, assetPairId, orderAction, volume, cancelAllPreviousLimitOrders, fee, fees, 0); order.Price = price; return(order); }
public static MeNewLimitOrderModel CreateMeStopLimitOrder( string id, string clientId, string assetPairId, OrderAction orderAction, double volume, bool cancelAllPreviousLimitOrders, MeLimitOrderFeeModel fee, MeLimitOrderFeeModel[] fees, double?lowerLimitPrice, double?lowerPrice, double?upperLimitPrice, double?upperPrice) { var order = CreateBasicOrder(id, clientId, assetPairId, orderAction, volume, cancelAllPreviousLimitOrders, fee, fees, 1); order.LowerLimitPrice = lowerLimitPrice; order.LowerPrice = lowerPrice; order.UpperLimitPrice = upperLimitPrice; order.UpperPrice = upperPrice; return(order); }
private static MeNewLimitOrderModel CreateBasicOrder( string id, string clientId, string assetPairId, OrderAction orderAction, double volume, bool cancelAllPreviousLimitOrders, MeLimitOrderFeeModel fee, MeLimitOrderFeeModel[] fees, int type) { return(new MeNewLimitOrderModel { Id = id, TimeStamp = (long)System.DateTime.UtcNow.ToUnixTime(), ClientId = clientId, AssetPairId = assetPairId, Volume = orderAction == OrderAction.Buy ? volume : -volume, CancelAllPreviousLimitOrders = cancelAllPreviousLimitOrders, Fee = fee, Fees = fees, Type = type }); }