Skip to content

Instantly share code, notes, and snippets.

@markcapece
markcapece / AlphaQuery.py
Created June 18, 2019 02:27
Script for accessing equity data on AlphaVantage API. Includes endpoint quote, time series, and technical indicator requests. Returns pandas dataframes.
import pandas as pd
import requests
class AlphaQuery(object):
'''Base class to access the AlphaVantage API
Tries to access the AlphaVantage API key in ./API/AlphaVantage.txt
If this file does not exist, key must be provided manually when creating instance
'''
try:
with open('./API/AlphaVantage.txt', 'r') as f: