-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
13 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
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 |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
Author: Connor Sanders | ||
Email: [email protected] | ||
Version Released: 01/12/2018 | ||
Tested on Python 2.7, 3.3, 3.4, 3.5, and 3.6 | ||
Version Released: 01/13/2019 | ||
Tested on Python 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7 | ||
Copyright (c) 2019 Connor Sanders | ||
MIT License | ||
|
@@ -86,6 +86,7 @@ def __init__(self, ticker): | |
'income': ['financials', 'incomeStatementHistory', 'incomeStatementHistoryQuarterly'], | ||
'balance': ['balance-sheet', 'balanceSheetHistory', 'balanceSheetHistoryQuarterly', 'balanceSheetStatements'], | ||
'cash': ['cash-flow', 'cashflowStatementHistory', 'cashflowStatementHistoryQuarterly', 'cashflowStatements'], | ||
'keystats': ['key-statistics'], | ||
'history': ['history'] | ||
} | ||
|
||
|
@@ -484,7 +485,10 @@ def get_stock_data(self, statement_type='income', tech_type='', report_name='', | |
|
||
# Public Method to get technical stock data | ||
def get_stock_tech_data(self, tech_type): | ||
return self.get_stock_data(tech_type=tech_type) | ||
if tech_type == 'defaultKeyStatistics': | ||
return self.get_stock_data(statement_type='keystats', tech_type=tech_type) | ||
else: | ||
return self.get_stock_data(tech_type=tech_type) | ||
|
||
# Public Method to get reformatted statement data | ||
def get_reformatted_stmt_data(self, raw_data, statement_type): | ||
|
@@ -567,6 +571,13 @@ def get_stock_price_data(self, reformat=True): | |
else: | ||
return self.get_stock_tech_data('price') | ||
|
||
# Public Method for the user to return key-statistics data | ||
def get_key_statistics_data(self, reformat=True): | ||
if reformat: | ||
return self.get_clean_data(self.get_stock_tech_data('defaultKeyStatistics'), 'defaultKeyStatistics') | ||
else: | ||
return self.get_stock_tech_data('defaultKeyStatistics') | ||
|
||
# Public Method for the user to get stock earnings data | ||
def get_stock_earnings_data(self, reformat=True): | ||
if reformat: | ||
|