예제 #1
0
        public DealerOrder(
            IFinancialInstrument instrument,
            string reddeerTradeId,
            string tradeId,
            DateTime?placedDate,
            DateTime?bookedDate,
            DateTime?amendedDate,
            DateTime?rejectedDate,
            DateTime?cancelledDate,
            DateTime?filledDate,
            DateTime?createdDate,
            string traderId,
            string dealerName,
            string notes,
            string tradeCounterParty,
            OrderTypes orderType,
            OrderDirections orderDirection,
            Currency currency,
            Currency settlementCurrency,
            OrderCleanDirty cleanDirty,
            decimal?accumulatedInterest,
            string dealerOrderVersion,
            string dealerOrderVersionLinkId,
            string dealerOrderGroupId,
            Money?limitPrice,
            Money?averageFillPrice,
            decimal?orderedVolume,
            decimal?filledVolume,
            decimal?optionStrikePrice,
            DateTime?optionExpirationDate,
            OptionEuropeanAmerican tradeOptionEuropeanAmerican)
            : base(placedDate, bookedDate, amendedDate, rejectedDate, cancelledDate, filledDate)
        {
            this.Instrument           = instrument ?? throw new ArgumentNullException(nameof(instrument));
            this.ReddeerDealerOrderId = reddeerTradeId ?? string.Empty;
            this.DealerOrderId        = tradeId ?? string.Empty;

            this.CreatedDate = createdDate;

            this.DealerId            = traderId ?? string.Empty;
            this.DealerName          = dealerName ?? string.Empty;
            this.Notes               = notes ?? string.Empty;
            this.DealerCounterParty  = tradeCounterParty ?? string.Empty;
            this.OrderType           = orderType;
            this.OrderDirection      = orderDirection;
            this.Currency            = currency;
            this.SettlementCurrency  = settlementCurrency;
            this.CleanDirty          = cleanDirty;
            this.AccumulatedInterest = accumulatedInterest;

            this.DealerOrderVersion       = dealerOrderVersion;
            this.DealerOrderVersionLinkId = dealerOrderVersionLinkId;
            this.DealerOrderGroupId       = dealerOrderGroupId;

            this.LimitPrice             = limitPrice;
            this.AverageFillPrice       = averageFillPrice;
            this.OrderedVolume          = orderedVolume;
            this.FilledVolume           = filledVolume;
            this.OptionStrikePrice      = optionStrikePrice;
            this.OptionExpirationDate   = optionExpirationDate;
            this.OptionEuropeanAmerican = tradeOptionEuropeanAmerican;
        }
예제 #2
0
        public Order(
            FinancialInstrument instrument,
            Market market,
            int?reddeerOrderId,
            string orderId,
            DateTime?created,
            string orderVersion,
            string orderVersionLinkId,
            string orderGroupId,
            DateTime?placedDate,
            DateTime?bookedDate,
            DateTime?amendedDate,
            DateTime?rejectedDate,
            DateTime?cancelledDate,
            DateTime?filledDate,
            OrderTypes orderType,
            OrderDirections orderDirection,
            Currency orderCurrency,
            Currency?orderSettlementCurrency,
            OrderCleanDirty orderCleanDirty,
            decimal?orderAccumulatedInterest,
            Money?orderLimitPrice,
            Money?orderAverageFillPrice,
            decimal?orderOrderedVolume,
            decimal?orderFilledVolume,
            string orderTraderId,
            string orderTraderName,
            string orderClearingAgent,
            string orderDealingInstructions,
            IOrderBroker orderBroker,
            Money?orderOptionStrikePrice,
            DateTime?orderOptionExpirationDate,
            OptionEuropeanAmerican orderOptionEuropeanAmerican,
            IReadOnlyCollection <DealerOrder> trades)
            : base(placedDate, bookedDate, amendedDate, rejectedDate, cancelledDate, filledDate)
        {
            // keys
            this.Instrument     = instrument ?? throw new ArgumentNullException(nameof(instrument));
            this.Market         = market ?? throw new ArgumentNullException(nameof(market));
            this.ReddeerOrderId = reddeerOrderId;
            this.OrderId        = orderId ?? string.Empty;

            // versioning
            this.OrderVersion       = orderVersion ?? string.Empty;
            this.OrderVersionLinkId = orderVersionLinkId ?? string.Empty;
            this.OrderGroupId       = orderGroupId ?? string.Empty;

            // dates
            this.CreatedDate = created;

            // order fundamentals
            this.OrderType                = orderType;
            this.OrderDirection           = orderDirection;
            this.OrderCurrency            = orderCurrency;
            this.OrderSettlementCurrency  = orderSettlementCurrency;
            this.OrderCleanDirty          = orderCleanDirty;
            this.OrderAccumulatedInterest = orderAccumulatedInterest;
            this.OrderLimitPrice          = orderLimitPrice;
            this.OrderAverageFillPrice    = orderAverageFillPrice;
            this.OrderOrderedVolume       = orderOrderedVolume;
            this.OrderFilledVolume        = orderFilledVolume;
            this.OrderBroker              = orderBroker;

            // order trader and post trade
            this.OrderTraderId            = orderTraderId ?? string.Empty;
            this.OrderTraderName          = orderTraderName ?? string.Empty;
            this.OrderClearingAgent       = orderClearingAgent ?? string.Empty;
            this.OrderDealingInstructions = orderDealingInstructions ?? string.Empty;

            // options
            this.OrderOptionStrikePrice      = orderOptionStrikePrice;
            this.OrderOptionExpirationDate   = orderOptionExpirationDate;
            this.OrderOptionEuropeanAmerican = orderOptionEuropeanAmerican;

            // associated dealer orders
            this.DealerOrders = trades ?? new DealerOrder[0];
        }