An Opinionated AlphaVantage API Wrapper in Python 3.9. Compatible with Pandas TA (pip install pandas_ta). Get your FREE API Key at https://www.alphavantage.co/support/
An Opinionated AlphaVantage API Wrapper in Python 3.9. Compatible with Pandas TA (pip install pandas_ta). Get your FREE API Key at https://www.alphavantage.co/support/
twopirllc/AlphaVantageAPI
AlphaVantageAPI
An Opinionated AlphaVantage API Wrapper in Python 3.9
Description
This API has been designed to simplify the process of aquiring financial data from AlphaVantage and only depends on the requests and Pandas packages. This package can clean and export data into a variety of file formats such as: csv (default), json, pkl, html, and txt with assistance of Pandas. If the openpyxl package is also installed, it can also be saved as an Excel file format: xlsx.
AlphaVantage Support and Contact
Contributing
Contributions are welcome and I am open to new ideas or implementations. Thank you!
Features
clean=True
.What's New?
!!! Updated
requirements.txt
to fixurllib3
security vulnerability. !!!What's Gone?
batch
,digital_intraday
, andsectors
.Installation
Stable
The
pip
version is the last most stable release. Version: 1.0.30Latest Version
Best choice! Version: 1.0.33
Excel Export
Programming Conventions
There are two ways of utilizing AlphaVantageAPI. The Standard Class way or as a Pandas DataFrame Extension 'av'.
Standard
This is the Object/Class way. Instantiate a Class with predefined parameters and then make calls.
Parameter Defaults
API Parameter Descriptions
api_key
premium
output_size
datatype
export
export_path
output
clean
proxy
Example: Class(ic) Behavior
Initialization
Help!
Class Usage
Call History
Example: DataFrame Extension 'av' Behavior
Initialization
For simplicity and protection of your AV API key, the extension uses the environment variable AV_API_KEY upon import of the module.
Empty DataFrame: No current data, no problem!
Since 'av' is an extension of a Pandas DataFrame, we need a DataFrame to work from. Simply create an empty DataFrame, it's contents will be replaced anyhow.
Setting properties
Same as the Class properties above. Use the 'av' extension to change them prior to requesting data or adjusting on the fly
Help!
Data Acquisition Methods
Inspiration
If this module does not suit your style or workflow, consider some of the following AlphaVantage API Python Wrapper implementations by: Romel Torres or portfoliome