static void Main(string[] _) { try { // Create a session into the platform using (ISession session = Configuration.Sessions.GetSession()) { session.Open(); // RICs - convert multiple RICs to pre-defined instrument types var response = SymbolConversion.Definition("IBM", "AAPL.O", "GOOGL.O", "LP60000008").GetData(); DisplayResponse($"\nRIC Lookup for 4 valid items:", response); // ISINs - convert to all known symbol types (Note: Can we detect the Symbol types?) response = SymbolConversion.Definition("US5949181045", "US02079K1079").FromSymbolType(SymbolConversion.SymbolType.ISIN).GetData(); DisplayResponse("\nISIN Lookup for 2 valid items:", response); // ISINs - convert to RIC and Ticker only. Include 1 bad ISIN. response = SymbolConversion.Definition("US5949181045", "JUNK", "US02079K1079").FromSymbolType(SymbolConversion.SymbolType.ISIN) .ToSymbolType(SymbolConversion.SymbolType.RIC, SymbolConversion.SymbolType.Ticker) .GetData(); DisplayResponse("\nISIN Lookup for 2 valid items, 1 invalid item - convert to RIC and Ticker only:", response); // SEDOL - convert to all known response = SymbolConversion.Definition("BH4HKS3").FromSymbolType(SymbolConversion.SymbolType.SEDOL).GetData(); DisplayResponse("\nSEDOL lookup:", response); } } catch (Exception e) { Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************"); } }
static void Main(string[] _) { try { // Create a session // Note: Symbol conversion is based on Search. Clients on the desktop have access to full conversion // capabilities. Clients connecting directly to the platform are licensed as Wealth clients. The // only distinquishable difference between the 2-flavours of conversion is that the // full version provides a way to detect the symbol types automatically. See the last example. // All examples will work if the session is on the desktop. For our Wealth clients connecting // directly into RDP, see the first example. Feel free to change the Service Type if connecting // to RDP. using ISession session = Sessions.GetSession(); session.Open(); // ISIN to RIC conversion ( var response = SymbolConversion.Definition().ServiceType(SymbolConversion.ServiceType.Wealth) .Symbols("US5949181045", "US02079K1079") .FromSymbolType(SymbolConversion.SymbolType.ISIN) .ToSymbolType(SymbolConversion.SymbolType.RIC) .GetData(); Common.DisplayTable("ISIN to RIC conversion for 2 items:", response); // ISINs - convert to RIC and Ticker only. Include 1 bad ISIN. response = SymbolConversion.Definition().ServiceType(SymbolConversion.ServiceType.Desktop) .Symbols("US5949181045", "JUNK", "US02079K1079") .FromSymbolType(SymbolConversion.SymbolType.ISIN) .ToSymbolType(SymbolConversion.SymbolType.RIC, SymbolConversion.SymbolType.Ticker) .GetData(); Common.DisplayTable("ISIN Lookup for 2 valid items, 1 invalid item - convert to RIC and Ticker only:", response); // LipperID conversion response = SymbolConversion.Definition("68384554").ServiceType(SymbolConversion.ServiceType.Desktop) .FromSymbolType(SymbolConversion.SymbolType.LipperID) .GetData(); Common.DisplayTable("Lipper ID conversion:", response); // Detect and Convert 4 symbol types (ticker, ISIN, CUSIP, SEDOL) // Note: Auto-detection is only available in the Desktop service type if (session is IDesktopSession) { response = SymbolConversion.Definition().ServiceType(SymbolConversion.ServiceType.Desktop) .Symbols("IBM", "US5949181045", "037833100", "BH4HKS3") .GetData(); Common.DisplayTable("Detect and convert symbols of mixed type", response); } } catch (Exception e) { Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************"); } }