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

Open
#526 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.5k
Forks
398
Avg merge
1d 16h
Merged PRs (30d)
6

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.