示例#1
0
        public Price(
            string type,
            InstrumentName instrument,
            DateTime time,
            bool tradeable,
            List <PriceBucket> bids,
            List <PriceBucket> asks,
            PriceValue closeoutBid,
            PriceValue closeoutAsk)
        {
            if (type == null)
            {
                this.Type = "PRICE";
            }
            else
            {
                this.Type = type;
            }

            this.Instrument  = instrument;
            this.Time        = time;
            this.Tradeable   = tradeable;
            this.Bids        = bids;
            this.Asks        = asks;
            this.CloseoutBid = closeoutBid;
            this.CloseoutAsk = closeoutAsk;
        }
示例#2
0
 public ClientPrice()
 {
     this.Bids        = new List <PriceBucket>();
     this.Asks        = new List <PriceBucket>();
     this.CloseoutBid = new PriceValue();
     this.CloseoutAsk = new PriceValue();
     this.Timestamp   = new DateTime();
 }
示例#3
0
        // private QuoteHomeConversionFactors QuoteHomeConversionFactors; {Deprecated}
        // private UnitsAvailable UnitsAvailable; {Deprecated}

        public Price()
        {
            this.Type        = "PRICE";
            this.Instrument  = new InstrumentName();
            this.Time        = new DateTime();
            this.Bids        = new List <PriceBucket>();
            this.Asks        = new List <PriceBucket>();
            this.CloseoutBid = new PriceValue();
            this.CloseoutAsk = new PriceValue();
        }
示例#4
0
 public ClientPrice(
     List <PriceBucket> bids,
     List <PriceBucket> asks,
     PriceValue closeoutBid,
     PriceValue closeoutAsk,
     DateTime timestamp)
 {
     this.Bids        = bids;
     this.Asks        = asks;
     this.CloseoutBid = closeoutBid;
     this.CloseoutAsk = closeoutAsk;
     this.Timestamp   = timestamp;
 }
示例#5
0
 public PriceBucket FindAsk(PriceValue value)
 {
     return(this.Asks.Find(x => x.Price == value));
 }
示例#6
0
 // Getters
 public PriceBucket FindBid(PriceValue value)
 {
     return(this.Bids.Find(x => x.Price == value));
 }
示例#7
0
        public void RemoveAsk(PriceValue value)
        {
            PriceBucket x = FindAsk(value);

            this.Asks.Remove(x);
        }
示例#8
0
        public void RemoveBid(PriceValue value)
        {
            PriceBucket x = FindBid(value);

            this.Bids.Remove(x);
        }