コード例 #1
0
    def ticker_event_history(self, start, end, ticker):
        try:
            dr = DataReader(ticker, 'yahoo-actions', start, end).reset_index()
        except OSError:
            return []  # if the page cannot be reached for some reason

        return dr.to_dict(orient="records")
コード例 #2
0
    def ticker_price_history(self, start, end, ticker):
        """
        Gets and returns the historic prices for a given ticker for between
        the time period provided. Inclusive.
        """
        try:
            dr = DataReader(ticker, 'yahoo', start, end).reset_index()
        except OSError:
            return []  # if the page cannot be reached for some reason

        return dr.to_dict(orient="records")