Search code examples
yahoo-finance

How is the period variable calculated for yahoo finance historicals?


When you set the date range for historical prices the js redirects with url variables period1 and period2. For example for Time Period: Jul 30, 2015 - Aug 30, 2015 the resulting url is as follows. period1=1438228800&period2=1440907200

https://ca.finance.yahoo.com/quote/GOOG/history?period1=1438228800&period2=1440907200&interval=1d&filter=history&frequency=1d

Anyone know how period1 and period2 were calculated?


Solution

  • Unix timestamp (seconds since January 1, 1970)