Ejemplo n.º 1
0
        public bool EqualInstrument(InstrumentConfigDto instrumentConfig, bool printMessage)
        {
            bool isEqual = InstrumentConfigInfo.AlgoId == instrumentConfig.AlgoId &&
                           InstrumentConfigInfo.AlgoKey == instrumentConfig.AlgoKey &&
                           InstrumentConfigInfo.Exchange == instrumentConfig.Exchange &&
                           InstrumentConfigInfo.SourceExchange == instrumentConfig.SourceExchange &&
                           InstrumentConfigInfo.Instrument == instrumentConfig.Instrument &&
                           InstrumentConfigInfo.FxLeg == instrumentConfig.FxLeg &&
                           InstrumentConfigInfo.Underlyings == instrumentConfig.Underlyings;

            if (!isEqual && printMessage)
            {
                Console.WriteLine("Instrument doesn't match with added.");
            }
            return(isEqual);
        }
Ejemplo n.º 2
0
        private static void DoUpdateInstrument()
        {
            InstrumentConfigDto instrument = mmRestService.CreateInstrument(JsonConvert.DeserializeObject <InstrumentConfigDto>(ReadMultiLine()));

            ShowIndentedJson(instrument);
        }
 public InstrumentConfigDto CreateInstrument(InstrumentConfigDto instrument)
 {
     return(_restService.Post <InstrumentConfigDto, InstrumentConfigDto>("/api/v0/config/instrument/save", instrument));
 }