alpacahq / alpacahq/Alpaca-API

A Bug about the Get Option Contracts Endpoint

Đang mở
#262 4 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**
Option contracts that have expired today are still considered "active" and can only be queried by specifying the status parameter to be "active".

For example, let's say today is 2024-09-20 and the time has passed 4:15pm, if I query QQQ options that expire on 2024-09-20 and if I specify the status parameter to be "inactive", no options will be returned. Conversely, the same query with the status parameter being "active" returns QQQ options that expire on 2024-09-20.

Since the options have expired after 4:15pm, there status after 4:15pm should be inactive. So it is the first query that should return data.

**To Reproduce**
On any trading day after 4:15pm, query this url and replace the date with the actual date: 'https://paper-api.alpaca.markets/v2/options/contracts?underlying_symbols=QQQ&expiration_date=2024-09-20'.

This bug can be reproduced by querying other late-close options as well.

**Expected behavior**
For the late-close options, their status should be active before 4:15pm on expiry date and inactive otherwise.

**Additional context**
Single name options, for instance, options of NVDA, appear not to have this bug.

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.