Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Python module to get stock data from the Financial Modeling Prep API
This library requires you to have an account with Financial Modeling Prep (sign up here)
You can install the package:
pip install fmp_python
git clone https://github.com/ikbale/fmp_python.git
pip install -e fmp_python
To get data from the API:
from fmp_python.fmp import FMP
fmp = FMP(api_key='YOUR_API_KEY')
fmp.get_quote('AAL')
from fmp_python.fmp import FMP
fmp = FMP(output_format='pandas', write_to_file=True)
fmp.get_quote('AAL')
You can choose which output format you want your data output_format = 'pandas' or 'json'.
'json' is the default value
You can also choose if you want the output to be stored in a file (in C:/tmp) by setting write_to_file = True
'False' is the default value
Reference: https://financialmodelingprep.com/developer/docs/#Company-Quote
fmp.get_quote(symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.get_quote('AAL')
Reference: https://financialmodelingprep.com/developer/docs/#Stock-Price
fmp.get_quote_short(symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.quote_short('AAL')
Reference: https://financialmodelingprep.com/developer/docs/#Stock-Historical-Price
fmp.get_historical_chart(interval:str, symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.get_historical_chart('5min','AAL')
fmp.get_index_quote(symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.get_index_quote('GSPC')
Reference: https://financialmodelingprep.com/developer/docs/#Historical-stock-index-prices
fmp.get_historical_chart_index(interval:str,symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.get_historical_chart_index('5min', GSPC')
fmp.get_historical_price(symbol: str)
Usage Example
fmp = FMP(output_format = 'pandas', write_to_file= True)
fmp.get_historical_price('GSPC')
FAQs
Python wrapper for Financial Modeling Prep API
We found that fmp-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.