polygon-io / feature-requests

Feature requests for the Polgon.io Platform. Any bug reports should be opened in polygon-io/issues/issuess
0 stars 0 forks source link

Stocks Grouped Daily (Bars) API returns invalid timestamps #33

Closed sergproua closed 1 year ago

sergproua commented 1 year ago

Stocks Grouped Daily (Bars) API documentation says t - The Unix Msec timestamp for the start of the aggregate window. which should be 00:00:00 (am) but it returns timestamps with 16:00:00 (pm) instead. Aggregates (Bars) API on the other hand work as expected.

Example below.

https://api.polygon.io/v2/aggs/grouped/locale/us/market/stocks/2023-01-09?adjusted=true

{
    "queryCount": 10953,
    "resultsCount": 10953,
    "adjusted": true,
    "results": [
        {
            "T": "TTMI",
            "v": 394280,
            "vw": 16.1078,
            "o": 15.96,
            "c": 16.08,
            "h": 16.335,
            "l": 15.96,
            "t": 1673298000000,
            "n": 5416
        },
...

167329800 converts to Monday January 09, 2023 16:00:00 (pm) in time zone America/New York (EST)

Aggregate Bars API returns timestamps as expected, example for the same ticker and date

https://api.polygon.io/v2/aggs/ticker/TTMI/range/1/day/2023-01-09/2023-01-09?adjusted=true&sort=asc&limit=120

{
    "ticker": "TTMI",
    "queryCount": 1,
    "resultsCount": 1,
    "adjusted": true,
    "results": [
        {
            "v": 394280,
            "vw": 16.1078,
            "o": 15.96,
            "c": 16.08,
            "h": 16.335,
            "l": 15.96,
            "t": 1673240400000,
            "n": 5416
        }
    ],
    "status": "OK",
    "request_id": "e2e0c5c9276e65fe7ae7ce49afda7967",
    "count": 1
}

1673240400 converts to Monday January 09, 2023 00:00:00 (am) in time zone America/New York (EST)

sergproua commented 1 year ago

Sorry, this is the wrong repo for bugs. Reopened it in issues https://github.com/polygon-io/issues/issues/250 Closing...