A python wrapper for Alpha Vantage API for financial data.

Overview

alpha_vantage

Build Status PyPI version Documentation Status Average time to resolve an issue Percentage of issues still open

Python module to get stock data/cryptocurrencies from the Alpha Vantage API

Alpha Vantage delivers a free API for real time financial data and most used finance indicators in a simple json or pandas format. This module implements a python interface to the free API provided by Alpha Vantage. It requires a free API key, that can be requested from http://www.alphavantage.co/support/#api-key. You can have a look at all the API calls available in their API documentation.

For code-less access to the APIs, you may also consider the official Google Sheet Add-on or the Microsoft Excel Add-on by Alpha Vantage. Check out this guide for some common tips on working with financial market data.

News

  • From version 2.3.0 onwards, fundamentals data and extended intraday is supported.
  • From version 2.2.0 onwards, asyncio support now provided. See below for more information.
  • From version 2.1.3 onwards, rapidAPI key integration is now available.
  • From version 2.1.0 onwards, error logging of bad API calls has been made more apparent.
  • From version 1.9.0 onwards, the urllib was substituted by pythons request library that is thread safe. If you have any error, post an issue.
  • From version 1.8.0 onwards, the column names of the data frames have changed, they are now exactly what alphavantage gives back in their json response. You can see the examples in better detail in the following git repo: https://github.com/RomelTorres/av_example
  • From version 1.6.0, pandas was taken out as a hard dependency.

Install

To install the package use:

pip install alpha_vantage

Or install with pandas support, simply install pandas too:

pip install alpha_vantage pandas

If you want to install from source, then use:

git clone https://github.com/RomelTorres/alpha_vantage.git
pip install -e alpha_vantage

Usage

To get data from the API, simply import the library and call the object with your API key. Next, get ready for some awesome, free, realtime finance data. Your API key may also be stored in the environment variable ALPHAVANTAGE_API_KEY.

from alpha_vantage.timeseries import TimeSeries
ts = TimeSeries(key='YOUR_API_KEY')
# Get json object with the intraday data and another with  the call's metadata
data, meta_data = ts.get_intraday('GOOGL')

You may also get a key from rapidAPI. Use your rapidAPI key for the key variable, and set rapidapi=True

ts = TimeSeries(key='YOUR_API_KEY',rapidapi=True)

Internally there is a retries counter, that can be used to minimize connection errors (in case that the API is not able to respond in time), the default is set to 5 but can be increased or decreased whenever needed.

ts = TimeSeries(key='YOUR_API_KEY',retries='YOUR_RETRIES')

The library supports giving its results as json dictionaries (default), pandas dataframe (if installed) or csv, simply pass the parameter output_format='pandas' to change the format of the output for all the API calls in the given class. Please note that some API calls do not support the csv format (namely ForeignExchange, SectorPerformances and TechIndicators) because the API endpoint does not support the format on their calls either.

ts = TimeSeries(key='YOUR_API_KEY',output_format='pandas')

The pandas data frame given by the call, can have either a date string indexing or an integer indexing (by default the indexing is 'date'), depending on your needs, you can use both.

 # For the default date string index behavior
ts = TimeSeries(key='YOUR_API_KEY',output_format='pandas', indexing_type='date')
# For the default integer index behavior
ts = TimeSeries(key='YOUR_API_KEY',output_format='pandas', indexing_type='integer')

Data frame structure

The data frame structure is given by the call on alpha vantage rest API. The column names of the data frames are the ones given by their data structure. For example, the following call:

from alpha_vantage.timeseries import TimeSeries
from pprint import pprint
ts = TimeSeries(key='YOUR_API_KEY', output_format='pandas')
data, meta_data = ts.get_intraday(symbol='MSFT',interval='1min', outputsize='full')
pprint(data.head(2))

Would result on: alt text

The headers from the data are specified from Alpha Vantage (in previous versions, the numbers in the headers were removed, but long term is better to have the data exactly as Alpha Vantage produces it.)

Plotting

Time Series

Using pandas support we can plot the intra-minute value for 'MSFT' stock quite easily:

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['4. close'].plot()
plt.title('Intraday Times Series for the MSFT stock (1 min)')
plt.show()

Giving us as output: alt text

Technical indicators

The same way we can get pandas to plot technical indicators like Bollinger Bands®

from alpha_vantage.techindicators import TechIndicators
import matplotlib.pyplot as plt

ti = TechIndicators(key='YOUR_API_KEY', output_format='pandas')
data, meta_data = ti.get_bbands(symbol='MSFT', interval='60min', time_period=60)
data.plot()
plt.title('BBbands indicator for  MSFT stock (60 min)')
plt.show()

Giving us as output: alt text

Sector Performance

We can also plot sector performance just as easy:

from alpha_vantage.sectorperformance import SectorPerformances
import matplotlib.pyplot as plt

sp = SectorPerformances(key='YOUR_API_KEY', output_format='pandas')
data, meta_data = sp.get_sector()
data['Rank A: Real-Time Performance'].plot(kind='bar')
plt.title('Real Time Performance (%) per Sector')
plt.tight_layout()
plt.grid()
plt.show()

Giving us as output:

alt text

Crypto currencies.

We can also plot crypto currencies prices like BTC:

from alpha_vantage.cryptocurrencies import CryptoCurrencies
import matplotlib.pyplot as plt

cc = CryptoCurrencies(key='YOUR_API_KEY', output_format='pandas')
data, meta_data = cc.get_digital_currency_daily(symbol='BTC', market='CNY')
data['4b. close (USD)'].plot()
plt.tight_layout()
plt.title('Daily close value for bitcoin (BTC)')
plt.grid()
plt.show()

Giving us as output: alt text

Foreign Exchange (FX)

The foreign exchange endpoint has no metadata, thus only available as json format and pandas (using the 'csv' format will raise an Error)

from alpha_vantage.foreignexchange import ForeignExchange
from pprint import pprint
cc = ForeignExchange(key='YOUR_API_KEY')
# There is no metadata in this call
data, _ = cc.get_currency_exchange_rate(from_currency='BTC',to_currency='USD')
pprint(data)

Giving us as output:

{
    '1. From_Currency Code': 'BTC',
    '2. From_Currency Name': 'Bitcoin',
    '3. To_Currency Code': 'USD',
    '4. To_Currency Name': 'United States Dollar',
    '5. Exchange Rate': '5566.80500105',
    '6. Last Refreshed': '2017-10-15 15:13:08',
    '7. Time Zone': 'UTC'
}

Asyncio support

From version 2.2.0 on, asyncio support will now be available. This is only for python versions 3.5+. If you do not have 3.5+, the code will break.

The syntax is simple, just mark your methods with the async keyword, and use the await keyword.

Here is an example of a for loop for getting multiple symbols asyncronously. This greatly improving the performance of a program with multiple API calls.

import asyncio
from alpha_vantage.async_support.timeseries import TimeSeries

symbols = ['AAPL', 'GOOG', 'TSLA', 'MSFT']


async def get_data(symbol):
    ts = TimeSeries(key='YOUR_KEY_HERE')
    data, _ = await ts.get_quote_endpoint(symbol)
    await ts.close()
    return data

loop = asyncio.get_event_loop()
tasks = [get_data(symbol) for symbol in symbols]
group1 = asyncio.gather(*tasks)
results = loop.run_until_complete(group1)
loop.close()
print(results)

We have written a much more in depth article to explain asyncio for those who have never used it but want to learn about asyncio, concurrency, and multi-threading. Check it out here: Which Should You Use: Asynchronous Programming or Multi-Threading?

Examples

I have added a repository with examples in a python notebook to better see the usage of the library: https://github.com/RomelTorres/av_example

Tests

In order to run the tests you have to first export your API key so that the test can use it to run, also the tests require pandas, mock and nose.

export API_KEY=YOUR_API_KEY
cd alpha_vantage
nosetests

Documentation

The code documentation can be found at https://alpha-vantage.readthedocs.io/en/latest/

Contributing

Contributing is always welcome. Just contact us on how best you can contribute, add an issue, or make a PR.

TODOs:

  • The integration tests are not being run at the moment within travis, gotta fix them to run.
  • Add test for csv calls as well.
  • Add tests for incompatible parameter raise errors.
  • Github actions & other items in the issues page.

Contact:

You can reach/follow the Alpha Vantage team on any of the following platforms:

Star if you like it.

If you like or use this project, consider showing your support by starring it.

🇻🇪 - 🇩🇪

Comments
  • Alpha Vantage API Review

    Alpha Vantage API Review

    Alpha Vantage API Review from a Python Developer

    @RomelTorres congratulations on your wonderful python library for Alpha Vantage!

    I am a full-stack python developer who uses the Alpha Vantage API to develop trading strategies for stocks, ETFs, and OTCs. I am wondering whether you are affiliated with Alpha Vantage, and whether this is a good place for me to leave a 360° review on their API service for future reference by the developer community.

    So technically this is not a bug report or feature request - hope it's OK with you :)

    The Experience

    I was one of the "yahoo refugees" who stumbled upon Alpha Vantage via Google search. My first interactions with their website could be summarized by the good-old term WYSIWYG (what-you-see-is-what-you-get). Their documentation promised three things: (1) time series data with various resolutions, (2) over 50 technical signals, (3) sector data, and they kept their promise by providing demo URLs for all the said API functions.

    image

    They promised free API keys, and they also delivered. They promised "no promotional materials to your inbox," and indeed the only email I got from them so far was the announcement email for their new CSV feature.

    This being said, there are a couple areas they could optimize upon.

    • Be more specific about their business model. Being "100% free" is good, but it can also be a bit scary, especially for a yahoo refugee like me.
    • Add multi-symbol support so that one can query multiple stocks with a single API call.
    • Their FAQ recommends "~200 API calls per minute." It would be great if they can set a hard limit on the call volume to prevent client-side abuses in the form of ultra-high-frequency requests.

    The Data

    Of the thousands of US-based equities I have analyzed so far, their historical data and technical indicators seem to match other reputable data sources. Their intraday data is realtime up to the current minute, which is fine for my research purposes but may not satisfy users who want to beat the market with millisecond precision. Perhaps a premium feature for this down the road?

    Their JSON output is easily readable and python-parsable. For the daily time series, however, I understand that their most recent data point is the cumulative information of the current trading day (updated realtime), but why is the first timestamp in YYYY-MM-DD HH:MM:SS format while all the others are in the normal YYYY-MM-DD format typical of the EOD data?

    "Meta Data": { "1. Information": "Daily Prices (open, high, low, close) and Volumes", "2. Symbol": "MSFT", "3. Last Refreshed": "2017-08-18 16:00:00", "4. Output Size": "Compact", "5. Time Zone": "US/Eastern" }, "Time Series (Daily)": { "2017-08-18 16:00:00": { "1. open": "72.2700", "2. high": "72.8400", "3. low": "71.9300", "4. close": "72.4900", "5. volume": "18215276" }, "2017-08-17": { "1. open": "73.5800", "2. high": "73.8700", "3. low": "72.4000", "4. close": "72.4000", "5. volume": "21834250" },

    I would love to see a consistent YYYY-MM-DD format across all the timestamps. The "last refreshed" timestamp can be specified in Meta Data instead:

    "Meta Data": { "1. Information": "Daily Prices (open, high, low, close) and Volumes", "2. Symbol": "MSFT", "3. Last Refreshed": "2017-08-18 16:00:00", "4. Output Size": "Compact", "5. Time Zone": "US/Eastern" }, "Time Series (Daily)": { "2017-08-18": { "1. open": "72.2700", "2. high": "72.8400", "3. low": "71.9300", "4. close": "72.4900", "5. volume": "18215276" }, "2017-08-17": { "1. open": "73.5800", "2. high": "73.8700", "3. low": "72.4000", "4. close": "72.4000", "5. volume": "21834250" },

    In addition to the data presentation aspects, below are couple other data-related proposals:

    • Expand CSV support to all API functions. CSV is currently enabled only for the time series APIs.
    • Make error messages more informative for debugging purposes.

    In Summary

    It is always a pleasure to have an API service that is well documented, platform/language-agnostic, and easily integratable. The fact that we have several third-party libraries built on top of Alpha Vantage on GitHub is in a sense testament to its developer-friendly nature. While there is still room for them to become a better version of themselves, I hope they thrive and stay true to the description on their home page - "driven by rigorous research, cutting edge technology, and a disciplined focus on democratizing access to data."

    enhancement 
    opened by wickenden-g 68
  • 'alpha_vantage' is not a package

    'alpha_vantage' is not a package

    Hi!

    I saw people had similar issues which was resolved by updating to latest version 0.1.9. I am currently trying to install/run your latest version 2.0.0 and getting the issue:

    >  sudo pip install alpha_vantage
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
    Collecting alpha_vantage
      Using cached https://files.pythonhosted.org/packages/90/62/c48ff7e3c7b6d7d6b50aefa48166abc3617fa724dba4bb51dab27c6288e4/alpha_vantage-2.0.0.tar.gz
    Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (from alpha_vantage)
    Requirement already satisfied: simplejson in /usr/lib64/python2.7/site-packages (from alpha_vantage)
    Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
    Requirement already satisfied: idna<2.7,>=2.5 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
    Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
    Installing collected packages: alpha-vantage
      Running setup.py install for alpha-vantage ... done
    Successfully installed alpha-vantage-2.0.0
    You are using pip version 9.0.3, however version 10.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
    >  sudo pip3 install alpha_vantage
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
    Collecting alpha_vantage
      Using cached https://files.pythonhosted.org/packages/90/62/c48ff7e3c7b6d7d6b50aefa48166abc3617fa724dba4bb51dab27c6288e4/alpha_vantage-2.0.0.tar.gz
    Requirement already satisfied: requests in /usr/lib/python3.6/site-packages (from alpha_vantage)
    Requirement already satisfied: simplejson in /usr/local/lib64/python3.6/site-packages (from alpha_vantage)
    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests->alpha_vantage)
    Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->alpha_vantage)
    Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python3.6/site-packages (from requests->alpha_vantage)
    Installing collected packages: alpha-vantage
      Running setup.py install for alpha-vantage ... done
    Successfully installed alpha-vantage-2.0.0
    You are using pip version 9.0.3, however version 10.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
    >  python3
    Python 3.6.5 (default, Apr  4 2018, 15:01:18) 
    [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import alpha_vantage
    >>> exit()
    
    >  python3 alpha_vantage.py
    Traceback (most recent call last):
      File "alpha_vantage.py", line 1, in <module>
        from alpha_vantage.timeseries import TimeSeries
      File "alpha_vantage.py", line 1, in <module>
        from alpha_vantage.timeseries import TimeSeries
    ModuleNotFoundError: No module named 'alpha_vantage.timeseries'; 'alpha_vantage' is not a package
    
    
    opened by tmdag 19
  • Python 3.4 issue collecting data using Alphavantage API.

    Python 3.4 issue collecting data using Alphavantage API.

    Hi Romel

    I'm a newbie to Python and learning on the go.

    I tried collecting stock data using Alphavantage API example code, available here, but I didn't succeed.

    Every time I get a different error. Is there a way, we can get in touch and discuss this issue.

    I have tried all the solutions, that appeared on your GitHub page so far.

    Kindly let me know

    Thanks In Advance

    Regards Sridhar

    question 
    opened by me2learn 14
  • Date as index for pandas dataframe

    Date as index for pandas dataframe

    Hello. will the recent update the index column is now an int index. Would be great if there would be an option to have the date as index again. Makes zero sense for me to have an integer index. Thanks for your consideration. Steffen

    opened by stnatter 12
  • Casting date index to datetime

    Casting date index to datetime

    I have noticed that using the DateFrame by default is not casting the index to datetime so using the next code as a sample

    from alpha_vantage.cryptocurrencies import CryptoCurrencies
    
    crypto = CryptoCurrencies(key=ALPHAVANTAGE_API_KEY, output_format='pandas')
    data, meta_data = crypto.get_digital_currency_intraday('BTC', 'EUR')
    data['1a. price (EUR)'].plot()
    plt.title(f'{meta_data["1. Information"]} {meta_data["3. Digital Currency Name"]}')
    plt.show()
    

    You would get this image: image

    With this pull request the same code will create this other image: image

    Where the X axis is populated with the dates correctly

    opened by tuxskar 11
  • timeseries

    timeseries

    Copy and pasted the code for the basic GOOGL stock check, error is seen.

    from alpha_vantage.timeseries import TimesSeries ts = TimesSeries(key='YOUR_API_KEY') data, meta_data = ts.get_intraday('GOOGL')

    from alpha_vantage.timeseries import TimesSeries ModuleNotFoundError: No module named 'alpha_vantage.timeseries'

    invalid 
    opened by Kirk-H 11
  • Timeseries for currency pairs returns always 0 in volume column

    Timeseries for currency pairs returns always 0 in volume column

    Hi Guys,

    I am currently playing with alpha vantage in python and am currently facing the following problem:

    When I try to do a query for market data of currency pairs, the column "volume" only contains the value 0 in each line. If I change the query to a stock, like for example "MSFT" the values for volume seems to be reasonable. Also tried for other currency pairs and they all show the same issue. Changing the time interval also could not solve the problem.

    Hope you can help me! Also, this is the code I am using:

    // from alpha_vantage.timeseries import TimeSeries import pandas as pd

    key_path = "path to my key" ts = TimeSeries(key=open(key_path,'r').read(), output_format='pandas') temp_data = ts.get_intraday(symbol="MSFT",interval='5min', outputsize='full')[0] //

    Kind regards,

    opened by MarVL92 10
  • Date Column

    Date Column

    The date column doesn't become a valid column when I use:

    ts = TimeSeries(key=os.environ.get('ALPHAVANTAGE_API'), output_format='pandas')
    data = ts.get_daily_adjusted('aapl', outputsize='full')
    
    opened by ACPK 10
  • Does not recognise rate limiting related errors

    Does not recognise rate limiting related errors

    It is quite easy for a batch job to run into Alpha Vantage's rate limits. Frustratingly AV don't just return a HTTP non-200 error so it appears that the only way to recognise this as the caller would be to interpret the error message, which is currently:

    Thank you for using Alpha Vantage! Our standard API call frequency is 5 calls per minute and 500 calls per day. Please visit https://www.alphavantage.co/premium/ if you would like to target a higher API call frequency.
    

    Could the library try to recognise this error and possibly automatically retry after something like 12 seconds?

    (Also is it worth requesting AV folks for better machine-understandable errors on this? I have no idea how open they are to bug reports like this..)

    enhancement 
    opened by Wilm0r 9
  • API call frequency error after 4 calls

    API call frequency error after 4 calls

    Hi there,

    I am making a get_daily call in a loop and on the 5th call, I am returned the ValueError: Thank you for using Alpha Vantage! Our standard API call frequency is 5 calls per minute and 500 calls per day.

    I have a free key and I have definitely not exhausted the daily limit. Do others have the same issue?

    av_issue 
    opened by thatsis 9
  • NESN.SWI + outputsize=full produces error

    NESN.SWI + outputsize=full produces error

    Here's another ticker that produces the "invalid API call" error:

    https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=NESN.SWI&outputsize=full&apikey=KEY

    See also #173 .

    av_issue 
    opened by ymyke 9
  • Tests fail: ImportError: attempted relative import beyond top-level package

    Tests fail: ImportError: attempted relative import beyond top-level package

    Both pytests and unitests fail this way:

    =========================================================================================== ERRORS ===========================================================================================
    __________________________________________________________________ ERROR collecting test_alpha_vantage/test_alphavantage.py __________________________________________________________________
    ImportError while importing test module '/usr/ports/finance/py-alpha-vantage/work-py39/alpha_vantage-2.3.1/test_alpha_vantage/test_alphavantage.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    test_alpha_vantage/test_alphavantage.py:2: in <module>
        from ..alpha_vantage.alphavantage import AlphaVantage
    E   ImportError: attempted relative import beyond top-level package
    _______________________________________________________________ ERROR collecting test_alpha_vantage/test_alphavantage_async.py _______________________________________________________________
    ImportError while importing test module '/usr/ports/finance/py-alpha-vantage/work-py39/alpha_vantage-2.3.1/test_alpha_vantage/test_alphavantage_async.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    test_alpha_vantage/test_alphavantage_async.py:2: in <module>
        from ..alpha_vantage.async_support.alphavantage import AlphaVantage
    E   ImportError: attempted relative import beyond top-level package
    ____________________________________________________________ ERROR collecting test_alpha_vantage/test_integration_alphavantage.py ____________________________________________________________
    ImportError while importing test module '/usr/ports/finance/py-alpha-vantage/work-py39/alpha_vantage-2.3.1/test_alpha_vantage/test_integration_alphavantage.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    test_alpha_vantage/test_integration_alphavantage.py:2: in <module>
        from ..alpha_vantage.alphavantage import AlphaVantage
    E   ImportError: attempted relative import beyond top-level package
    _________________________________________________________ ERROR collecting test_alpha_vantage/test_integration_alphavantage_async.py _________________________________________________________
    ImportError while importing test module '/usr/ports/finance/py-alpha-vantage/work-py39/alpha_vantage-2.3.1/test_alpha_vantage/test_integration_alphavantage_async.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    test_alpha_vantage/test_integration_alphavantage_async.py:2: in <module>
        from ..alpha_vantage.async_support.alphavantage import AlphaVantage
    E   ImportError: attempted relative import beyond top-level package
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ===================================================================================== 4 errors in 0.67s ======================================================================================
    *** Error code 2
    
    opened by yurivict 0
  • extended time series support

    extended time series support

    i could be doing something wrong, but i'm getting JSONDecoderError when trying to use extended ts api:

    envs\DataStore\lib\json\decoder.py in raw_decode(self, s, idx) 353 obj, end = self.scan_once(s, idx) 354 except StopIteration as err: --> 355 raise JSONDecodeError("Expecting value", s, err.value) from None 356 return obj, end

    JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    sample code: import alpha_vantage as av from alpha_vantage.timeseries import TimeSeries import os source_key = os.getenv('ALPHAVANTAGE_API_KEY') ts = TimeSeries(source_key) ts.get_intraday_extended('SPY', interval='15min', slice='year1month1')

    opened by densadak 4
  • Added digital currency intraday support

    Added digital currency intraday support

    I've followed the syntax of the previous methods to implement this one. I tested locally and it works. Oh, the .gitignore was updated to not include my testing files hehe sorry about that

    opened by EliasOlie 0
  • Honor the user's choice on output format

    Honor the user's choice on output format

    Fixes an issue where certain endpoints would be processed as pandas when in fact the user asked for json. (This looks like something that resulted from accidental copy-pasting)

    opened by ddavness 0
  • added eps and eps test

    added eps and eps test

    Added the funtion for earnings per share data and a unit test for that function.

    Hopefully this time there wont be a merge issue like: #285 Hope this is all that #319 wanted.

    opened by Camelket 0
Releases(2.3.1)
Owner
Romel Torres
I am a Venezuelan Electronic Engineer with a Msc. in Embedded Computing Systems who loves Open Source, my interests are Fpgas, Yocto, Python and Raspberry pi.
Romel Torres
ffn - a financial function library for Python

ffn - Financial Functions for Python Alpha release - please let me know if you find any bugs! If you are looking for a full backtesting framework, ple

Philippe Morissette 1.4k Jan 1, 2023
Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)

finmarketpy (formerly pythalesians) finmarketpy is a Python based library that enables you to analyze market data and also to backtest trading strateg

Cuemacro 3k Dec 30, 2022
Common financial risk and performance metrics. Used by zipline and pyfolio.

empyrical Common financial risk metrics. Table of Contents Installation Usage Support Contributing Testing Installation pip install empyrical Usage S

Quantopian, Inc. 1k Dec 26, 2022
Common financial technical indicators implemented in Pandas.

FinTA (Financial Technical Analysis) Common financial technical indicators implemented in Pandas. This is work in progress, bugs are expected and resu

null 1.8k Dec 31, 2022
scrilla: A Financial Optimization Application

A python application that wraps around AlphaVantage, Quandl and IEX APIs, calculates financial statistics and optimizes portfolio allocations.

Grant Moore 6 Dec 17, 2022
A banking system is a group or network of institutions that provide financial services for us

A banking system is a group or network of institutions that provide financial services for us. These institutions are responsible for operating a payment system, providing loans, taking deposits, and helping with investments.

UTTKARSH PARMAR 1 Oct 24, 2021
Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.

Stock Statistics/Indicators Calculation Helper VERSION: 0.3.2 Introduction Supply a wrapper StockDataFrame based on the pandas.DataFrame with inline s

Cedric Zhuang 1.1k Dec 28, 2022
Python sync/async framework for Interactive Brokers API

Introduction The goal of the IB-insync library is to make working with the Trader Workstation API from Interactive Brokers as easy as possible. The ma

Ewald de Wit 2k Dec 30, 2022
Yahoo! Finance market data downloader (+faster Pandas Datareader)

Yahoo! Finance market data downloader Ever since Yahoo! finance decommissioned their historical data API, many programs that relied on it to stop work

Ran Aroussi 8.4k Jan 1, 2023
stock data on eink with raspberry

small python skript to display tradegate data on a waveshare e-ink important you need locale "de_AT.UTF-8 UTF-8" installed. do so in raspi-config's Lo

Simon Oberhammer 24 Feb 22, 2022
Portfolio and risk analytics in Python

pyfolio pyfolio is a Python library for performance and risk analysis of financial portfolios developed by Quantopian Inc. It works well with the Zipl

Quantopian, Inc. 4.8k Jan 8, 2023
bt - flexible backtesting for Python

bt - Flexible Backtesting for Python bt is currently in alpha stage - if you find a bug, please submit an issue. Read the docs here: http://pmorissett

Philippe Morissette 1.6k Jan 5, 2023
An Algorithmic Trading Library for Crypto-Assets in Python

Service Master Develop CI Badge Catalyst is an algorithmic trading library for crypto-assets written in Python. It allows trading strategies to be eas

Enigma 2.4k Jan 5, 2023
Python Backtesting library for trading strategies

backtrader Yahoo API Note: [2018-11-16] After some testing it would seem that data downloads can be again relied upon over the web interface (or API v

DRo 9.8k Dec 30, 2022
Python Algorithmic Trading Library

PyAlgoTrade PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now pos

Gabriel Becedillas 3.9k Jan 1, 2023
ARCH models in Python

arch Autoregressive Conditional Heteroskedasticity (ARCH) and other tools for financial econometrics, written in Python (with Cython and/or Numba used

Kevin Sheppard 1k Jan 4, 2023
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.

Backtesting.py Backtest trading strategies with Python. Project website Documentation the project if you use it. Installation $ pip install backtestin

null 3.1k Dec 31, 2022
Q-Fin: A Python library for mathematical finance.

Q-Fin A Python library for mathematical finance. Installation https://pypi.org/project/QFin/ pip install qfin Bond Pricing Option Pricing Black-Schol

Roman Paolucci 247 Jan 1, 2023
personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

wenbin wu 23 Oct 30, 2022