mirror of
https://github.com/ryanamay/sparkle.git
synced 2024-09-20 02:20:34 +00:00
feat: company profile endpoint
This commit is contained in:
parent
fd5dbc9f27
commit
21b4ccdc5c
1 changed files with 13 additions and 0 deletions
|
@ -33,3 +33,16 @@ async def quote(symbol: str):
|
|||
|
||||
response = requests.get("https://finnhub.io/api/v1/quote", params=params)
|
||||
return response.json()
|
||||
|
||||
@router.get("/profile")
|
||||
async def profile(symbol: str):
|
||||
"""
|
||||
API to get company profile.
|
||||
"""
|
||||
params = {
|
||||
"token": settings.FINNHUB_API_KEY,
|
||||
"symbol": symbol
|
||||
}
|
||||
|
||||
response = requests.get("https://finnhub.io/api/v1/stock/profile2", params=params)
|
||||
return response.json()
|
||||
|
|
Loading…
Reference in a new issue