def render_analytics(ticker_code): date_from = request.args.get('date-from') date_to = request.args.get('date-to') stock = data_utils.get_ticker(ticker_code) trades = data_utils.get_analytics(date_from, date_to, ticker_code) return render_template('analytics.html', result_prices=trades, ticker=stock)
def render_insider_trades(ticker_code, insider_code): stock = data_utils.get_ticker(ticker_code) insider = data_utils.get_insider(insider_code) individual_trades = data_utils.get_individual_trades(insider_code) return render_template('individual-insider.html', individual_insider=insider, ticker=stock, trades=individual_trades)
def render_delta(ticker_code): stock = data_utils.get_ticker(ticker_code) value = request.args.get('value') price_type = request.args.get('type') delta_list = data_utils.get_delta(value, price_type, ticker_code) return render_template('delta.html', value=value, dates=delta_list, ticker=stock)
def get_ticker_trades(ticker_code): stock = data_utils.get_ticker(ticker_code) trades = data_utils.get_trades(ticker_code) return render_template('insider-trades.html', insider_trades=trades, ticker=stock)
def render_ticker_historical(ticker_code): stock = data_utils.get_ticker(ticker_code) historical = data_utils.get_historical(ticker_code) return render_template('historical.html', prices=historical, ticker=stock)