A python client for interacting with the EOD Historical Data api


Keywords
api
License
GPL-3.0
Install
pip install eodclient==1.1.6

Documentation

EOD-Historical-Data-client

A client for interacting with https://eodhistoricaldata.com/

Run the tests

EOD_API_KEY='your-key-here' nosetests -s

Use -s for stdout of pdb to be output immediately

Sometimes it is easier to add your key to the environment

Structure

  • Exchange - name, code
  • Symbol - Code, Country, Currency, Exchange, Name

Getting Started

pip install eodclient

Usage

Get Symbols

from eodclient import exchange

us_exchange = exchange.Exchange('US')
us_exchange.get_symbols()

Get Real time data for a single symbol

from eodclient import Symbol

apple_symbol = Symbol(code='AAPL', exchange_code='US')
apple_data = apple_symbol.get_real_time()

Get End of day daya for a single symbol

from eodclient import Symbol

apple_symbol = Symbol(code='AAPL', exchange_code='US')
apple_data = apple_symbol.get_end_of_day()

Get Real time data for multiple stocks

from eodclient import SymbolSet

symbols = SymbolSet(
    [
        {'code': 'AAPL', 'exchange_code': 'US'},
        {'code': 'PLKT', 'exchange_code': 'US'},
        {'code': 'WHL', 'exchange_code': 'JSE'},
    ]
)
data = symbols.get_real_time()

Uploading to pYpi

  1. Update the readme and version in setup.py

  2. Create the git tag locally

    git tag -a 1.0.5.dev1 -m "Real time data" git push origin 1.0.5.dev1

  3. Distribute and update pypi

    python setup.py sdist upload

Run a specific test

nosetests eodclient/tests/test_data.py:DataTests.test_unknown_codes -s

To allow for debugging

nosetests -s

TODO

  • Multithreaded requests