I'm using this fork to add Interactive Brokers Gateway to Pandas Datareader.
This package relies on a IB Gateway being active at its default location: https://localhost:5000. You can get the Gateway here. Getting started guide is here for running the service.
import requests
import pandas_datareader as pdr
session = requests.Session()
session.verify = False #required due to self-signed SSL cert
pdr.ib.time_series.IBTimeSeriesReader(symbols='396336017', period = '1w', bar = '1h', session = session).read()
If anyone at Interactive Brokers is watching, please surface options data and an isTruncated flag!
Pandas Datareader readme continues below.
Up to date remote data access for pandas, works for multiple versions of pandas.
Install using pip
pip install pandas-datareader
import pandas_datareader as pdr
pdr.get_data_fred('GS10')
Stable documentation is available on github.io. A second copy of the stable documentation is hosted on read the docs for more details.
Development documentation is available for the latest changes in master.
Using pandas datareader requires the following packages:
- pandas>=0.23
- lxml
- requests>=2.19.0
Building the documentation additionally requires:
- matplotlib
- ipython
- requests_cache
- sphinx
- pydata_sphinx_theme
Development and testing additionally requires:
- black
- coverage
- codecov
- coveralls
- flake8
- pytest
- pytest-cov
- wrapt
pip install git+https://github.com/pydata/pandas-datareader.git
or
git clone https://github.com/pydata/pandas-datareader.git
cd pandas-datareader
python setup.py install