question

Upvotes
Accepted
45 4 3 9

Latest Revenue available prior to specific date - DSWS API

Hi,

I'm using the .net API for DSWS

I want to retrieve the last available value and date from a time series prior to a specific date.

For example:

  
                
  1. DSDataRequest reqDSRequest = new DSDataRequest()            {
  2. Instrument = new DSInstrument("VOD"),
  3.          DataTypes = new DSDataTypes("WC07240"),
  4. Date = ???
  5. };

Is this possible ?

Thanks,

Fergal

#technologydsws-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.

Upvote
Accepted
79.2k 251 52 74

@fergal.twomey

Thanks for reaching out to us.

You can try the following code.

 var request = new DSGetDataRequest()
            {
                TokenValue = tokenValue,
                DataRequest = new DSDataRequest()
                {
                    Instrument = new DSInstrument() { Value = "VOD" },
                    DataTypes = new[] { new DSDataType() { Value = "WC07240" } } ,
                    Date = new DSDate()
                    {
                        Kind = DSDateKind.TimeSeries,                     
                        Start = DSDateNames.BDATE.ToString(),
                        End = DSDateNames.LATESTDATE.ToString(),
                        Frequency = DSDateFrequencyNames.Y.ToString()
                    }
                }
            };

It gets yearly time-series data from BDATE to LATESTDATE.

For more information, please refer to Reference for DSService.svc - DSDataRequest.

I hope this will help.

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.

Upvotes
45 4 3 9

Thank you very much for response.

I wonder why when I add SECD and ISIN to the data types, the response is "Invalid Code or expression entered" for the symbol "VOD" even though the same symbol in same response for WC07240 is correctly returning values


1673611114884.png


1673611114884.png (39.8 KiB)
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.