Skip to content

Instantly share code, notes, and snippets.

View PatrickAlphaC's full-sized avatar
💭
Enabling web3 developers at scale

Patrick Collins PatrickAlphaC

💭
Enabling web3 developers at scale
View GitHub Profile
@PatrickAlphaC
PatrickAlphaC / threading_alpha_vantage.py
Last active October 7, 2019 18:07
A simple start to threading in python with alpha vantage
from alpha_vantage.timeseries import TimeSeries
import threading
import os
# I use an environment vairable to get my key,
# you can also just hardcode your key in the code to test this
KEY = os.path.expandvars("$ALPHA_VANTAGE_HIGHER_KEY")
ts = TimeSeries(key=KEY, output_format='pandas')
# 10 tickers from the NASDAQ-100
tickers = ['ATVI','ADBE','AMD','ALXN','ALGN', 'GOOG', 'AMZN', 'AAL', 'ADI', 'AMAT']
@PatrickAlphaC
PatrickAlphaC / alpha_vantage_short_start.py
Created September 12, 2019 18:26
Alpha Vantage Get Started Short Version
from alpha_vantage.timeseries import TimeSeries
# Your key here
key = 'yourkeyhere'
ts = TimeSeries(key)
aapl, meta = ts.get_daily(symbol='AAPL')
print(aapl['2019-09-12'])
@PatrickAlphaC
PatrickAlphaC / alpha_vantage_get_started.py
Last active September 13, 2019 17:46
Alpha Vantage Python Start
'''
On your terminal run:
pip install alpha_vantage
This also uses the pandas dataframe, and matplotlib, commonly used python packages
pip install pandas
pip install matplotlib
For the develop version run:
pip install git+https://github.com/RomelTorres/alpha_vantage.git@develop