daxm / fmpsdk Goto Github PK
View Code? Open in Web Editor NEWSDK for Financial Modeling Prep's (FMP) API
License: BSD 3-Clause "New" or "Revised" License
SDK for Financial Modeling Prep's (FMP) API
License: BSD 3-Clause "New" or "Revised" License
Hi @daxm . I'm using this module for quite some time and it's great. Since has not been updated with the latest endpoints I'd like to fork and start working on updating and then mainaining an updated version.
Is there a problem in doing this?
Stock screener only seems to capture ten results when there should be a lot more:
fmpsdk.stock_screener(apikey=apikey, country='US')
Only returns ten results. Yet https://financialmodelingprep.com/api/v3/stock-screener?country=US&apikey=YOURKEY
returns many more than 10 results.
Hi guys
Getting a key error when passing a list of 2 or 3 symbols to 'historical_price_full'. The same result happens using your samples.
Any suggestions
KeyError: 'historical'
Hi,
It doesn't look like this API includes the ETF Expense ratio API:
https://site.financialmodelingprep.com/developer/docs/etf-expense-ratio-api/
I'd be open to contributing this, assuming the process for adding a new endpoint isn't insanely painful.
How do I get minute data using the Python API?
As per site doumentation below,
image
The historical-chartendpoint has the path parameters timeframe and symbol, and the query parameteres from, to and from dates. The implementation does not care for to and from, restricting the usability of the tool.
imagethe same happens with the historical-price-full endpoint where we have the wrong list of parameters and unhelpful documentation on the api...
I will fix and create a pull request if allowed.
like this
def income_statement(
apikey: str,
symbol: str,
period: str = "annual",
limit: int = DEFAULT_LIMIT,
download: bool = False,
filename: str = INCOME_STATEMENT_FILENAME,
) -> typing.Union[typing.List[typing.Dict], None]:
if apikey is None:
apikey = os.environ.get("apikey")
if apikey is None:
raise someError()
do_something()
Hey,
we want to use your library and we came across the problem that there is no possibility to distinguish between there is no data and there was an error thrown __return_json_v3. We need this for retrying. Or is there a possibility which I have overseen? Otherwise we would add it, and maybe we can merge back in this repository.
Hi!
At first, thank you for the package. I find it very useful!
I was trying to install the latest version (20240104.0
) but got an error. There seems to be something wrong with the metadata of the release.
https://files.pythonhosted.org/packages/3f/14/510457c626bdfe9fe1f00c480d2fd6ee047709f49f3a5fe73c6d431fb17c/fmpsdk-20240104.0.tar.gz has inconsistent version: expected '20240104.0', but metadata has '0.1.0'
# pip install fmpsdk==20240104.0
Collecting fmpsdk==20240104.0
Downloading fmpsdk-20240104.0.tar.gz (16 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
WARNING: Requested fmpsdk==20240104.0 from https://files.pythonhosted.org/packages/3f/14/510457c626bdfe9fe1f00c480d2fd6ee047709f49f3a5fe73c6d431fb17c/fmpsdk-20240104.0.tar.gz, but installing version 0.1.0
Discarding https://files.pythonhosted.org/packages/3f/14/510457c626bdfe9fe1f00c480d2fd6ee047709f49f3a5fe73c6d431fb17c/fmpsdk-20240104.0.tar.gz (from https://pypi.org/simple/fmpsdk/) (requires-python:>=3.6): Requested fmpsdk==20240104.0 from https://files.pythonhosted.org/packages/3f/14/510457c626bdfe9fe1f00c480d2fd6ee047709f49f3a5fe73c6d431fb17c/fmpsdk-20240104.0.tar.gz has inconsistent version: expected '20240104.0', but metadata has '0.1.0'
ERROR: Could not find a version that satisfies the requirement fmpsdk==20240104.0 (from versions: 20201206.0, 20201206.1, 20201207.0, 20201208.4, 20201208.5, 20201211.0, 20201211.1, 20201212.0, 20201219.0, 20201219.1, 20201220.0, 20201220.1, 20201224.0, 20201229.0, 20210217.0, 20210219.0, 20210220.0, 20210221.0, 20210519.0, 20210919.0, 20211011.0, 20220405.0, 20220805.0, 20220921.0, 20220921.1, 20221012.0, 20230312.0, 20230522.0, 20230623.0, 20240104.0)
ERROR: No matching distribution found for fmpsdk==20240104.0
I don't see the insider_trading function in the python sdk. Is this a known issue? Are there any plans to add it?
with some plans there is a call/minute limit.
Is there a way to control that the requests are routed to the API "slow" enough to stay within a limit?
If not, do you plan on incorporating such a feature in the future?
Thx & best
Hey, will it be possible to scan stocks using price?
Hi,
Thanks for the great SDK.
I wonder whether the SDK is able to control the limit of request per minute to avoid API limitation?
Thanks
The insider_trading function that was added recently was working fine a few days ago. Today when I ran it, it always times out with this message:
ERROR:root:Connection to https://financialmodelingprep.com/api/v4/insider-trading/ timed out.
What I am executing is fmpsdk.insider_trading(api_key, "MSFT", limit=100).
I am running code that sleeps for 1 second after every 8 calls to this API. And if I switch to other calls like balance_sheet_statement etc, those always work.
Not an issue, but i wanted to say thanks for this library and your efforts to keeping it up to date. The types annotations, docstrings are extremely useful! ๐๐ฝ
Hello,
I am trying to get the holding list of the Russell 2000 (IWM), there should be 2000 tickers returned. But the fmpskd just returned 1000 tickers.
import fmpsdk
etf_fundamental = fmpsdk.etf_holders(apikey=apikey, symbol='IWM')
Can you please check this issue? Thanks.
Hello,
Thank you for this great tool, very useful! I believe the historical_rating function in /fmpsdk/company_valuation.py may be pointing to the wrong API endpoint.
Please see below.
def historical_rating(
apikey: str,
symbol: str,
limit: int = DEFAULT_LIMIT,
) -> typing.Optional[typing.List[typing.Dict]]:
"""
Query FMP /financial-growth/ API.
:param apikey: Your API key.
:param symbol: Company ticker.
:param limit: Number of rows to return.
:return: A list of dictionaries.
"""
path = f"financial-growth/{symbol}"
query_vars = {"apikey": apikey, "limit": limit}
return __return_json_v3(path=path, query_vars=query_vars)
Every endpoint on fmp website has it's name.
This library functions are named sometimes by the url like available_traded
,
sometimes by the endpoint name historical_stock_splits
.
Didn't check many others, but I couldn't find the tradeable symbols list function right away. It's called available_tradeded_list
.
I suggest to keep the functions named as FMP name their api endpoints, because that's what we see first, and it's on the sidebar. Url are implementation details.
Wasn't able to get earning_call_transcript. I might send a PR.
Change def available_efts(apikey: str) to def available_etfs(apikey: str)
Hello
Not really an issue, but does fmpsdk client supports being invoked from cloud clients, with multiple requests in parallel?
Currently, running on cloud using requests API results in exception when multiple call are being done in parallel
Not sure if the issue is mine, or FMPREP , so i was wondering if i would move to use the fmprep sdk, the parallel calls will be handled correctly?
kind regards
I started to implement a few missing APIs here: https://github.com/ipl31/fmpsdk/tree/insider_trading But I realized that the current code expects all endpoints to be on the V3 endpoint. There are a bunch of things on the V4 endpoint now.
I can work on this if you don't have time to. But I would want some guidance on preferred implementations. One less intrusive idea might be to leave everything as is. Create a decorator for V4 API calls which would handle changing the base URL.
Is this data available?
Either tangible book value per share for every one of last five years, or tangible book value growth TTM or for each year.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.