예제 #1
0
        public Order GetMatchingOrder(UserHandler handler, TradeOffer trade)
        {
            Order buy = BuyOrders.FirstOrDefault((o) => o.TradeOfferMatches(handler, trade) == true);

            if (buy != null)
            {
                return(buy);
            }

            return(SellOrders.FirstOrDefault((o) => o.TradeOfferMatches(handler, trade) == true));
        }
예제 #2
0
        public MarketOrder LowestSellOrder(int?minimumQuantity)
        {
            MarketOrder item = null;

            if (SellOrders != null)
            {
                var filter = minimumQuantity ?? UseableQuantity;

                item = SellOrders.FirstOrDefault(arg => arg.Quantity > filter && arg.Security > SecurityLevel);
            }

            return(item);
        }