Welcome to alpha_vantage’s documentation!¶
Python module to get stock data from the Alpha Vantage API
The Alpha Vantage Stock API provides free JSON access to the stock market, plus a comprehensive set of technical indicators. This project is a python wrapper around this API to offer python plus json/pandas support. I hope you enjoy it. It requires a free API, that can be requested on http://www.alphavantage.co/support/#api-key. This stock API article also contains general guidance on ingesting and integrating with market data.
To install the package use:
pip install alpha_vantage
If you want to install from source, then use:
git clone https://github.com/RomelTorres/alpha_vantage.git pip install -e alpha_vantage
This is a simple code snippet to get global quotes from the
from alpha_vantage.timeseries import TimeSeries import matplotlib.pyplot as plt ts = TimeSeries(key='YOUR_API_KEY', output_format='pandas') data, meta_data = ts.get_intraday(symbol='MSFT',interval='1min', outputsize='full') data['close'].plot() plt.title('Intraday Times Series for the MSFT stock (1 min)') plt.show()
Code & Issue Tracker¶
The code is hosted in github: https://github.com/RomelTorres/alpha_vantage And the issue tracker as well: https://github.com/RomelTorres/alpha_vantage/issues
If you have a feature that you want to see merged in the code, please do a pull request with it and it will be evaluated.
This project is licensed under the MIT license.