-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Feature: Add Polygon.io (Double Redundancy) π (#23)
* still need to write get_splits fx * made iexcloud subdirs * start polygon class * fix test * init function * switch to polygon api * auto dep check * polygon dividend redundancy added * tests * update env var in workflows * secrets * fixes? * fix test * done
- Loading branch information
Showing
13 changed files
with
215 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
python-dotenv == 0.13.0 | ||
pandas == 1.0.5 | ||
pandas == 1.1.0 | ||
robin-stocks == 1.3.0 | ||
boto3 == 1.14.35 | ||
boto3 == 1.14.35 | ||
polygon-api-client == 0.1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
import sys | ||
from multiprocessing import Pool | ||
sys.path.append('src') | ||
from DataSource import IEXCloud # noqa autopep8 | ||
|
||
from DataSource import IEXCloud, Polygon # noqa autopep8 | ||
|
||
iex = IEXCloud() | ||
poly = Polygon() | ||
symbols = iex.get_symbols() | ||
|
||
# Double redundancy | ||
|
||
def multi_div(symbol): | ||
# define fx to be pickled in multiprocessing | ||
iex.save_dividends(symbol) | ||
|
||
for symbol in symbols: | ||
# 1st pass | ||
try: | ||
iex.save_dividends(symbol=symbol, timeframe='3m') | ||
except Exception as e: | ||
print(f'IEX Cloud dividend update failed for {symbol}.') | ||
print(e) | ||
|
||
# save files as CSVs and uploads to S3 | ||
with Pool() as p: | ||
p.map(multi_div, symbols) | ||
# 2nd pass | ||
try: | ||
poly.save_dividends(symbol=symbol, timeframe='max') | ||
except Exception as e: | ||
print(f'Polygon.io dividend update failed for {symbol}.') | ||
print(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.