public void Lookup_Instrument_By_Unique_Id()
        {
            /*
             *  Look up an instrument that already exists in the instrument master by a
             *  unique id, in this case an OpenFigi, and also return a list of aliases
             */

            var lookedUpInstruments = _instrumentsApi.GetInstruments(
                FigiScheme,
                new List <string> {
                "BBG000C6K6G9"
            },
                propertyKeys: new List <string> {
                IsinPropertyKey, SedolPropertyKey
            });

            Assert.That(lookedUpInstruments.Values, Contains.Key("BBG000C6K6G9"));

            var instrument = lookedUpInstruments.Values["BBG000C6K6G9"];

            Assert.That(instrument.Name, Is.EqualTo("VODAFONE GROUP PLC"));

            var identifiers = instrument.Properties.OrderBy(i => i.Key).ToList();

            Assert.That(identifiers[0].Key, Is.EqualTo(IsinPropertyKey));
            Assert.That(identifiers[0].Value.LabelValue, Is.EqualTo("GB00BH4HKS39"));
            Assert.That(identifiers[1].Key, Is.EqualTo(SedolPropertyKey));
            Assert.That(identifiers[1].Value.LabelValue, Is.EqualTo("BH4HKS3"));
        }
Beispiel #2
0
        private LusidInstrument QueryOtcFromLusid(string idUniqueToInstrument)
        {
            var response = _instrumentsApi.GetInstruments("ClientInternal",
                                                          new List <string>
            {
                idUniqueToInstrument
            });

            // Check the response succeeded and has no errors.
            Assert.That(response.Failed.Count, Is.EqualTo(0));
            Assert.That(response.Values.Count, Is.EqualTo(1));

            Assert.That(response.Values.First().Key, Is.EqualTo(idUniqueToInstrument));
            return(response.Values.First().Value.InstrumentDefinition);
        }