DSS Rest API request/response

preshan.govinder
LSEG
in DSS
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
Tagged:
0
Best Answer
-
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. \* ============== */
0
Answers
-
Duplicate of this thread.
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
- 687 Datastream
- 1.4K DSS
- 622 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
- 255 ETA
- 557 WebSocket API
- 38 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
- 276 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
- 680 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛