Пример #1
0
 public void SubscribeToSymbolQuoteFeed(InstrInfo[] instr, DepthOfBkHndlr handler)
 {
     Console.WriteLine("Subscribe To Symbol Feed: " + Utilities.InstrToStr(instr));
     try
     {
         if (instr[0].type == InstrInfo.EType.EQUITY)
         {
             eqDobkClient.Subscribe(instr, handler);
         }
         else if (instr[0].type == InstrInfo.EType.OPTION)
         {
             if (instr.Length > 1)
             {
                 sprdDobkClient.Subscribe(instr, handler);
             }
             else
             {
                 optDobkClient.Subscribe(instr, handler);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Quote subscription error: " + ex.Message);
     }
 }