public OrderMetadata MergeWith(OrderMetadata metadata)
 {
     return(new OrderMetadata
     {
         IsTransitional = metadata.IsTransitional ?? this.IsTransitional,
         OriginalPair = metadata.OriginalPair ?? this.OriginalPair,
         TradingRules = metadata.TradingRules ?? this.TradingRules,
         SignalRule = metadata.SignalRule ?? this.SignalRule,
         Signals = metadata.Signals ?? this.Signals,
         BoughtRating = metadata.BoughtRating ?? this.BoughtRating,
         CurrentRating = metadata.CurrentRating ?? this.CurrentRating,
         BoughtGlobalRating = metadata.BoughtGlobalRating ?? this.BoughtGlobalRating,
         CurrentGlobalRating = metadata.CurrentGlobalRating ?? this.CurrentGlobalRating,
         LastBuyMargin = metadata.LastBuyMargin ?? this.LastBuyMargin,
         AdditionalDCALevels = metadata.AdditionalDCALevels ?? this.AdditionalDCALevels,
         AdditionalCosts = metadata.AdditionalCosts ?? this.AdditionalCosts,
         FeesNonDeductible = metadata.FeesNonDeductible ?? this.FeesNonDeductible,
         SwapPair = metadata.SwapPair ?? this.SwapPair,
         Arbitrage = metadata.Arbitrage ?? this.Arbitrage,
         ArbitragePercentage = metadata.ArbitragePercentage ?? this.ArbitragePercentage
     });
 }
 public ArbitrageOptions(string pair, Arbitrage arbitrage, OrderMetadata newPairMetadata)
 {
     this.Pair      = pair;
     this.Arbitrage = arbitrage;
     this.Metadata  = newPairMetadata ?? new OrderMetadata();
 }
Exemple #3
0
 public BuyOptions(string pair)
 {
     this.Pair     = pair;
     this.Metadata = new OrderMetadata();
 }
 public SwapOptions(string oldPair, string newPair, OrderMetadata newPairMetadata)
 {
     this.OldPair  = oldPair;
     this.NewPair  = newPair;
     this.Metadata = newPairMetadata ?? new OrderMetadata();
 }