Skip to content

IEX Implementation #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed

IEX Implementation #308

wants to merge 8 commits into from

Conversation

rgkimball
Copy link
Contributor

IEX recently announced the first version of a free market data API used to access a wide variety of data useful for traders, consisting of:

  • Highest volume stocks in the most recent trading session (Tops API; allows for subset selection)
  • Live prices (Last API, also available in websockets)
  • Trade volume by venue for the most recent trading session (Market API; separately reported by tape)
  • Market Records, by trade volume, symbol volume, route volume and notional value (Stats API)
  • Monthly and Daily historical summaries of trade volume (Stats API; separately reported by venue, symbol market cap, and order size)
  • Eligible symbols on IEX's platform (via Ref Data API)

This pull request implements all of the services available in their initial launch, except for the live prices via socket, and makes them available in DataFrames via pandas_datareader. Note that the API will return None for weekends and market holidays, and reports a special field for half days. Some examples:

import pandas_datareader as pdr

# Retrieve highest volume stocks for the previous session
tops = pdr.DataReader(source="iex-tops")

# Get most recent price (live)
px = pdr.get_last_iex("AAPL")
px = pdr.get_last_iex(["GOOG", "IBM"])

# Retrieve list of stocks that trade on IEX:
symbols = pdr.get_iex_symbols()

# Retrieve daily historical market volume info
ts = pdr.get_data_iex(start=datetime(2017, 1, 1), end=datetime(2017, 3, 31))

In the coming months, IEX also plans to implement:

  • Depth of book (i.e. live level II quotes)
  • Company info
  • Company financial data
  • Historical prices

@jreback
Copy link
Contributor

jreback commented May 7, 2017

tests would be nice

@rgkimball
Copy link
Contributor Author

Added some test cases

@rgkimball rgkimball force-pushed the master branch 4 times, most recently from 394e311 to fcad296 Compare May 12, 2017 03:18
@rgkimball
Copy link
Contributor Author

rgkimball commented May 12, 2017

Rebased for some of gfyoung's recent fixes and cleaned up the formatting.

@rgkimball
Copy link
Contributor Author

Rebased on 0.4.0 and implemented the newly launched DEEP API. Support implemented for:

All associated documentation is linked above. Noting that Travis failed due to Yahoo's iCharts API currently being down. Can a maintainer please restart the build when we have confirmation that it is back up? Thank you!

@jreback
Copy link
Contributor

jreback commented May 16, 2017

your tests are failing because of importing:

from datetime import (datetime, timezone)

timezone is not a module. you can use pytz directly, or simply use pandas timezone manip (which is vectorized).

@rgkimball
Copy link
Contributor Author

Ah, thank you. Non-Yahoo tests are passing now.

@@ -56,6 +66,42 @@ def get_quote_google(*args, **kwargs):
return GoogleQuotesReader(*args, **kwargs).read()


def get_tops_iex(*args, **kwargs):
return IEXTops(*args, **kwargs).read()
Copy link
Contributor

@jreback jreback May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prob do these inside each function this is odd to import everything (though that's the existing style)

e.g.

def get_tops_iex(....):
    from pandas_datareader.iex.tops import TopsReader
    return TopsReader(....)

further would be nice to have a docstring here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, no need to pollute the namespace further even for consistency's sake. Pushed an update with this change and docstrings, but I left imports in for the functions implemented by DataReader.

@jreback
Copy link
Contributor

jreback commented Jul 2, 2017

can you rebase

@davidastephens
Copy link
Member

@rgkimball Looks great - can you please rebase and add some docs, then we can merge.

@bashtage
Copy link
Contributor

Can you rebase on master so we can see if things pass.

@bashtage bashtage added this to the 0.6.0 milestone Jan 11, 2018
@bashtage bashtage mentioned this pull request Jan 18, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants