I'm using the Usage Example of Eikon .NET APIs (https://developers.refinitiv.com/content/dam/devportal/api-families/eikon/net-apis-for-use-in-custom-applications/downloads/usage-example-time-series-api.zip) to get our local RIC, but the result always missing the last hour of trading.
Below is the code to get the last 350 rows:
public void Launch()
{
Console.WriteLine("[2] Time series request example");
Console.WriteLine("");
request = timeSeries.SetupDataRequest("AALI.JK")
.WithAllFields()
.WithInterval(CommonInterval.Intraday1Minute)
.WithNumberOfPoints(350)
.OnDataReceived(DataReceivedCallback)
.CreateAndSend();
}
private void DataReceivedCallback(DataChunk chunk)
{
foreach (IBarData bar in chunk.Records.ToBarRecords())
{
if (bar.Open.HasValue && bar.High.HasValue && bar.Low.HasValue && bar.Close.HasValue && bar.Timestamp.HasValue)
{
double vol = 0;
if (bar.Volume != null)
vol = bar.Volume.Value;
Console.WriteLine(
"AALI.JK OHLC {0} {1} => {2}; {3}; {4}; {5}; {6}; {7}; {8}",
bar.Timestamp.Value.ToShortDateString(),
bar.Timestamp.Value.ToShortTimeString(),
bar.Timestamp.Value.ToString("yyyyMMdd"),
bar.Timestamp.Value.ToLocalTime(),
bar.Open.Value.ToString("##.0000"),
bar.High.Value.ToString("##.0000"),
bar.Low.Value.ToString("##.0000"),
bar.Close.Value.ToString("##.0000"),
vol.ToString("##.0000"));
};
}
Below is the output snippet:
AALI.JK OHLC 08/06/2023 08:48 => 20230608; 08/06/2023 15:48:00; 7250,0000; 7250,0000; 7250,0000; 7250,0000; 8300,0000
AALI.JK OHLC 08/06/2023 08:49 => 20230608; 08/06/2023 15:49:00; 7250,0000; 7250,0000; 7250,0000; 7250,0000; 2600,0000
AALI.JK OHLC 08/06/2023 08:50 => 20230608; 08/06/2023 15:50:00; 7250,0000; 7250,0000; 7250,0000; 7250,0000; 3800,0000
AALI.JK OHLC 09/06/2023 02:01 => 20230609; 09/06/2023 09:01:00; 7275,0000; 7300,0000; 7250,0000; 7300,0000; 14900,0000
AALI.JK OHLC 09/06/2023 02:02 => 20230609; 09/06/2023 09:02:00; 7275,0000; 7275,0000; 7275,0000; 7275,0000; 1100,0000
AALI.JK OHLC 09/06/2023 02:04 => 20230609; 09/06/2023 09:04:00; 7275,0000; 7300,0000; 7275,0000; 7300,0000; 1700,0000
Compare to the output from excel
=RHistory("AALI.JK",".Timestamp;.Open;.High;.Low;.Close;.volume","NBROWS:375 INTERVAL:1M",,"TSREPEAT:NO CH:Fd",B2)
20230609,090400 7275 7300 7275 7300 1700
20230609,090200 7275 7275 7275 7275 1100
20230609,090100 7275 7300 7250 7300 14900
20230608,161400 7250 7250 7250 7250 200
20230608,161200 7250 7250 7250 7250 5000
20230608,160300 7250 7250 7250 7250 200
20230608,160200 7250 7250 7250 7250 100
20230608,160100 7250 7250 7250 7250 39200
20230608,155000 7250 7250 7250 7250 3800
20230608,154900 7250 7250 7250 7250 2600
You can see the time-series-api is missing the data after 15:50:00. Is there a way to get the missing data?