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[]>();
Best Answer
-
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:
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>The trace.log file will be created. We may be able to use this file to verify the problem.
0
Answers
-
@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][1]
[1]: /storage/attachments/10875-image.png
0 -
I used fiddler as well, it uses http. Here is the screenshot
I am using ThomsonReuters.DswsApi.NET4.5.dll File Version 1.0.1.0
Are you using same dll?
0 -
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.
0 -
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.0 -
I am using Datastream.DswsApi.NET4.5.dll 1.1.1.0 available at http://product.datastream.com/DswsClient/Docs/Downloads.aspx.
I have tested it with the NET API + Samples (4.5).
0 -
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
0 -
I got ThomsonReuters.DswsApi.NET4.5.dll from http://product.datastream.com/DswsClient/Docs/Downloads.aspx
0 -
Thanks, the latest version uses https instead of http.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 637 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 88 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛