Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 2 5 5

EkionDataApi Gold And Silver Time Stamp Issue

I sent this question yesterday to customersupport@refinitiv.com and they directed me to ask this question here. I state this so that the dates returned at the bottom make sense (they were pulled yesterday).


I'm trying to understand why the latest timestamps being returned differ between GCc1 and SIc1.

For GCc1 I get a timestamp of today with yesterdays close while for SIc1 I get yesterdays timestamp with yesterdays close value.

Would you be to explain why they both don't have the same timestamp as the latest data point?


For reference:

Code in C#

Package used to connect to Reuters is EikonDataAPI


    ...
    rtnRptVals.AddRange(GetCommodities(eikon, prefix: "Gold (US$/Troy Ounce)", ricCode: "GCc1"));
    rtnRptVals.AddRange(GetCommodities(eikon, prefix: "Silver (US$/Troy Ounce)", ricCode: "SIc1"));
    ...


private List<ReportValueModel> GetCommodities(IEikon eikon, string prefix, string ricCode)
{
  
    List<ReportValueModel> rtnRptVals = new List<ReportValueModel>();
    DateTime endDate = DateTime.Now;
    DateTime startDate = DateTime.Now.AddMonths(-13);

    Deedle.Frame<int, string> data = eikon.GetTimeSeries(
        ricCode,
        startDate,
        endDate,
        Interval.daily,
    new List<TimeSeriesField> { TimeSeriesField.VALUE, TimeSeriesField.CLOSE });

    var values = data.GetColumn<string>("CLOSE").Values.Reverse().ToList();
    var timeStamps = data.GetColumn<string>("TIMESTAMP").Values.Reverse().ToList();

    var latestTS = timeStamps.First();
    var latestVL = values.First();

    …

For ricCode = "GCc1" we have latestTS = "2022-05-26 12:00:00 AM" and latestVL = "1841.1"

For ricCode = "SIc1" we have latestTS = "2022-05-25 12:00:00 AM" and latestVL = "21.86"

eikon-data-apic#commoditiestimeseriestimestamp
icon clock
10 |1500

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

Hello @evan.lee ,

Could you please confirm about EikonDataAPI C# package that is used for this example? I am familiar with Eikon Data API Python, and ease of use library- Refinitiv Data Library NET, but this does not appear to be what you are using?

I have tested the same data request, with Eikon Data API Python and with Eikon Excel and I do not reproduce the issue, I can share more details if this would be helpful?

Thanks

The Packages NuGet URL. Version 0.4.3. I'm not using a more recent version because of compatibility issues.

I just tried running my code using version 0.5.0 and it threw several exceptions when trying to connect to Reuters.

Please let me know if you would need any other details.

hi @evan.lee ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Hello @evan.lee ,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

-AHS

Upvote
Accepted
32.2k 40 11 20

Hello @evan.lee ,

I was consequently able to load EikonDotNet v 0.4.8 and run a quick test:

DateTime endDate = DateTime.Now;
DateTime startDate = DateTime.Now.AddMonths(-1);

var data = eikon.GetTimeSeries(
                "SIc1",
                startDate,
                endDate
);

Console.WriteLine(data.ToString());

The result was:

Security TIMESTAMPHIGH     LOW      OPEN     CLOSE    VOLUME   COUNT
SIc1     4/28/2022 12:00:00 AM23.41    22.895   23.31    23.129   8170     -1
SIc1     4/29/2022 12:00:00 AM23.535   22.735   23.225   23.04    1021     -1
SIc1     5/2/2022 12:00:00 AM22.83    22.12    22.715   22.544   273      -1
SIc1     5/3/2022 12:00:00 AM22.785   22.475   22.64    22.621   167      -1
SIc1     5/4/2022 12:00:00 AM23.02    22.315   22.585   22.362   225      -1
SIc1     5/5/2022 12:00:00 AM23.245   22.37    23.12    22.4     768      -1
SIc1     5/6/2022 12:00:00 AM22.485   22.09    22.28    22.325   363      -1
SIc1     5/9/2022 12:00:00 AM22.19    21.665   22.17    21.782   693      -1
SIc1     5/10/2022 12:00:00 AM22       21.24    21.985   21.39    701      -1
SIc1     5/11/2022 12:00:00 AM21.805   21.31    21.415   21.55    434      -1
SIc1     5/12/2022 12:00:00 AM21.575   20.655   21.48    20.757   196      -1
SIc1     5/13/2022 12:00:00 AM21.115   20.64    20.64    20.984   35       -1
SIc1     5/16/2022 12:00:00 AM21.605   21.085   21.095   21.535   211      -1
SIc1     5/17/2022 12:00:00 AM21.72    21.555   21.655   21.737   197      -1
SIc1     5/18/2022 12:00:00 AM21.675   21.39    21.675   21.533   107      -1
SIc1     5/19/2022 12:00:00 AM21.87    21.425   21.435   21.898   100      -1
SIc1     5/20/2022 12:00:00 AMnull     null     null     21.669   23       -1
SIc1     5/23/2022 12:00:00 AM22.205   21.835   21.835   21.723   373      -1
SIc1     5/24/2022 12:00:00 AM22.065   22.035   22.065   22.063   101      -1
SIc1     5/25/2022 12:00:00 AM21.97    21.83    21.865   21.86    97       -1
SIc1     5/26/2022 12:00:00 AMnull     null     null     21.941   28       -1
SIc1     5/27/2022 12:00:00 AM22.395   22.01    22.01    22.08    105      36

So at this time, the CLOSE for 5/26 appears to be populated via EikonDotNet, however you may wish to verify the content via Refinitiv Helpdesk Online -> Content -> Eikon

icon clock
10 |1500

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

Upvotes
32.2k 40 11 20

Hello @evan.lee,

EikonDataAPI NET is a NET conversion and ease-of-use wrapper on Eikon Data API Python.

My thought is that the content that is retrieved should be the same as with Eikon Data API Python.

I have run a simple test with Eikon Data API Python and I see the content available, as follows:

start_date_time = '2021-04-27'
end_date_time = '2022-05-28'
ek.get_timeseries(['GCc1','SIc1'],
start_date = start_date_time,
end_date = end_date_time,
interval= 'daily')

The result:

silvergold.gif

I.e. CLOSE and TIMESTAMP are available for May 26th.

Are you able to test on your side,

var data = eikon.GetTimeSeries(
        'SIc1',
        startDate,
        endDate
    )                

without specifying fields and just output the whole results, without selecting columns, so that like to like can be compared?




silvergold.gif (83.0 KiB)
icon clock
10 |1500

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

After some testing I have a new question. Do all commodities have the same close time. If not. Where can I find the close time for a commodity?


I'm pretty sure now that the issue was that I made a request for data while one commodity had already closed and the other hadn't yet.

Hi @evan.lee ,

My understanding of this content is limited- I am a developer.

For a security that trades on an exchange, the close price should be the price at exchange closing, for daily time series, timestamp should be the date of the close price.

However, both these instruments are not assigned to a specific and same exchange. They are "Comet composite commodity future". Being a composite, the field values can be derived from multiple exchanges, rule-based, and if Gold is derived from one exchange, while Silver is from another, yes, in my understanding, their close times can be, as a result, different.

I would suggest to verify this matter directly with Refinitiv content support experts.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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