Jump to content
  • 0

Daily histrorical data - interpretation of UTC (?) date stamp and daylight savings

Question

Hi everyone,

I am working to download historical daily data via the REST API (crypto EPICs mainly - e.g. CS.D.BCHUSD.CFD.IP). 

I believe the timestamp that comes with the data us UTC. I am finding that for the period where AEST is in daylight savings time (DST), e.g. Oct-6-2019 - Apr-5-2020, the date stamp changes. Here are two corresponding transitions:

Here's what the REST API looks like around Oct-6

Quote

 

Response from IG REST API

{'prices':                         bid                             ask                         spread                  last                         

                       Open    High     Low   Close    Open    High     Low   Close   Open High  Low Close  Open  High   Low Close Volume

DateTime                                                                                                                                 

2019:10:04-00:00:00  221.72  223.35  215.64  222.62  223.72  225.35  217.64  224.62    2.0  2.0  2.0   2.0  None  None  None  None  24155

2019:10:05-00:00:00  222.63  224.51  217.35  220.59  224.63  226.51  219.35  222.59    2.0  2.0  2.0   2.0  None  None  None  None  15863

2019:10:06-00:00:00  220.58  222.86  217.54  219.96  222.58  224.86  219.54  221.96    2.0  2.0  2.0   2.0  None  None  None  None  19415

2019:10:06-23:00:00  219.94  229.79  214.72  228.05  221.94  231.79  216.72  230.05    2.0  2.0  2.0   2.0  None  None  None  None  33125

2019:10:07-23:00:00  228.06  238.31  228.05  231.62  230.06  240.31  230.05  233.62    2.0  2.0  2.0   2.0  None  None  None  None  32501, 'instrumentType': 'CURRENCIES', 'allowance': {'remainingAllowance': 9992, 'totalAllowance': 10000, 'allowanceExpiry': 602836}}

 

And here's what it looks like around April-5 2020

Quote

 

Response from IG REST API

{'prices':                         bid                             ask                         spread                  last                          

                       Open    High     Low   Close    Open    High     Low   Close   Open High  Low Close  Open  High   Low Close  Volume

DateTime                                                                                                                                  

2020:04:02-23:00:00  225.78  248.33  224.26  236.75  227.78  250.33  226.26  238.75    2.0  2.0  2.0   2.0  None  None  None  None  106597

2020:04:03-23:00:00  236.81  238.76  229.59  234.14  238.81  240.76  231.59  236.14    2.0  2.0  2.0   2.0  None  None  None  None   47901

2020:04:04-23:00:00  234.15  241.81  233.12  235.39  236.15  243.81  235.12  237.39    2.0  2.0  2.0   2.0  None  None  None  None   59462

2020:04:06-00:00:00  235.37  245.53  224.56  243.58  237.37  247.53  226.56  245.58    2.0  2.0  2.0   2.0  None  None  None  None   65707

2020:04:07-00:00:00  243.57  264.96  241.44  258.13  245.57  266.96  243.44  260.13    2.0  2.0  2.0   2.0  None  None  None  None   84988

2020:04:08-00:00:00  258.14  279.18  245.70  259.45  260.14  281.18  247.70  261.45    2.0  2.0  2.0   2.0  None  None  None  None  103281

2020:04:09-00:00:00  259.48  273.91  252.52  261.94  261.48  275.91  254.52  263.94    2.0  2.0  2.0   2.0  None  None  None  None   95054

2020:04:10-00:00:00  261.95  262.39  231.19  235.09  263.95  264.39  233.19  237.09    2.0  2.0  2.0   2.0  None  None  None  None   97915, 'instrumentType': 'CURRENCIES', 'allowance': {'remainingAllowance': 5197, 'totalAllowance': 10000, 'allowanceExpiry': 253266}}

 

So two questions:

1. Why does this happen? UCT is UCT - 00:00:00 corresponds to the start of the day for a 24 hr period. I don't know why it would shift just because we're in DST in AEST.  Is it that the actual reference point for a 24 hr period is 10am -10am AEST, and when DST starts, the UTC adjusts? And then the actual daily/24hr data then 23:00:00 UCT to 23:00:00 UCT? 

2. So you end up with dates within DST shifted by 1 day, which can be fixed post-REST-API - but is there another way to deal with this within the API itself?

Thanks for any advice...

Steven.

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
You are posting as a guest. If you have an account, please sign in.
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Member Statistics

    • Total Topics
      11,921
    • Total Posts
      60,340
    • Total Members
      80,306
    Newest Member
    DonCan
    Joined 10/08/20 11:30
  • Posts

    • Integrate v.11 of PRT with IG. Why are IG still using PRT v.10.3, when v11. which contains many significant improvements, was released over a year ago?
    • 1 last post - couldn't help myself!!! Simple 1 x 1 Gann Angles projected from the high/low price points - I'll admit that this is ultra advanced trading stuff here, the message here is two-fold The markets regardless of what you think or have been told are NOT random, they HAVE no choice but to work out a pre-set course according to their growth or decay Gann Angles are far far better at identifying support/resistance levels - BECAUSE the market or specifically price action is NOT 2D, we can clearly see price conforms to a grid system movement - that ain't 2Dimensional! You could blindly trade those gann angles if you have the right level of expertise and knowledge of them - look at the blue circles - price rallied then fell back to them and bounced pretty accurately, they won't all work and the highest swing high is under threat at which you can't project further levels from Again here's the secret of success - you could of skewed the R value into your favour by having a 20/25pt stop underneath, trailed a stop and made fantastic R value returns Gann said over 100 years ago "Markets are financial points of force and that EVERY low/high is connected to another low/high point of force in the FUTURE, as well as in the past" As you can clearly SEE - he was absolutely right - very few people look at the markets right, when you do you see things completely differently to most other traders/investors There's some real science behind markets moves - I might do a post in future months as understanding what is actually going on helps you see through the fog and makes things a bit clearer  I'll admit I've studied Gann for years and it is not easy, it is very hard to grasp - he hides hidden messages in his course that can throw you off for months and when you to apply his methods some just do not work
    • Indeed🤓
×
×