Request for On Demand IntraDay Bars not readable response
Hello support,
I would like to pull all the available data for a contract during the period of First trade data to Current data/Last Trade date through on demand request.
But unfortunately waiting with lots of time, some of the response lines are contains special characters and different length. so can't parse the data as per expectation for analysis.
Please help me and let me know if we are missing something.
Best Answer
-
Hi @ziaul : EndOfDayPricingReportTemplate retrieves instrument last EOD or today's EOD data only (1-day data). From your initial question, I think you're looking for a complete history of data and I would recommend using "PriceHistoryReportTemplate"
Attaching sample code for "PriceHistoryReportTemplate". Please let me know if you have any further questions.
/Create the request
var extractionRequest = new ElektronTimeseriesExtractionRequest()
{
IdentifierList = new InstrumentIdentifierList()
{
InstrumentIdentifiers = new[] { new InstrumentIdentifier { Identifier = "TRI.N", IdentifierType = IdentifierType.Ric } }
},
Condition = new ElektronTimeseriesCondition
{
ReportDateRangeType = ReportDateRangeType.Range,
QueryStartDate = new DateTimeOffset(new DateTime(2015, 12, 1)),
QueryEndDate = new DateTimeOffset(new DateTime(2015, 12, 2))
},
ContentFieldNames = new[]
{
"Ask", "Bid", "High", "Last", "Low", "Trade Date"
}
};
//Extract - NOTE: If the extraction request takes more than 30 seconds the async mechansim 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);
/* === OUTPUT === *\
TRI.N (Ric) Ask=41.07, Bid=41.05, High=41.15, Last=41.05, Low=40.45, Trade Date=12/1/2015 12:00:00 AM
TRI.N (Ric) Ask=41.08, Bid=41.07, High=41.23, Last=41.07, Low=40.91, Trade Date=12/2/2015 12:00:00 AM
NOTES:
Extraction Services Version 11.3.37834 (fdf4aaf12f3f), Built Nov 13 2017 19:11:21
Processing started at 11/14/2017 11:13:08 AM.
User ID: 20058
Extraction ID: 160000074339
Schedule: 0x05f2f98090884050 (ID = 0x0000000000000000)
Input List (1 items): (ID = 0x05f2f98090884050) Created: 11/14/2017 11:13:08 AM Last Modified: 11/14/2017 11:13:08 AM
Report Template (12 fields): _OnD_0x05f2f98090884050 (ID = 0x05f2f980a6d84050) Created: 11/14/2017 11:13:06 AM Last Modified: 11/14/2017 11:13:06 AM
Schedule dispatched via message queue (0x05f2f98090884050)
Schedule Time: 11/14/2017 11:13:07 AM
Timeseries Date Range: 12/01/2015 to 12/02/2015
Processing completed successfully at 11/14/2017 11:13:08 AM, taking 0.154 Secs.
Extraction finished at 11/14/2017 05:13:08 PM UTC, with servers: x04q12, ETS (0.1 secs), QSDEV1 (0.0 secs), QSRB01 (0.0 secs)
Quota Message: INFO: Tick History Compliance Quota Count Before Extraction: 2; Instruments Approved for Extraction: 1; Tick History Compliance Quota Count After Extraction: 2, 0.2% of Limit; Tick History Compliance Quota Limit: 10000
Answers
-
Hi @ziaul : May i know which template do you use to extract above information ?
0 -
@Ramprasad.Kumaralu.J I am looking for "EndOfDayPricingReportTemplate" report template using C# .NET
I am looking for Daily candle. Please help me
0 -
Hi @Ramprasad.Kumaralu.J, Thank you for your quick response.
Please help me to get 5 Mins candle data with Maximum duration for a contract. Can I use the same above request & response?
Sample code would be really appreciated.
Thanks
0 -
Hi @ziaul: sorry, initially, I did not get your requirement but now it is clear.
Please use TickHistoryIntradaySummariesExtraction
You may give a try with below code
//Request an extraction
ExtractionsContext.Options.AutomaticDecompression = true; //Decompress gzip to plain text
var startDate = new DateTimeOffset(2008, 10, 13, 13, 0, 0, TimeSpan.FromHours(-5)); //Central Time Zone
var endDate = startDate.AddHours(1);
var result = ExtractionsContext.ExtractRaw(
new TickHistoryIntradaySummariesExtractionRequest
{
Condition = new TickHistoryIntradaySummariesCondition
{
//Possible values: OneSecond, FiveSeconds, OneMinute, FiveMinutes, TenMinutes, FifteenMinutes, OneHour
SummaryInterval = TickHistorySummaryInterval.OneMinute,
//Possible values: Ric, Entity
ExtractBy = TickHistoryExtractByMode.Ric,
MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
ReportDateRangeType = ReportDateRangeType.Range,
QueryStartDate = startDate,
QueryEndDate = endDate,
//Possible values: SingleByRic, SingleByTimestamp
SortBy = TickHistorySort.SingleByRic,
TimebarPersistence = true,
DisplaySourceRIC = true
},
ContentFieldNames = availableFields.Select(x => x.Name).ToArray(),
IdentifierList = new InstrumentIdentifierList
{
InstrumentIdentifiers = new[]
{
InstrumentIdentifier.Create(IdentifierType.Ric, "EUR=")
}
},
});0 -
@Ramprasad.Kumaralu.J, were you able to do this ? Does this solve your issue ?
0 -
Thank you very much for your reply and am able to resolve my issue.
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
- 621 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 254 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
- 669 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
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛