I cannot load my instrument list from a csv file.

Bondy_Bo
Bondy_Bo Contributor

I have prepared an instrument list in a csv file, which my API program then reads. My list is a combination of sedols, cusips and isins. I can see that the process successfully reads the sedols and cusips, but not the isins. I then get an error message:
"An unhandled exception of type 'ThomsonReuters.Dss.Api.ValidationException' occurred in mscordlib.dll. Additional information: Instrument identifiers cannot contain null values. Parameter name: instrumentIdentifier"

Best Answer

  • LtDoolittle6
    LtDoolittle6 Contributor
    Answer ✓

    it appears that you have not defined CUSIP as an identifietype when reading the instrument list, but you have defined SEDOL and ISIN. You can most likely resolve this by replicating the lines where you define SEDOL or ISIN. I would add CUSIP with the suggested lines below:

    if (identifiertype == "CSP")
    {
    yourinstruments[n] = new InstrumentIdentifier();
    yourinstruments[n].IdentifierType = IdentifierType.Cusip;
    yourinstruments[n].Identifier = identifiervalue;
    yourinstruments[n].UserDefinedIdentifier = userdefinedidentifiervalue;
    yourinstruments[n].Source = SourceValue;
    }