Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mberrien-fitzsimons/7b4d1eaace54b6d6a726090ff8fd1d69 to your computer and use it in GitHub Desktop.
Save mberrien-fitzsimons/7b4d1eaace54b6d6a726090ff8fd1d69 to your computer and use it in GitHub Desktop.
# Put data collection code into a .py document in the src/d00_utils folder. From there
# it can be imported into different jupyter notebooks for easy data
def alphavantage_api_csv_download_raw(function, symbol, alpha_vantage_key):
function = function
symbol = symbol
datatype = 'csv'
url = f"https://www.alphavantage.co/query?function={function}&symbol={symbol}\
&datatype={datatype}&apikey={ALPHA_VANTAGE_KEY}"
return pd.read_csv(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment