alpacahq / alpacahq/Alpaca-API

Inconsistency with timezones

Đang mở
#241 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
173
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**
There seem to be an inconsistency concerning timezones. Different parts of the API apparently use different timezones when using timestamps.

**To Reproduce**
Steps to reproduce the behavior:
1. Request a calendar object from the api [(Link)](https://alpaca.markets/docs/api-references/broker-api/calendar/#retrieving-the-market-calendar) and look at the response.
2. Request market data and compare the timestamps (and there respective price values) of the response with market data from a third source (in my case Tradingview).

**Expected behavior**
Both responses should use the same timezone for the timestamps of their response. As you see below, apparently they don't.

**Screenshots**
![grafik](https://user-images.githubusercontent.com/16038169/199809653-0bb979d8-ec04-497d-b834-a9266da9c391.png)
The requested calendar object seem to indicate that the UTC-4 timezone is used.

![grafik](https://user-images.githubusercontent.com/16038169/199810063-ab2d8442-30c1-407f-9e24-2a1426abf154.png)
![grafik](https://user-images.githubusercontent.com/16038169/199810191-f6ae743d-56d1-4f59-85f9-d945d398c004.png)
These are charts for symbol "QQQ" on 2nd Nov 2022. Comparing the requested market data and the data from tradingview (which in my case uses UTC +1), it seems like the market data from the Alpaca API uses timestamp from timezone UTC +0. Is that correct or am i missing something?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.