Investor’s Exchange Data

The following endpoints are available under Investor’s Exchange Data:

TOPS

TOPS is IEX’s aggregated best quoted bid and offer position in near real time.

Access is available through the function get_tops():

iexfinance.iexdata.get_tops(symbols=None, **kwargs)

TOPS data for a symbol or list of symbols.

TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book. TOPS is ideal for developers needing both quote and trade data.

Reference: https://iexcloud.io/docs/api/#tops Data Weighting: Free

Parameters:
  • symbols (str or list, default None, optional) – A symbol or list of symbols
  • kwargs – Additional Request Parameters (see base class)

Usage

from iexfinance.iexdata import get_tops

get_tops('AAPL')

Note

The /tops endpoint without any parameters will return all symbols. TOPS data with all symbols is 1.78mb uncompressed (270kb compressed) and is throttled at one request per second, per IEX docs

Last

Last is IEX real-time trade data from the IEX book. This endpoint allows retrieval of a real-time quote.

Access is available through the function get_last():

iexfinance.iexdata.get_last(symbols=None, **kwargs)

Last data for a symbol or list of symbols

Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time. Last is ideal for developers that need a lightweight stock quote.

Reference: https://iexcloud.io/docs/api/#last Data Weighting: Free

Parameters:
  • symbols (str or list, default None, optional) – A symbol or list of symbols
  • kwargs – Additional Request Parameters (see base class)

Usage

from iexfinance.iexdata import get_last

df = get_last(symbols="AAPL", output_format='pandas')
df['price']

Note

The /tops/last endpoint without any parameters will return all symbols.

DEEP

DEEP is IEX’s aggregated real-time depth of book quotes. DEEP also provides last trade price and size information.

Access is available through the function get_deep():

iexfinance.iexdata.get_deep(symbols=None, **kwargs)

DEEP data for a symbol or list of symbols

DEEP is used to receive real-time depth of book quotations direct from IEX. The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side, and do not indicate the size or number of individual orders at any price level. Non-displayed orders and non-displayed portions of reserve orders are not represented in DEEP.

DEEP also provides last trade price and size information. Trades resulting from either displayed or non-displayed orders matching on IEX will be reported. Routed executions will not be reported.

Reference: https://iexcloud.io/docs/api/#deep Data Weighting: Free

Parameters:
  • symbols (str or list, default None) – A symbol or list of symbols
  • kwargs – Additional Request Parameters (see base class)

Notes

Pandas not supported as an output format for the DEEP endpoint.

Note

Per IEX, DEEP only accepts one symbol at this time.

Usage

from iexfinance.iexdata import get_deep

get_deep("AAPL")[:2]

DEEP Auction

Todo

Coming soon.

DEEP Book

Todo

Coming soon.

DEEP Operational Halt Status

Todo

Coming soon.

DEEP Official Price

Todo

Coming soon.

DEEP Security Event

Todo

Coming soon.

DEEP System Event

Todo

Coming soon.

DEEP Trades

Todo

Coming soon.

DEEP Trade Break

Todo

Coming soon.

DEEP Trading Status

Todo

Coming soon.

Listed Short Interest List

Todo

Coming soon.

Stats Historical Daily

Warning

This endpoint has been marked as in-dev by the provider.

Historical Daily is IEX’s trading statstics from the previous trading sessions.

Access is available through the function get_stats_daily():

iexfinance.iexdata.get_stats_daily(start=None, end=None, last=None, **kwargs)

Stats Historical Daily

This call will return daily stats for a given month or day.

Warning

This endpoint is marked as “in development” by the provider.

Reference: https://iexcloud.io/docs/api/#stats-historical-daily-in-dev Data Weighting: Free

Parameters:
  • start (datetime.datetime, default None, optional) – Start of data retrieval period
  • end (datetime.datetime, default None, optional) – End of data retrieval period
  • last (int, default None, optional) – Used in place of date range to retrieve previous number of trading days (up to 90)
  • kwargs – Additional Request Parameters (see base class)

Data retrieval period must be between 1/2014 and today.

Usage

In [1]: from iexfinance.iexdata import get_stats_daily

In [2]: get_stats_daily(last=3)
Out[2]: 
[{'date': '2019-02-19',
  'volume': 195381208,
  'routedVolume': 32570134,
  'marketShare': 0.02788,
  'isHalfday': 0,
  'litVolume': 50146328},
 {'date': '2019-02-15',
  'volume': 192761876,
  'routedVolume': 35248987,
  'marketShare': 0.02686,
  'isHalfday': 0,
  'litVolume': 47854717},
 {'date': '2019-02-14',
  'volume': 196788227,
  'routedVolume': 39877041,
  'marketShare': 0.02689,
  'isHalfday': 0,
  'litVolume': 48714416}]

Stats Historical Summary

Historical Summary is IEX’s trading statstics from the previous trading sessions.

Access is available through the function get_stats_summary():

iexfinance.iexdata.get_stats_summary(start=None, end=None, **kwargs)

Stats Historical Summary

Reference: https://iexcloud.io/docs/api/#stats-historical-summary Data Weighting: Free

Parameters:
  • start (datetime.datetime, default None, optional) – Start of data retrieval period
  • end (datetime.datetime, default None, optional) – End of data retrieval period
  • kwargs – Additional Request Parameters (see base class)

Data retrieval period must be between 1/2014 and today.

Warning

The Historical Summary accepts requests of one month per request. if specifying a long date range, a query will be made for each month in the range, significantly impacting performance

Usage

In [3]: from iexfinance.iexdata import get_stats_summary

In [4]: from datetime import datetime

In [5]: get_stats_summary(start=datetime(2017, 2, 9), end=datetime(2017, 5, 24))[0]
Out[5]: 
[{'averageDailyVolume': 143199060.7,
  'averageDailyRoutedVolume': 49729760.53,
  'averageMarketShare': 0.02084,
  'averageOrderSize': 725,
  'averageFillSize': 234,
  'bin100Percent': 0.69467,
  'bin101Percent': 0.01241,
  'bin200Percent': 0.12427,
  'bin300Percent': 0.05452,
  'bin400Percent': 0.02914,
  'bin500Percent': 0.05156,
  'bin1000Percent': 0.02996,
  'bin5000Percent': 0.00226,
  'bin10000Percent': 0.00122,
  'bin10000Trades': 4052,
  'bin20000Trades': 1448,
  'bin50000Trades': 216,
  'uniqueSymbolsTraded': 7722,
  'blockPercent': 0.07064,
  'selfCrossPercent': 0.03382,
  'etfPercent': 0.11663,
  'largeCapPercent': 0.42933,
  'midCapPercent': 0.28813,
  'smallCapPercent': 0.16591,
  'venueARCXFirstWaveWeight': 0.18888,
  'venueBATSFirstWaveWeight': 0.05204,
  'venueBATYFirstWaveWeight': 0.06483,
  'venueEDGAFirstWaveWeight': 0.00922,
  'venueEDGXFirstWaveWeight': 0.08538,
  'venueOverallFirstWaveWeight': 1,
  'venueXASEFirstWaveWeight': 0.00253,
  'venueXBOSFirstWaveWeight': 0.03279,
  'venueXCHIFirstWaveWeight': 0.00176,
  'venueXCISFirstWaveWeight': None,
  'venueXNGSFirstWaveWeight': 0.18942,
  'venueXNYSFirstWaveWeight': 0.2476,
  'venueXPHLFirstWaveWeight': 0.0109,
  'venueARCXFirstWaveRate': 0.98841,
  'venueBATSFirstWaveRate': 0.99459,
  'venueBATYFirstWaveRate': 0.98433,
  'venueEDGAFirstWaveRate': 0.99363,
  'venueEDGXFirstWaveRate': 0.99542,
  'venueOverallFirstWaveRate': 0.99029,
  'venueXASEFirstWaveRate': 0.92021,
  'venueXBOSFirstWaveRate': 0.97967,
  'venueXCHIFirstWaveRate': 0.77632,
  'venueXCISFirstWaveRate': None,
  'venueXNGSFirstWaveRate': 0.99241,
  'venueXNYSFirstWaveRate': 0.99021,
  'venueXPHLFirstWaveRate': 0.97645}]

Stats Intraday

Intraday is IEX’s aggregated best quoted bid and offer position in near real time.

Access is available through the function get_stats_intraday():

iexfinance.iexdata.get_stats_intraday(**kwargs)

Stats intraday

Reference: https://iexcloud.io/docs/api/#stats-intraday Data Weighting: Free

Parameters:kwargs – Additional Request Parameters (see base class)

Usage

In [6]: from iexfinance.iexdata import get_stats_intraday

In [7]: get_stats_intraday()
Out[7]: 
{'volume': {'value': 193773038, 'lastUpdated': 1550700907590},
 'symbolsTraded': {'value': 5846, 'lastUpdated': 1550699952349},
 'routedVolume': {'value': 37040022, 'lastUpdated': 1550700907590},
 'notional': {'value': 8693010492, 'lastUpdated': 1550700907590},
 'marketShare': {'value': 0.02624, 'lastUpdated': 1550700907350}}

Stats Recent

Recent is IEX’s trading statstics from the previous five trading days.

Access is available through the function get_stats_recent():

iexfinance.iexdata.get_stats_recent(**kwargs)

Stats Recent

This call will return a minimum of the last five trading days up to all trading days of the current month.

Reference: https://iexcloud.io/docs/api/#stats-recent Data Weighting: Free

Parameters:kwargs – Additional Request Parameters (see base class)

Usage

In [8]: from iexfinance.iexdata import get_stats_recent

In [9]: get_stats_recent()[0]
Out[9]: 
{'date': '2019-02-19',
 'volume': 195381208,
 'routedVolume': 32570134,
 'marketShare': 0.02788,
 'isHalfday': False,
 'litVolume': 50146328}

Stats Records

Records is IEX’s trading statstics from the previous trading sessions.

Access is available through the function get_stats_records():

iexfinance.iexdata.get_stats_records(**kwargs)

Stats Records

Reference: https://iexcloud.io/docs/api/#stats-records Data Weighting: Free

Parameters:kwargs – Additional Request Parameters (see base class)

Usage

In [10]: from iexfinance.iexdata import get_stats_records

In [11]: get_stats_records()
Out[11]: 
{'volume': {'recordValue': 301897950,
  'recordDate': '2018-12-20',
  'previousDayValue': 195381208,
  'avg30Value': 196624867.5},
 'symbolsTraded': {'recordValue': 6614,
  'recordDate': '2018-12-20',
  'previousDayValue': 5790,
  'avg30Value': 5733},
 'routedVolume': {'recordValue': 74855222,
  'recordDate': '2016-11-10',
  'previousDayValue': 32570134,
  'avg30Value': 35751662},
 'notional': {'recordValue': 17269723089.111,
  'recordDate': '2018-02-06',
  'previousDayValue': 9052772082.8899,
  'avg30Value': 9275880651.0643}}