alpacahq / alpacahq/Alpaca-API

ExerciseStyle.EUROPEAN contracts aren't reported by TradingClient

Đang mở
#253 1 bình luận 4 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
174
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**
The Option Market Data API supports euro-style options but the Trading API does not. It's not (yet) a problem for us that trading in euro-style options isn't supported (we also need L3 which I understand is in the works) but we need the contract data for other things like algo development.

**To Reproduce**
Get an option chain for a euro-style option.
```
OptionHistoricalDataClient.get_option_chain(OptionChainRequest(underlying_symbol="XSP"))
```

That works as expected, like:
```
{'XSP240513C00480000': { 'greeks': None,
'implied_volatility': None,
'latest_quote': { 'ask_exchange': '?',
...
```
Try to get the contract details for any of those symbols:
```
TradingClient.get_option_contract(symbol_or_id='XSP240513C00480000')
```

That fails like this:

```
APIError: {"code":40410000,"message":"option contract XSP240513C00480000 not found"}
```

**Expected behavior**
Even if Alpaca doesn't support trading of euro-style options (yet), we still need the data in order to develop algos in anticipation of them being supported.

So either of:

1) TradingClient.get_option_contract and get_option_contracts calls should work when style is ExerciseStyle.EUROPEAN.

2) We need to have those functions in the OptionHistoricalDataClient too in order to provide data on options even if they can't be traded.

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.