For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
11 1 3 3

DSS Rest API request/response

Hi,

Please provide an example of the DSS Rest API request/response results for the attached list of instruments. I can access the data via teh GUI but struggling to get it via the API.

Thanks

dss-rest-apidatascope-selectdss
capture1.jpg (34.2 KiB)
capture1.jpg (34.2 KiB)
icon clock
10 |1500

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

Duplicate of this thread.

1 Answer

Upvotes
Accepted
462 9 7 14

@preshan.govinder

Hi Preshan,

Here's an example of C# for On Demand - Intraday Pricing for DSS REST API using "InstrumentValidationOptions": AllowOpenAccessInstruments = true

Request:

var ExtractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), "<your user id>", "<your password>");

//Create the request var extractionRequest = new IntradayPricingExtractionRequest { IdentifierList = InstrumentIdentifierList.Create( new[] { new InstrumentIdentifier { Identifier = "XS1452710962=BARL", IdentifierType = IdentifierType.Ric }, new InstrumentIdentifier { Identifier = "XS1452800797=BARL", IdentifierType = IdentifierType.Ric }, new InstrumentIdentifier { Identifier = "XS1452801175=BARL", IdentifierType = IdentifierType.Ric } }, new InstrumentValidationOptions { UseExchangeCodeInsteadOfLipper = true, AllowHistoricalInstruments = false, AllowOpenAccessInstruments = true, ExcludeFinrAsPricingSourceForBonds = false, UseConsolidatedQuoteSourceForCanada = false, UseConsolidatedQuoteSourceForUsa = false, UseUsQuoteInsteadOfCanadian = true } , false), Condition = new IntradayPricingCondition { ScalableCurrency = true }, ContentFieldNames = new[] { "RIC", "Ask Price", "Asset Type", "Bid Price", "Currency Code", "Exchange Code", "High Price", "Instrument ID", "Instrument ID Type", "Low Price", "Open Price", "Previous Close Date", "Previous Close Price", "Security Description", "Settlement Price", "Trade Date", "User Defined Identifier", "Volume" } };
//Extract - NOTE: If the extraction request takes more than 30 seconds the async mechanism will be used. See Key Mechanisms var extractionResult = ExtractionsContext.ExtractWithNotes(extractionRequest); var extractedRows = extractionResult.Contents;
//Output if (!extractedRows.Any()) Debug.WriteLine("No rows returned"); else { foreach (var row in extractedRows) Debug.WriteLine( row.Identifier + " (" + row.IdentifierType + ") " + String.Join(", ", row.DynamicProperties.Select(dp => dp.Key + "=" + dp.Value))); } //Output Notes Debug.WriteLine("NOTES:"); foreach (var note in extractionResult.Notes) Debug.WriteLine(note);

Response:

/* === OUTPUT === *\ XS1452710962=BARL (Ric) RIC=XS1452710962=BARL, Ask Price=120.54, Asset Type=, Bid Price=119.54, Currency Code=USD, Exchange Code=RCT, High Price=, Instrument ID=XS1452710962=BARL, Instrument ID Type=RIC, Low Price=, Open Price=, Previous Close Date=03/10/2018 00:00:00, Previous Close Price=119.94, Security Description=, Settlement Price=, Trade Date=04/10/2018 00:00:00, Volume= XS1452800797=BARL (Ric) RIC=XS1452800797=BARL, Ask Price=111.94, Asset Type=, Bid Price=110.94, Currency Code=USD, Exchange Code=RCT, High Price=, Instrument ID=XS1452800797=BARL, Instrument ID Type=RIC, Low Price=, Open Price=, Previous Close Date=24/10/2018 00:00:00, Previous Close Price=111.05, Security Description=, Settlement Price=, Trade Date=25/10/2018 00:00:00, Volume= XS1452801175=BARL (Ric) RIC=XS1452801175=BARL, Ask Price=110.25, Asset Type=, Bid Price=109.25, Currency Code=GBP, Exchange Code=RCT, High Price=, Instrument ID=XS1452801175=BARL, Instrument ID Type=RIC, Low Price=, Open Price=, Previous Close Date=24/10/2018 00:00:00, Previous Close Price=109.6, Security Description=, Settlement Price=, Trade Date=25/10/2018 00:00:00, Volume= NOTES: Extraction Services Version 12.2.39749 (667ea36e4050), Built Oct 18 2018 18:03:24 User has overridden estimates broker entitlements. Processing started at 25/10/2018 130734. User ID: 9004676 Extraction ID: 328823090 Schedule: _OnD_0x0661d765609015ff (ID = 0x0661d765640015ff) Input List (3 items): _OnD_0x0661d765609015ff (ID = 0661d765617015ff) Created: 25/10/2018 130731 Last Modified: 25/10/2018 130732 Schedule Time: 25/10/2018 130732 Report Template (23 fields): _OnD_0x0661d765609015ff (ID = 0x0661d76560d015ff) Created: 25/10/2018 130732 Last Modified: 25/10/2018 130732 No prices needed currency scaling. Real-time data was snapped at 25/10/2018 130734, it was scheduled to snap at 25/10/2018 130732. No embargo required for this report. Processing completed successfully at 25/10/2018 130734, taking 0.712 Secs. Extraction finished at 25/10/2018 120734 UTC, with servers: x08I16, QSHC15 (0.0 secs), QSSHA1 (0.1 secs) No usage to report -- 3 Instruments in the input list had no reported data. No TRPS complex usage to report -- 3 Instruments in the input list had no reported data. \* ============== */
icon clock
10 |1500

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

Click below to post an Idea Post Idea