-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] Return FMP Error Messages #6237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deeleeramone Is there a particular need to have most standard fields set as Optional? Wouldn't we want to guarantee a certain set of fields for a particular endpoint that would make sense to always be present?
The async def get_one(symbol)
repeats quite a few times through the fetchers and we can make it a helper so that it can be easily imported. It could, for example, take the symbol and an URL as an optional field or the like.
They may appear to be repeating, and in the simplest cases it is, but there can be subtle differences and
The standard models should be usable for other providers that do not yet have this endpoint. In the past, I have wanted to add different providers to the earnings estimates but I could not because the model is only useful for FMP data. All those fields are quite likely to not be returned by another source. |
WIP
Why?:
What?:
Impact:
Testing Done:
The examples below highlight the response difference between two, different, FMP endpoints with an invalid key.
OpenBBError: 401, message='Unauthorized', url=URL('https://financialmodelingprep.com/api/v4/insider-trading?symbol=AAPL&limit=500&page=0&apikey=********')
OpenBBError: FMP Error Message -> Invalid API KEY. Feel free to create a Free API Key or visit https://site.financialmodelingprep.com/faqs?search=why-is-my-api-key-invalid for more information.