How to use DS.SymbolLookup in DSWS .Net API

Hi. I am trying to replicate as near as possible the functionality of the Find Series button in the Excel Datastream DFO. I have been advised that there is a function called DS.SYMBOLLOOKUP. Do you have an example of how to form this request in the .NET API?

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @rmcelroy

    I found an answer on this thread. The code looks like:

    var request = new DSDataRequest()
    {
        Instrument = new DSInstrument("Vodafone"),
        DataTypes = new DSDataTypes("DS.SYMBOLLOOKUP"),
        Date = new DSSnapshotDate(DSDateType.Absolute(DateTime.Now)),
    };


    var response = DSClient.DataService.GetData(request);
    foreach(var Values in response.DataTypeValues)
    {
        foreach(var symbolValue in Values.SymbolValues)
        {
            Console.WriteLine("{0} {1}", symbolValue.Symbol, symbolValue.Value);
        }
    }

    The output is:

    VOD Vodafone Group
    QA:VOD Vodafone Qatar
    IN:ILC Vodafone Idea
    EG:VFE Vodafone Egypt Telecom
    821XRP Vodafone Group PLC 2015 3.215% 27/11/25