-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add historical_employee_count to company_valuation.py (#53)
* historical_employee_count * add bulk requests api
- Loading branch information
Showing
5 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import logging | ||
import typing | ||
import requests | ||
|
||
from .general import __quotes | ||
from .settings import ( | ||
DEFAULT_LIMIT, | ||
BASE_URL_v3, | ||
BASE_URL_v4 | ||
) | ||
from .url_methods import __return_json_v3, __return_json_v4 | ||
|
||
|
||
def bulk_historical_eod(apikey: str, date: str) -> typing.Optional[typing.List[typing.Dict]]: | ||
""" | ||
Batch request that contains all end of day prices for specific date | ||
https://site.financialmodelingprep.com/developer/docs#batch-eod-prices | ||
Endpoint: | ||
https://financialmodelingprep.com/api/v4/batch-historical-eod?date=2021-05-18 | ||
:param apikey: Your API key. | ||
:return: A list of dictionaries. | ||
""" | ||
path = f"batch-historical-eod" | ||
query_vars = {"apikey": apikey, "date": date} | ||
return __return_json_v4(path=path, query_vars=query_vars) | ||
|
||
def bulk_profiles(apikey: str) -> typing.Optional[typing.List[typing.Dict]]: | ||
""" | ||
It contains all profiles from our API in one CSV file | ||
Endpoint: | ||
https://financialmodelingprep.com/api/v4/profile/all | ||
:param apikey: Your API key. | ||
:return: A list of dictionaries. | ||
""" | ||
path = f"profile/all" | ||
query_vars = {"apikey": apikey} | ||
return __return_json_v4(path=path, query_vars=query_vars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters