Do you have any information how can I search with Chain RIC with DSS API?

The web interface has this functionality, that I can search by Chain RIC, but I cannot find any DSS API operation that supports it.

Best Answer

  • gteage01
    gteage01 LSEG
    Answer ✓

    Hi Lukasz,

    The Chain 'search' is a little different to the other searches. My view is that this search is more of a validation check than a true search, as even for the GUI you have to know the exact match Chain RIC and it will either find (validate existence of) the specific identifier, or not...

    That being the case I wonder if then the same functionality as you'd get with doing the 'search' can really just be accomplished by using the Instrument List append /validate identifier code.

    Best regards,

    Gareth

Answers

  • var extractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), "<your user id>", "<your password>");




    var instrumentList = new InstrumentList { Name = "Instrument List Name" };

    extractionsContext.InstrumentListOperations.Create(instrumentList);



    //Append a bad identifier which will return a validation error

    IEnumerable<InstrumentIdentifier> appendIdentifiers = new[] {

    new InstrumentIdentifier

    {

    Identifier = "0#FX=",

    IdentifierType = IdentifierType.ChainRic,

    UserDefinedIdentifier = "Should be valid."

    },

    {

    @",

    IdentifierType = IdentifierType.ChainRic,

    UserDefinedIdentifier = "Should be invalid."

    }

    };

    var result = extractionsContext.InstrumentListOperations.AppendIdentifiers(instrumentList, appendIdentifiers, false);



    //Output

    foreach (var message in result.ValidationResult.Messages)

    Debug.WriteLine("{0} ({1})", message.Message, message.Severity);



    var createdInstrumentList = extractionsContext.InstrumentListOperations.Get(instrumentList.ListId);



    extractionsContext.InstrumentListOperations.Delete(createdInstrumentList);

  • HTTP/1.1 200 OK
    {
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.SubjectLists.InstrumentsAppendIdentifiersResult",
    "ValidationResult": {
    "ValidInstrumentCount": 1,
    "OpenAccessSegments": [
    ],
    "StandardSegments": [
    ],
    "ValidationDuplicates": [
    ],
    "Messages": [
    {
    "Severity": "Info",
    @ (not found)"
    }
    ]
    },
    "AppendResult": {
    "AppendedInstrumentCount": 1,
    "AppendDuplicates": [
    ]
    }
    }