IEX API icon

Hello, developers.

The IEX API 1.0 offers you free access to our TOPS, market, and stats data.

API 1.0 Updated Feb 28, 2017.

By using the IEX API, you agree to our terms.

Getting started

The IEX API is a set of RESTful services designed for developers and engineers. It can be used to build high-quality apps and services. We're always working to improve the IEX API. Please check back for enhancements and improvements.

  1. Read the terms.
  2. Read the manual and start building.
  3. Attribute properly.

Go to contents

Attribution

If you redistribute our API data:

  1. Cite IEX using "Data provided for free by IEX."
  2. For digital mediums, provide a link to https://iextrading.com/api-exhibit-a.

Additionally, if you display our TOPS price data, cite "IEX Real-Time Price" near the price.

Go to contents

Support

If you find any issues with our API or have any questions, please reach out to api@iextrading.com or, for community support, tag your question with the "iex-api" tag on Stack Overflow.

Go to contents

Authentication

The IEX API is currently open and does not require authentication to access its data.

Go to contents

Endpoints

  • All endpoints are prefixed with: https://api.iextrading.com/1.0
  • We support JSONP for all endpoints.

Go to contents

SSL

We provide a valid, signed certificate for our API methods. Be sure your connection library supports HTTPS.

Go to contents

HTTP methods

The IEX API only supports GET requests at this time.

Go to contents

Parameters

  • Parameter values must be comma-delimited when requesting multiple.
    (i.e. ?symbols=AAPL,fb is correct.)
  • Casing does not matter when passing values to a parameter.
    (i.e. Both ?symbols=fb and ?symbols=FB will work.)
  • Be sure to url-encode the values you pass to your parameter.
    (i.e. ?symbols=AIG+ encoded is ?symbols=AIG%2b.)

Go to contents

Filter results

All REST endpoints support a filter parameter to return a subset of data. Pass a comma-delimited list of field names to filter. Field names are case-sensitive and are found in the Reference section of each endpoint.

  • Example: ?filter=symbol,volume,lastSalePrice will return only the three fields specified.

Go to contents

WebSockets

WebSocket support is limited at this time to Node.js server clients and socket.io browser clients. We use socket.io for our WebSocket server. The WebSocket examples in our documentation assume a socket.io browser client is being used. We're planning to rewrite our WebSocket server for broader support.

  • For socket.io clients, use: https://ws-api.iextrading.com/1.0

Go to contents

Uptime

The IEX API cannot guarantee 100% uptime, but we strive to be highly available. If we do have downtime, we'll tweet information from @IEXstatus.

Go to contents

Usage

To provide the best experience for all our users, we monitor for suspicious activity and overload. We reserve the right to revoke access to anyone who abuses the IEX API. We throttle endpoints by IP: five requests per second.

Go to contents

Roadmap

We are always working to improve the IEX API. Below is a list of planned enhancements for future releases. We may add or remove items at any time. If you have suggestions or if any listed items are critical for your project, email us at api@iextrading.com.

  • WebSockets server rewrite
  • Company info
  • Company financial data
  • Historical prices
  • Webhooks
  • Depth of book data

Go to contents

Changelog

View the IEX API changelog for a list of running updates to the API.

Go to contents

TOPS

For an example of an app that's using TOPS, see our TOPS viewer app.

TOPS

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.

Endpoint

/tops
/tops?symbols=AAPL,fb,AIG%2b
/tops?symbols=AAPL,fb,AIG%2b&format=csv

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.

Go to contents

Parameters

symbols
format
  • symbols
    • Parameter is optional
    • Value needs to be a comma-separated list of symbols (i.e AAPL,fb)
    • When parameter is not present, request returns all symbols
  • format
    • Parameter is optional
    • Value can only be csv
    • When parameter is not present, format defaults to JSON

Our eligible symbol reference is updated daily. Use these symbols as values in your symbols parameter.

Go to contents

Response

[
  {
    symbol: "AAPL",
    marketPercent: 0.00901,
    bidSize: 200,
    bidPrice: 110.94,
    askSize: 100,
    askPrice: 111.82,
    volume: 177265,
    lastSalePrice: 111.76,
    lastSaleSize: 5,
    lastSaleTime: 1480446905681,
    lastUpdated: 1480446910557
  },
  {
    symbol: "FB",
    marketPercent: 0.01465,
    bidSize: 200,
    bidPrice: 120.8,
    askSize: 100,
    askPrice: 122.5,
    volume: 205208,
    lastSalePrice: 121.41,
    lastSaleSize: 100,
    lastSaleTime: 1480446908666,
    lastUpdated: 1480446923942
  },
  {
    symbol: "AIG+",
    marketPercent: 0.04618,
    bidSize: 0,
    bidPrice: 0,
    askSize: 0,
    askPrice: 0,
    volume: 3400,
    lastSalePrice: 21.52,
    lastSaleSize: 100,
    lastSaleTime: 1480446206461,
    lastUpdated: -1
  }
]

Go to contents

Reference

  • symbol refers to the stock ticker.
  • marketPercent refers to IEX's percentage of the market in the stock.
  • bidSize refers to amount of shares on the bid on IEX.
  • bidPrice refers to the best bid price on IEX.
  • askSize refers to amount of shares on the ask on IEX.
  • askPrice refers to the best ask price on IEX.
  • volume refers to shares traded in the stock on IEX.
  • lastSalePrice refers to last sale price of the stock on IEX. (Refer to the attribution section above.)
  • lastSaleSize refers to last sale size of the stock on IEX.
  • lastSaleTime refers to last sale time in epoch time of the stock on IEX.
  • lastUpdated refers to the last update time of the data in milliseconds since midnight Jan 1, 1970 or -1. If the value is -1, IEX has not quoted the symbol in the trading day.

Go to contents

WebSockets example

Connect to tops via websockets. The following example is how you could connect to tops with socket.io.

const socket = require('socket.io-client')('https://ws-api.iextrading.com/1.0/tops')

socket.on('message', message => console.log(message))

socket.on('connect', () => {
  socket.emit('subscribe', 'aapl,fb,aig+')
  socket.emit('unsubscribe', 'aig+')
})

socket.on('disconnect', () => console.log('Disconnected.'))

Subscribe to firehose to return all symbols.

Go to contents


Last

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.

Endpoint

/tops/last
/tops/last?symbols=AAPL,fb,AIG%2b
/tops/last?symbols=AAPL,fb,AIG%2b&format=csv

The /tops/last endpoint without any parameters will return all symbols. Last data with all symbols is 460kb uncompressed and 93kb compressed.

Go to contents

Parameters

symbols
format
  • symbols
    • Parameter is optional
    • Value needs to be a comma-separated list of symbols (i.e AAPL,fb)
    • When parameter is not present, request returns all symbols
  • format
    • Parameter is optional
    • Value can only be csv
    • When parameter is not present, format defaults to JSON

Our eligible symbol reference is updated daily. Use these symbols as values in your symbols parameter.

Go to contents

Response

[
  {
    symbol: "AAPL",
    price: 111.76,
    size: 5,
    time: 1480446905681
  },
  {
    symbol: "FB",
    price: 121.41,
    size: 100,
    time: 1480446908666
  },
  {
    symbol: "AIG+",
    price: 21.52,
    size: 100,
    time: 1480446206461
  }
]

Go to contents

Reference

  • symbol refers to the stock ticker.
  • price refers to last sale price of the stock on IEX. (Refer to the attribution section above.)
  • size refers to last sale size of the stock on IEX.
  • time refers to last sale time in epoch time of the stock on IEX.

Go to contents

WebSockets example

Connect to last via websockets. The following example is how you could connect to last with socket.io.

const socket = require('socket.io-client')('https://ws-api.iextrading.com/1.0/last')

socket.on('message', message => console.log(message))

socket.on('connect', () => {
  socket.emit('subscribe', 'aapl,fb,aig+')
  socket.emit('unsubscribe', 'aig+')
})

socket.on('disconnect', () => console.log('Disconnected.'))

Subscribe to firehose to return all symbols.

Go to contents

Market

For an example of an app that's using market, see our Market volume app.

Market

Endpoint

/market

This endpoint returns near real time traded volume on the markets. Market data is captured by the IEX system from approximately 7:45 a.m. to 5:15 p.m. ET.

Go to contents

Parameters

format
  • format
    • Parameter is optional
    • Value can only be csv
    • When parameter is not present, format defaults to JSON

Go to contents

Response

[
  {
    mic: "TRF",
    tapeId: "-",
    venueName: "TRF Volume",
    volume: 589171705,
    tapeA: 305187928,
    tapeB: 119650027,
    tapeC: 164333750,
    marketPercent: 0.37027,
    lastUpdated: 1480433817317
  },
  {
    mic: "XNGS",
    tapeId: "Q",
    venueName: "NASDAQ",
    volume: 213908393,
    tapeA: 90791123,
    tapeB: 30731818,
    tapeC: 92385452,
    marketPercent: 0.13443,
    lastUpdated: 1480433817311
  },
  {
    mic: "XNYS",
    tapeId: "N",
    venueName: "NYSE",
    volume: 204280163,
    tapeA: 204280163,
    tapeB: 0,
    tapeC: 0,
    marketPercent: 0.12838,
    lastUpdated: 1480433817336
  },
  {
    mic: "ARCX",
    tapeId: "P",
    venueName: "NYSE Arca",
    volume: 180301371,
    tapeA: 64642458,
    tapeB: 78727208,
    tapeC: 36931705,
    marketPercent: 0.11331,
    lastUpdated: 1480433817305
  },
  {
    mic: "EDGX",
    tapeId: "K",
    venueName: "EDGX",
    volume: 137022822,
    tapeA: 58735505,
    tapeB: 32753903,
    tapeC: 45533414,
    marketPercent: 0.08611,
    lastUpdated: 1480433817310
  },
  {
    mic: "BATS",
    tapeId: "Z",
    venueName: "BATS BZX",
    volume: 100403461,
    tapeA: 52509859,
    tapeB: 25798360,
    tapeC: 22095242,
    marketPercent: 0.0631,
    lastUpdated: 1480433817311
  },
  {
    mic: "BATY",
    tapeId: "Y",
    venueName: "BATS BYX",
    volume: 54413196,
    tapeA: 28539960,
    tapeB: 13638779,
    tapeC: 12234457,
    marketPercent: 0.03419,
    lastUpdated: 1480433817310
  },
  {
    mic: "XBOS",
    tapeId: "B",
    venueName: "NASDAQ BX",
    volume: 31417461,
    tapeA: 16673166,
    tapeB: 5875538,
    tapeC: 8868757,
    marketPercent: 0.01974,
    lastUpdated: 1480433817311
  },
  {
    mic: "EDGA",
    tapeId: "J",
    venueName: "EDGA",
    volume: 30670687,
    tapeA: 15223428,
    tapeB: 8276375,
    tapeC: 7170884,
    marketPercent: 0.01927,
    lastUpdated: 1480433817311
  },
  {
    mic: "IEXG",
    tapeId: "V",
    venueName: "IEX",
    volume: 26907838,
    tapeA: 16578501,
    tapeB: 3889245,
    tapeC: 6440092,
    marketPercent: 0.01691,
    lastUpdated: 1480433817235
  },
  {
    mic: "XPHL",
    tapeId: "X",
    venueName: "NASDAQ PSX",
    volume: 13334403,
    tapeA: 5802294,
    tapeB: 4239741,
    tapeC: 3292368,
    marketPercent: 0.00838,
    lastUpdated: 1480433817071
  },
  {
    mic: "XCHI",
    tapeId: "M",
    venueName: "CHX",
    volume: 4719854,
    tapeA: 834762,
    tapeB: 3168434,
    tapeC: 716658,
    marketPercent: 0.00296,
    lastUpdated: 1480433814711
  },
  {
    mic: "XASE",
    tapeId: "A",
    venueName: "NYSE MKT",
    volume: 4419196,
    tapeA: 0,
    tapeB: 4419196,
    tapeC: 0,
    marketPercent: 0.00277,
    lastUpdated: 1480433816276
  },
  {
    mic: "XCIS",
    tapeId: "C",
    venueName: "NSX",
    volume: 187785,
    tapeA: 39923,
    tapeB: 62191,
    tapeC: 85671,
    marketPercent: 0.00011,
    lastUpdated: 1480433816141
  }
]

Go to contents

Reference

  • mic refers to the Market Identifier Code (MIC).
  • tapeId refers to the tape id of the venue.
  • venueName refers to name of the venue defined by IEX.
  • volume refers to the amount of traded shares reported by the venue.
  • tapeA refers to the amount of Tape A traded shares reported by the venue.
  • tapeB refers to the amount of Tape B traded shares reported by the venue.
  • tapeC refers to the amount of Tape C traded shares reported by the venue.
  • marketPercent refers to the venue's percentage of shares traded in the market.
  • lastUpdated refers to the last update time of the data in milliseconds since midnight Jan 1, 1970.

Go to contents

Stats

For an example of an app that's using stats, see our IEX mobile app.

Intraday

Endpoint

/stats/intraday

Go to contents

Response

{
  volume: {
    value: 26908038,
    lastUpdated: 1480433817323
  },
  symbolsTraded: {
    value: 4089,
    lastUpdated: 1480433817323
  },
  routedVolume: {
    value: 10879651,
    lastUpdated: 1480433816891
  },
  notional: {
    value: 1090683735,
    lastUpdated: 1480433817323
  },
  marketShare: {
    value: 0.01691,
    lastUpdated: 1480433817336
  }
}

Go to contents

Reference

  • volume refers to single counted shares matched from executions on IEX.
  • symbolsTraded refers to number of symbols traded on IEX.
  • routedVolume refers to executions received from order routed to away trading centers.
  • notional refers to sum of matched volume times execution price of those trades.
  • marketShare refers to IEX's percentage of total US Equity market volume.
  • lastUpdated refers to the last update time of the data in milliseconds since midnight Jan 1, 1970.

Go to contents


Recent

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

Endpoint

/stats/recent

Go to contents

Response

[
  {
    date: "2017-01-11",
    volume: 128048723,
    routedVolume: 38314207,
    marketShare: 0.01769,
    isHalfday: false,
    litVolume: 30520534
  },
  {
    date: "2017-01-10",
    volume: 135116521,
    routedVolume: 39329019,
    marketShare: 0.01999,
    isHalfday: false,
    litVolume: 29721789
  },
  {
    date: "2017-01-09",
    volume: 109850518,
    routedVolume: 31283422,
    marketShare: 0.01704,
    isHalfday: false,
    litVolume: 27699365
  },
  {
    date: "2017-01-06",
    volume: 116680433,
    routedVolume: 29528471,
    marketShare: 0.01805,
    isHalfday: false,
    litVolume: 29357729
  },
  {
    date: "2017-01-05",
    volume: 130389657,
    routedVolume: 40977180,
    marketShare: 0.01792,
    isHalfday: false,
    litVolume: 33169236
  },
  {
    date: "2017-01-04",
    volume: 124428433,
    routedVolume: 38859989,
    marketShare: 0.01741,
    isHalfday: false,
    litVolume: 31563256
  },
  {
    date: "2017-01-03",
    volume: 130195733,
    routedVolume: 34990159,
    marketShare: 0.01733,
    isHalfday: false,
    litVolume: 34150804
  }
]

Go to contents

Reference

  • date refers to the trading day.
  • volume refers to executions received from order routed to away trading centers.
  • routedVolume refers to single counted shares matched from executions on IEX.
  • marketShare refers to IEX's percentage of total US Equity market volume.
  • isHalfday will be true if the trading day is a half day.
  • litVolume refers to the number of lit shares traded on IEX (single-counted).

Go to contents


Records

Endpoint

/stats/records

Go to contents

Response

{
  volume: {
    recordValue: 233000477,
    recordDate: "2016-01-20",
    previousDayValue: 99594714,
    avg30Value: 138634204.5
  },
  symbolsTraded: {
    recordValue: 6046,
    recordDate: "2016-11-10",
    previousDayValue: 5500,
    avg30Value: 5617
  },
  routedVolume: {
    recordValue: 74855222,
    recordDate: "2016-11-10",
    previousDayValue: 29746476,
    avg30Value: 44520084
  },
  notional: {
    recordValue: 9887832327.8355,
    recordDate: "2016-11-10",
    previousDayValue: 4175710684.3897,
    avg30Value: 5771412969.2662
  }
}

Go to contents

Reference

  • volume refers to single counted shares matched from executions on IEX.
  • symbolsTraded refers to number of symbols traded on IEX.
  • routedVolume refers to executions received from order routed to away trading centers.
  • notional refers to sum of matched volume times execution price of those trades.

Go to contents


Historical summary

Endpoint

/stats/historical
/stats/historical?date=201605
/stats/historical?date=201605&format=csv

The /stats/historical endpoint without any parameters will return the current month's stats.

Go to contents

Parameters

date
format
  • date
    • Parameter is optional
    • Value needs to be in four-digit year, two-digit month format (YYYYMM) (i.e January 2017 would be written as 201701)
    • Historical data is only available for prior months, starting with January 2014
    • When parameter is not present, request returns prior month's data
  • format
    • Parameter is optional
    • Value can only be csv
    • When parameter is not present, format defaults to JSON

Go to contents

Response

[
  {
    averageDailyVolume: 112247378.5,
    averageDailyRoutedVolume: 34282226.24,
    averageMarketShare: 0,
    averageOrderSize: 493,
    averageFillSize: 287,
    bin100Percent: 0.61559,
    bin101Percent: 0.61559,
    bin200Percent: 0.61559,
    bin300Percent: 0.61559,
    bin400Percent: 0.61559,
    bin500Percent: 0.61559,
    bin1000Percent: 0.61559,
    bin5000Percent: 0.61559,
    bin10000Percent: 0.61559,
    bin10000Trades: 4666,
    bin20000Trades: 1568,
    bin50000Trades: 231,
    uniqueSymbolsTraded: 7419,
    blockPercent: 0.08159,
    selfCrossPercent: 0.02993,
    etfPercent: 0.12646,
    largeCapPercent: 0.40685,
    midCapPercent: 0.2806,
    smallCapPercent: 0.18609,
    venueARCXFirstWaveWeight: 0.22063,
    venueBATSFirstWaveWeight: 0.06249,
    venueBATYFirstWaveWeight: 0.07361,
    venueEDGAFirstWaveWeight: 0.01083,
    venueEDGXFirstWaveWeight: 0.0869,
    venueOverallFirstWaveWeight: 1,
    venueXASEFirstWaveWeight: 0.00321,
    venueXBOSFirstWaveWeight: 0.02935,
    venueXCHIFirstWaveWeight: 0.00108,
    venueXCISFirstWaveWeight: 0.00008,
    venueXNGSFirstWaveWeight: 0.20358,
    venueXNYSFirstWaveWeight: 0.29313,
    venueXPHLFirstWaveWeight: 0.01511,
    venueARCXFirstWaveRate: 0.97737,
    venueBATSFirstWaveRate: 0.99357,
    venueBATYFirstWaveRate: 0.99189,
    venueEDGAFirstWaveRate: 0.98314,
    venueEDGXFirstWaveRate: 0.99334,
    venueOverallFirstWaveRate: 0.98171,
    venueXASEFirstWaveRate: 0.94479,
    venueXBOSFirstWaveRate: 0.97829,
    venueXCHIFirstWaveRate: 0.65811,
    venueXCISFirstWaveRate: 0.9468,
    venueXNGSFirstWaveRate: 0.98174,
    venueXNYSFirstWaveRate: 0.98068,
    venueXPHLFirstWaveRate: 0.93629
  }
]

Go to contents

Reference

See our stats page for a reference of the keys.

Go to contents


Historical daily

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

Endpoint

/stats/historical/daily
/stats/historical/daily?date=201605
/stats/historical/daily?last=5
/stats/historical/daily?date=201605&format=csv

The /stats/historical/daily endpoint without any parameters will return the last trading day.

Go to contents

Parameters

date
last
format
  • date
    • Parameter is optional
    • Option 1: Value needs to be in four-digit year, two-digit month format (YYYYMM) (i.e January 2017 would be written as 201701)
    • Option 2: Value needs to be in four-digit year, two-digit month, two-digit day format (YYYYMMDD) (i.e January 21, 2017 would be written as 20170121)
    • Historical data is only available for prior months, starting with January 2014
  • last
    • Parameter is optional
    • Is used in place of date to retrieve last n number of trading days.
    • Value can only be a number up to 90
  • format
    • Parameter is optional
    • Value can only be csv
    • When parameter is not present, format defaults to JSON

Go to contents

Response

[
  {
    date: "2017-01-11",
    volume: 128048723,
    routedVolume: 38314207,
    marketShare: 0.01769,
    isHalfday: false,
    litVolume: 30520534
  },
  {
    date: "2017-01-10",
    volume: 135116521,
    routedVolume: 39329019,
    marketShare: 0.01999,
    isHalfday: false,
    litVolume: 29721789
  },
  {
    date: "2017-01-09",
    volume: 109850518,
    routedVolume: 31283422,
    marketShare: 0.01704,
    isHalfday: false,
    litVolume: 27699365
  },
  {
    date: "2017-01-06",
    volume: 116680433,
    routedVolume: 29528471,
    marketShare: 0.01805,
    isHalfday: false,
    litVolume: 29357729
  },
  {
    date: "2017-01-05",
    volume: 130389657,
    routedVolume: 40977180,
    marketShare: 0.01792,
    isHalfday: false,
    litVolume: 33169236
  },
  {
    date: "2017-01-04",
    volume: 124428433,
    routedVolume: 38859989,
    marketShare: 0.01741,
    isHalfday: false,
    litVolume: 31563256
  },
  {
    date: "2017-01-03",
    volume: 130195733,
    routedVolume: 34990159,
    marketShare: 0.01733,
    isHalfday: false,
    litVolume: 34150804
  }
]

Go to contents

Reference

  • date refers to the trading day.
  • volume refers to executions received from order routed to away trading centers.
  • routedVolume refers to single counted shares matched from executions on IEX.
  • marketShare refers to IEX's percentage of total US Equity market volume.
  • isHalfday will be true if the trading day is a half day.
  • litVolume refers to the number of lit shares traded on IEX (single-counted).

Go to contents