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

オープン
#526 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
1.5k
フォーク
397
平均マージ
1日 16時間
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。