Programmatically request data for SPX Index and US Treasury Bill rate through C#.Net
Need guidance for following steps:
1. Programmatically login through a user name and password
2. Request SPX Index rate and US Treasury Bill rate
Do I need a different userid other than the one I am logged in with to programmatically login?
I do not need any continuous stream of data or historical data
I just need to fetch data for above two things
Please guide me through the same
Best Answer
-
The following page has some documentation on the DSDataTypes and DSDataTypeCodes:
http://product.datastream.com/dswsclient/Docs/netapihelp/html/N_ThomsonReuters_DswsApi.htm
I am not a Datastream expert so cannot answer your question.
Hopefully, a Datastream expert will answer your question. Alternatively, you can contact our helpdesk and raise a ticket with them.
0
Answers
-
@prashant.busa, Please download the .NET SDK and an Example application from https://hosted.datascopeapi.reuters.com/RestApi.Help/Home/Index. You can use the On Demand Extraction to get data for these RIC's.
The code snippets required to initiate this request can be seen in the C# window.
You can also follow along the .NET step by step tutorials with provided example code. The credentials you use with API are same as the one you use to login to DSS website.
0 -
You have posted your question in the TRTH section which is for the Tick History data API.
Reading your question it sounds more like you want to make a snapshot request for the current values as and when required in realtime. If this is the case, I can move this post to the appropriate section.
Also, in terms of the actual data, do you want the single S&P 500 Index rate or do you want the individual prices for all the constituents of the index?
Can you also expand on what exactly you mean by US Treasury Bill rate - what period etc - please provide more detail?
0 -
Thanks Umer for your replay
I wanted to know which is the correct section for my question
Yes I just want to make single requests for my data (something like Data License request in Bloomberg). Sorry, I am not familiar with Reuters terminology for these things.
Answering your 2 questions:
1. I just want single S&P 500 Index rate
2. I want US 10yr benchmark rate
Thanks,
Prashant Busa
0 -
1. Login programmatically using a user name and password
See the .Net C# tutorial 1.
Notes:
- The login you use for the Developer Community portal will not work, it is not a product access login. The TRTH user id and password are product specific (i.e. you need to be a TRTH customer to receive these).
- The user name and password are the same for use in the TRTH GUI and for programmatic access with the API.
2. Requesting rates
TRTH gives access to different types of historical data (historical ticks, market depth, bars, raw data, End of Day ...). How to request data therefore depends on what you want to retrieve.
I suggest you start by looking at the other .Net tutorials to see how to make requests.
I strongly recommend looking at the Quick Start as well, which introduces the C# example application; it is delivered with source code, and illustrates most of the API calls you can make.
To retrieve the SPX rate, the RIC is ".SPX". There are many RICs for US treasury bills rates. As an example, the RIC for the 1 month daily bill rate is "US1MFRB=RR".
0 -
Thanks for confirming that you want current prices for the single S&P 500 Index rate and the US 10yr benchmark rate.
Can you confirm what data source you will be connecting to? do you have a TREP server within your organisation? Or do you have an account for our Elektron Realtime in cloud service?
I ask because the API recommendation I make for .NET will differ based on your answer.
If you are not sure please ask your market data team or your Refinitiv Account manager.
If you have had a welcome email from Refinitiv which mentioned a MachineID then this would indicate a Cloud access point. If however, you were given a username by your internal market data team then this indicate a TREP Server.
0 -
Thanks Umer
I will get back with those answers from my business team
Thanks very much for your help
0 -
Thanks Christiaan
I got what you are saying.
0 -
Hi @Umer Nalla
We dont have TREP server or Elektron Realtime in cloud service
We have DFO (Datastream For Office) access
Is it possible to programmatically retrieve rates using this type of account/access?
Thanks in advance
Regards,
Prashant Busa
0 -
Thanks for confirming which product you have - I have moved the question to the correct forum.
You mentioned previously that you do not want historical data or streaming data - so that suggests you want realtime snapshots. If this is the case, then it would appear that Datastream is not the right product for your needs.
For realtime snapshots, you would need access to a Refinitiv Data platform account or an Eikon account or access to TREP server in your organisation. Please speak to your Refinitiv account manager / internal market data team to discuss these options further.
0 -
Thanks Umer
But most of the Eikon APIs requires that Thomson Reuters terminal should remain logged in on the same machine from where the programmatic request are done. This is difficult for us.
We have gained access for Datastream and are able to programmatically login and get token for our userid/password.
Now I am not able to find the correct "field" to get last EOD price of S&P 500 index
Sample datastream request is as under:
var request = new DSDataRequest()
{
Instrument = new DSInstrument(".SPX"),
DataTypes = new DSDataTypes(?),
Date = DSSnapshotDate(DSDateType.Absolute(DateTime.Now))
};Can you help me with correct datatype that I can use ?
0 -
Hi, The client should use Navigator to lookup datatypes for series.
PI is the closing price for the index
0 -
Navigator can be found here http://product.datastream.com/browse/search.aspx?dt=true&AppGroup=DSAddin
0 -
Thanks Gurpreet...
0 -
Thanks James
PI is giving me correct value
I learnt that in Datastream the mnemonic for S&P 500 index is S&PCOMP
And the mnemonic for US 10yr treasure bill is BMUS10Y
0 -
Thanks Umer
I learnt that in Datastream the mnemonic for S&P 500 index is S&PCOMP
And the mnemonic for US 10yr treasure bill is BMUS10Y
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛