alpacahq / alpacahq/alpaca-py

[Bug]: NewsRequest classs param:symbols designed to take List[str] for symbols but can only take a single symbol as str

Đang mở
#526 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.5k
Fork
398
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
6

Mô tả

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Error when using NewsRequest with multiple symbols.

```
from alpaca.data.historical.news import NewsClient
from alpaca.data.requests import NewsRequest

NewsClient().getnews(request_params=NewsRequest(symbols=['AAPL','GOOGL'])
```
results in error.

### Expected Behavior

_No response_

### SDK Version I encountered this issue in

alpaca-py v0.31.0

### Steps To Reproduce

```markdown
ValidationError: 1 validation error for NewsRequest
symbols
Input should be a valid string [type=string_type, input_value=['AAPL', 'GOOGL'], input_type=list]
For further information visit https://errors.pydantic.dev/2.6/v/string_type
```

### Filled out the Steps to Reproduce section?

- [X] I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

### Anything else?

_No response_

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

Mở hướng dẫn đóng góp

Đá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.