How to call a service that will return all spot rates?
For a deeper look into our DataScope Select SOAP API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials
How to call a service that will return all spot rates?
@Mark_Huhnke, can you please explain what you are trying to achieve ? Are you looking for a price snapshot (i.e. the current price), end of day values, a series of historical values through time (to create a chart) ? Something else ?
For a current price snapshot you must use an Intraday request, it is described in REST tutorial 3. The tutorial uses the ExtractWithNotes endpoint, but if you prefer you can use ExtractRaw. ExtractWithNotes returns data in JSON format, ExtractRaw returns a compressed CSV. These 2 endpoints use a different workflow, the differences are described in the Tutorial Introduction, in this section (you must scroll down to header "Extract, ExtractWithNotes or ExtractRaw ?").
Assuming you use ExtractRaw, the request is a POST to endpoint:
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw
Here is the JSON body:
{ "ExtractionRequest": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.IntradayPricingExtractionRequest", "ContentFieldNames": [ "Ask Price", "Bid Price", "High Price", "Last Price", "Low Price", "Open Price", "Volume" ], "IdentifierList": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "CAD=", "IdentifierType": "Ric" }, { "Identifier": "EUR=", "IdentifierType": "Ric" } ] } } }
In this example we put the instruments directly in the request body. If you prefer you can refer to an existing RIC list saved on the server. For that you would change the body of the request to refer to the instrument list ID, like this:
"IdentifierList": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentListIdentifierList", "InstrumentListId":"0x0563b417673b5841" }
For more details on that, see REST Tutorial 9.
@Mark_Huhnke, does this thread answer your query ?
If not, please give us details on what you want to achieve.
@Christiaan Meihsl we are looking for a price snapshot(current price). It would be helpful if you can tell us the Extractions --> OnDemanExtractions --> ExtractRaw --> ExtractionRequest name to which helps us to construct the JSON request to pull the required data.
To give you the context: we created an instrumentlist(RIC codes Eg: CAD=) and trying to pull the current price for the all the listed instruments in the list. @Mark_Huhnke
@Christiaan MeihslIf I use the above POST with instrument identifiers. I'm getting the below result. As I see there is no data for "Ask Price", "Bid Price", "High Price", "Last Price", "Low Price", "Open Price", "Volume". What am I doing wrong?
{ "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity", "JobId": "0x066d85bb4e702101", "Notes": [ "Extraction Services Version 12.2.39833 (738e4c2fbb28), Built Nov 1 2018 10:43:11\r\nProcessing started at 30112018 09:45:41 PM.\r\nUser ID: 9005595\r\nExtraction ID: 334671851\r\nSchedule: _OnD_0x066d85bb4e702101 (ID = 0x066d85bb52102101)\r\nInput List (2 items): _OnD_0x066d85bb4e702101 (ID = 066d85bb51102101) Created: 30112018 09:45:39 PM Last Modified: 30112018 09:45:39 PM\r\nSchedule Time: 30112018 09:45:40 PM\r\nReport Template (7 fields): _OnD_0x066d85bb4e702101 (ID = 0x066d85bb4eb02101) Created: 30112018 09:45:39 PM Last Modified: 30112018 09:45:39 PM\r\nReal-time data was snapped at 30112018 09:45:41 PM, it was scheduled to snap at 30112018 09:45:40 PM.\r\nNo embargo required for this report.\r\nProcessing completed successfully at 30112018 09:45:41 PM, taking 0.147 Secs.\r\nExtraction finished at 30112018 04:15:41 PM UTC, with servers: x09I10, QSHC19 (0.0 secs), QSSHA1 (0.0 secs)\r\nUsage Summary for User 9005595, Client 102430, Template Type Intraday Pricing\r\nBase Usage\r\n Instrument Instrument Terms Price\r\n Count Type Subtype Source Source\r\n------- ----------------------------------- ---------------------------- -------------- ----------------------------------------\r\n 2 Money Market N/A N/A\r\n-------\r\n 2 Total instruments charged.\r\n 0 Instruments with no reported data.\r\n=======\r\n 2 Instruments in the input list.\r\nNo TRPS complex usage to report -- 2 Instruments in the input list had no reported data.\r\n" ] }
nothing is wrong :-)
As you mentioned the ExtractRaw endpoint earlier, I used it in my response, sorry if that caused some confusion. From your query I guess you are more used to the ExtractWithNotes endpoint, which is used in REST tutorials 2-8.
These 2 endpoints use different workflows, the differences are described in the Tutorial Introduction, in this section (you must scroll down to header "Extract, ExtractWithNotes or ExtractRaw ?").
Let me briefly explain the workflow from the point where you are right now. In the response you received, there is a JobId. All you need to do is do a GET to the following endpoint:
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/RawExtractionResults('0x066d85bb4e702101')/$value
Note that this URL contains your JobId. This will deliver the data (in compressed CSV format).
For more information on the workflows you can also compare REST API Tutorial 14 with REST API Tutorial 4; both do the same extraction, but 14 uses ExtractRaw whereas 4 uses ExtractWithNotes.