fix stock news

This commit is contained in:
Diogo Sousa
2023-07-25 20:43:20 +01:00
parent c1f048453e
commit a0a96dea1c
2 changed files with 3 additions and 1 deletions

View File

@@ -107,7 +107,7 @@ class BenzingaStockNewsFetcher(
api_key = credentials.get("benzinga_api_key")
base_url = "https://api.benzinga.com/api/v2/news"
querystring = get_querystring(query.dict(), [])
querystring = get_querystring(query.dict(by_alias=True), [])
request_url = f"{base_url}?{querystring}&token={api_key}"
data = get_data(request_url)

View File

@@ -189,6 +189,7 @@ class CLASS_stocks(Container):
self,
symbols: str,
page: int = 0,
limit: int = 15,
chart: bool = False,
provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None,
**kwargs
@@ -319,6 +320,7 @@ class CLASS_stocks(Container):
standard_params={
"symbols": symbols,
"page": page,
"limit": limit,
},
extra_params=kwargs,
chart=chart,