question

Upvotes
Accepted
1 0 0 0

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?

datastream-apidsws-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea