alpacahq / alpacahq/Alpaca-API

Calendar API can get confused about dates

Đang mở
#157 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**

When asked for market days between 1900-01-01 and 1900-12-31, the `calendar` API returns a single day, **1970-01-02**.

**To Reproduce**
`GET https://paper-api.alpaca.markets/v2/calendar?start=1900-01-01&end=1900-12-31`

**Expected behavior**
I'd expect it to return an empty array, that is, no days.
Or an error indicating data for that time is unknown.

**Additional context**

```
response {
method: 'GET',
path: 'https://paper-api.alpaca.markets/v2/calendar?start=1900-01-01&end=1900-12-31',
statusCode: 200,
statusMessage: 'OK',
headers: {
server: 'nginx/1.16.1',
date: 'Sat, 30 Jan 2021 00:11:54 GMT',
'content-type': 'application/json; charset=UTF-8',
'content-length': '99',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
vary: 'Origin'
},
body: [
{
date: '1970-01-02',
open: '09:30',
close: '16:00',
session_open: '0700',
session_close: '1900'
}
]
}
```

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.