Code Monkey home page Code Monkey logo

fmpsdk's People

Contributors

adamcataldo avatar carloe avatar daxm avatar enricodetoma avatar ipl31 avatar ivelin avatar karsami avatar kasamuri avatar kosmitive avatar marsson avatar mzaganczyk avatar petertjmills avatar xantin avatar yueda27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmpsdk's Issues

control number of API calls per minute

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

opinion: name of functions should be the name of endpoints, not api url.

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.

There is no distinction between no data and an error in __return_json_v3

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.

Historical Rating Function Pointing to Incorrect Endpoint

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)

Why not put the code to get the apikey into the sdk?

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()
  1. Reduce the number of parameters that can be entered into the calling function
  2. Reduce network requests

Fork and update

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?

Implementation and documentation of historical-price-full and historical-chart are wrong

As per site doumentation below,
image
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.
image

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.

Support for FMP V4 API endpoint

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.

New insider_trading API keeps timing out

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.

Can't install 20240104.0 from PyPI

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

Russell 2000 holding list is not complete

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.

support for cloud client

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.