Skip to content
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

Add new premium source End of Day Historical Data #2019

Merged
merged 33 commits into from
Aug 31, 2022

Conversation

pauljsymonds
Copy link
Contributor

@pauljsymonds pauljsymonds commented Jun 29, 2022

Note this is a DRAFT PR - Work in Progress - do not review

This source has a wide variety of data and pricing options so this PR's data could cover many of the features currently implemented.

The EOD Historical Data Premium source has an SDK that provides interfaces to data that can be found here.

Requirements

  • You need to request an API key with the EOD team.

  • Create your account here.

  • Please be aware of the pricing plans and policies. Different plans have different data accesses.
    - Once registered you will receive an API KEY that provides 20 free requests per day.

  • There is a DEMO key for a single ticker MCD.US: use keys, eodhd demo in terminal then stocks, load MCD.US

The demo key now works for several symbols: AAPL, MSFT, MCD, TSLA, VTI, EURUSD and BTCUSD to cover all possible asset types! This key gives access to all data to test.

  • Provider covers London and World Wide datasets.

I have implemented the initial Stocks menu for a ticker but have not added any parameters yet.

Parameters:
ticker(str): Required - Name of the instrument to retrieve data. Consists of two parts: {TICKER}.{EXCHANGE}, then you can use, for example, MCD.MX for Mexican Stock Exchange. or MCD.US for NYSE. Check the list of supported exchanges to get more information about stock markets the EOD API do support.

Not currently implemented:
period(str): Optional - Use 'd' for daily, 'w' for weekly, 'm' for monthly prices. By default, daily prices will be shown.
order(str): Optional - Use 'a' for ascending dates (from old to new), 'd' for descending dates (from new to old). By default, dates are shown in ascending order.
from_(str) and to(str): Optional - The format is 'YYYY-MM-DD'. If you need data from Jan 5, 2017, to Feb 10, 2017, you should use from_='2017-01-05' and to='2017-02-10'

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@pauljsymonds pauljsymonds changed the title DRAFT - Add new premium source https://eodhistoricaldata.com/r/?ref=869U7F4J DRAFT - Add new premium source End of Day Historical Data Jun 29, 2022
@DidierRLopes DidierRLopes added do not merge Label to prevent pull request merge enhancement Enhancement labels Jun 29, 2022
requirements.txt Outdated Show resolved Hide resolved
@colin99d
Copy link
Contributor

Overall I love the idea, more data means more possible users, and more possible partnerships. @DidierRLopes do you think that the eod package should be not installed by default and we can tell a user how to install it after installing the terminal. This way the users who dont use this data will not have to download the extra package, or is it too small to worry about?

@colin99d colin99d marked this pull request as draft June 30, 2022 00:04
@colin99d colin99d marked this pull request as draft June 30, 2022 00:04
@DidierRLopes
Copy link
Collaborator

Overall I love the idea, more data means more possible users, and more possible partnerships. @DidierRLopes do you think that the eod package should be not installed by default and we can tell a user how to install it after installing the terminal. This way the users who dont use this data will not have to download the extra package, or is it too small to worry about?

or even that the current users will have access to more quality data. In the long run the idea is that we start supporting multiple data sources for each command and we should push that data source selection down to the user.

It is too small to worry about for now :)

@colin99d
Copy link
Contributor

or even that the current users will have access to more quality data. In the long run the idea is that we start supporting multiple data sources for each command and we should push that data source selection down to the user.

It is too small to worry about for now :)

Perfect! Also I just realized they have a free API plan, for 20 calls a day. So this is definitely something we want people to have access to.

@pauljsymonds
Copy link
Contributor Author

or even that the current users will have access to more quality data. In the long run the idea is that we start supporting multiple data sources for each command and we should push that data source selection down to the user.
It is too small to worry about for now :)

Perfect! Also I just realized they have a free API plan, for 20 calls a day. So this is definitely something we want people to have access to.

On this I could code from scratch and not use the eod library if you prefer, coding for pulling data with rest is straight forward, I am open to either.

@DidierRLopes
Copy link
Collaborator

Hey @pauljsymonds,

Would you have time to finish this soon? Thanks!

@pauljsymonds
Copy link
Contributor Author

Yes I am planning to make time sometime next week to get into this again.

@colin99d colin99d marked this pull request as ready for review August 30, 2022 14:35
@colin99d colin99d removed the do not merge Label to prevent pull request merge label Aug 30, 2022
@pauljsymonds
Copy link
Contributor Author

Overall I love the idea, more data means more possible users, and more possible partnerships. @DidierRLopes do you think that the eod package should be not installed by default and we can tell a user how to install it after installing the terminal. This way the users who dont use this data will not have to download the extra package, or is it too small to worry about?

or even that the current users will have access to more quality data. In the long run the idea is that we start supporting multiple data sources for each command and we should push that data source selection down to the user.

It is too small to worry about for now :)

For now I will leave it using eod package so we can include the initial feature, but I am also considering removing it and coding in the urls dynamically when I extend the functionality to the Fundamentals.

This provider has a huge amount of data available to subscribers at different pricing levels.

@colin99d
Copy link
Contributor

I am having issues after loading a ticker.

Screen Shot 2022-08-30 at 6 16 36 PM

@pauljsymonds
Copy link
Contributor Author

pauljsymonds commented Aug 31, 2022

I am having issues after loading a ticker.

Screen Shot 2022-08-30 at 6 16 36 PM

Odd for me this works:

load -t aapl -w --source eodhd
load -t aapl -m --source eodhd

but

load -t aapl --source eodhd

and

load -t aapl -w --source eodhd

are returning the same results

I am also only using the 'demo' key for this source at this time.

Question

Where is the following populated from?

2022 Aug 31, 02:45 (🦋) /stocks/ $ load -t aapl -m  --source eodhd

**Loading Daily** AAPL stock with starting period 2019-08-27 for analysis.

Always displays 'Daily' regardless of the parameter passed.

@colin99d colin99d changed the title DRAFT - Add new premium source End of Day Historical Data Add new premium source End of Day Historical Data Aug 31, 2022
@colin99d colin99d merged commit 2b0a9e2 into OpenBB-finance:main Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants