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 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
80.1k 257 52 75

@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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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