Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Datastream /
avatar image
Question by vishal.kak · Jun 11, 2021 at 09:14 AM · datastream-apidsws-api.net

Ho to get Datastream .net DSClient.DataService.GetData to use https instead of http

I am using ThomsonReuters.DswsApi.NET4.5 dll to connect to data stream.

When I call DSClient.DataService.GetData method the dll internally uses “http://product.datastream.com/dswsclient/V1/DSService.svc”

We are getting firewall issues to using http endpoint and need to use https instead

Can you advise how I could ensure that datastream getData api call uses “https://product.datastream.com/DswsClient/V1/DSService.svc“

Is it possible to override?

Here is my code snippet

         DSClient.Options.UserName = “”;
         DSClient.Options.Password = “”;
         DSClient.Init();
 
         var datatype = "P";
         var request = new DSDataRequest()
         {
             Instrument = new DSInstrument(identifier),
             DataTypes = new DSDataTypes(datatype),
             Date = new DSTimeSeriesDate(DSDateType.Literal("-2Y"), DSDateType.Literal(""), DSDateFrequency.Daily),
         };
 
         var response = DSClient.DataService.GetData(request);
 
         double[] prices = response[datatype][identifier].GetValue<double[]>();

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

9 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Jirapongse · Jun 15, 2021 at 03:15 PM

@vishal.kak

I used the same code shared in another question: https://community.developers.refinitiv.com/questions/79515/how-can-i-return-date-with-corresponding-value-whe.html.

The fiddler output is:

1623769220890.png

In the DswsApiFor.NET4.5 package, the readme file mentions:

Note. From December 2020 Datastream will be restricting Transport layer Security (TLS) to a minimum of version 1.2. 

It also explains the options to support TLS 1.2. You may need to verify it.

You may add the following configurations into the App.config file.

  <system.diagnostics>
    <trace autoflush="true"/>
    <sources>
      <source name="System.Net" maxdatasize="1024">
        <listeners>
          <add name="TraceFile"/>
        </listeners>
      </source>
      <source name="System.Net.Sockets" maxdatasize="1024">
        <listeners>
          <add name="TraceFile"/>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="TraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.log"/>
    </sharedListeners>
    <switches>
      <add name="System.Net" value="Verbose"/>
      <add name="System.Net.Sockets" value="Verbose"/>
    </switches>
  </system.diagnostics>

1623769746386.png

The trace.log file will be created. We may be able to use this file to verify the problem.


1623769220890.png (68.5 KiB)
1623769746386.png (38.8 KiB)
Comment
vishal.kak

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Jirapongse ♦♦ · Jun 15, 2021 at 03:17 PM 0
Share

Program.cs.txt

App.config.txt

programcs.txt (1.0 KiB)
appconfig.txt (896 B)
avatar image
REFINITIV
Answer by Jirapongse · Jun 11, 2021 at 10:50 AM

@vishal.kak

How do you verify that the library uses http://product.datastream.com/dswsclient/V1/DSService.svc instead of https://product.datastream.com/DswsClient/V1/DSService.svc?

I ran the application with Fiddler and found that it uses https://product.datastream.com/DswsClient/V1/DSService.svc.

10875-image.png


image.png (29.1 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by vishal.kak · Jun 14, 2021 at 09:58 AM

I used fiddler as well, it uses http. Here is the screenshot

1623664417417.png

I am using ThomsonReuters.DswsApi.NET4.5.dll File Version 1.0.1.0

Are you using same dll?


1623664417417.png (2.9 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Alex Putkov.1 · Jun 14, 2021 at 11:29 PM

@vishal.kak

You need to change the protocol in the URL for Datastream Web Services endpoint in App.config file in your project. You may also need to add Security node to the XML with mode="Transport" attribute, as follows:

<system.serviceModel>
        <bindings>
            <basicHttpBinding>
              <binding name="BasicHttpBinding_IDSService">
                <security mode="Transport" />
              </binding> 
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://product.datastream.com/DswsClient/V1/DSService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDSService"
                contract="DSWSReference.IDSService" name="BasicHttpBinding_IDSService" />
        </client>
</system.serviceModel>

For more details see Getting Started chapter in DSWS Tutorial - Microsoft Visual Studio.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Alex Putkov.1 · Jun 15, 2021 at 12:01 AM

@vishal.kak

I just realized you mentioned that you use ThomsonReuters.DswsApi.NET4.5.dll, which I'm not familiar with. Where did you get it from?
My previous response assumed you were using Datastream Web Service WSDL, as described in DSWS Tutorial - Microsoft Visual Studio.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Jirapongse · Jun 15, 2021 at 02:01 AM

@vishal.kak

I am using Datastream.DswsApi.NET4.5.dll 1.1.1.0 available at http://product.datastream.com/DswsClient/Docs/Downloads.aspx.

1623722340674.png

I have tested it with the NET API + Samples (4.5).


1623722340674.png (21.7 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by vishal.kak · Jun 15, 2021 at 01:34 PM

@jirapongse.phuriphanvichai

I tested using Datastream.DswsApi.NET4.5.dll 1.1.1.0

I can still see http in fidder

Can you share/upload your test sample code so I could take a look


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by vishal.kak · Jun 15, 2021 at 01:36 PM

@Alex Putkov.

I got ThomsonReuters.DswsApi.NET4.5.dll from http://product.datastream.com/DswsClient/Docs/Downloads.aspx

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by vishal.kak · Jun 17, 2021 at 02:19 PM

@jirapongse.phuriphanvichai

Thanks, the latest version uses https instead of http.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

DSWS .NET API - Get "Latest Value" of a Time Series

Status code 0 instead of 202

Can you easily convert a DSDataResponse object to a datatable in C#

FTSE price history using Datastream .net api

How can I return date with corresponding value when calling GetData with DSTimeSeriesDate using datastream .net api

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges