📈
Investors Exchange API Documentation
An unaffiliated JavaScript API for the IEX Developer Platform - https://iextrading.com
Installation
# NPM
npm install investors-exchange.api --save
# YARN
yarn add investors-exchange.api
Getting Started
import IEX from 'investors-exchange.api'
Miscellaneous Queries
Fetch
// https://iextrading.com/developer/docs/#financials
const endpoint = '/stock/snap/financials'
const params = {period: 'annual'}
const data = IEX.fetch(endpoint, params)
Stock Queries
Stock
const AAPL = IEX.stock('aapl') // Apple Inc.
const GOOG = IEX.stock('GOOG') // Alphabet Inc.
const SNAP = IEX.stock('Snap') // Snap Inc.
Book
const book = await AAPL.book()
Chart
const chart = {}
chart.default = await AAPL.chart() // 1 Month (default).
chart.dynamic = await GOOG.chart('dynamic') // Dynamic
chart.fiveYear = await GOOG.chart('5y') // 5 year.
chart.specific = await SNAP.chart('20180730') // Specific Date.
Company
const company = await AAPL.company()
Dividends
const dividends = {}
dividends.default = await SNAP.dividends() // 1 Month (default).
dividends.ytd = await SNAP.dividends('ytd') // Year-To-Date.
dividends.twoYear = await GOOG.dividends('2y') // 2 Year.
Earnings
const earnings = await GOOG.earnings()
Earnings Today
const today_earnings = await SNAP.today_earnings()
Effective Spread
const effective_spread = await SNAP.effective_spread()
Financials
const financials = {}
financials.quarter = await AAPL.financials()
financials.annual = await AAPL.financials({period: 'annual'})
Historical Prices
const historical = {}
historical.default = await AAPL.historical() // 1 Month (default).
historical.dynamic = await GOOG.historical('dynamic') // Dynamic
historical.fiveYear = await GOOG.historical('5y') // 5 year.
historical.specific = await SNAP.historical('20180730') // Specific Date.
Key Stats
const stats = await AAPL.stats()
Largest Trades
const largest_trades = await AAPL.largest_trades()
Logo
const logo = await SNAP.logo()
News
const news = {}
news.last_1 = await SNAP.news() // Last Article.
news.last_10 = await SNAP.news(10) // Last 10 Articles.
OHLC
const ohlc = await AAPL.ohlc()
Peers
const peers = await SNAP.peers()
Previous
const previous = await AAPL.previous()
Price
const price = await GOOG.price()
Quote
const quote = {}
quote.default = SNAP.quote()
quote.percent = SNAP.quote({displayPercent: true}) // Display Percent.
Relevant
const relevant = await AAPL.relevant()
Splits
const splits = {}
splits.default = await AAPL.splits() // 1 Month (default).
splits.fiveYear = await AAPL.splits('5y') // 5 Year.
Time Series
const time_series = {}
time_series.default = await GOOG.time_series() // 1 Month (default).
time_series.ytd = await GOOG.time_series('ytd') // Year-To-Date.
Volume By Venue
const volume_by_venue = await AAPL.volume_by_venue()
Market Queries
Market
const market = IEX.market || IEX.stock()
Collections
const collections = {}
collections.computer_hardware = await market.collection('tag', 'Computer%20Hardware')
collections.health_care = await market.collection('sector', 'Health%20Care')
Crypto
const crypto = await market.crypto()
IPO Calendar
const IPOs = {}
IPOs.upcoming = await market.ipos('upcoming')
IPOs.today = await market.ipos('today')
List
const list = {}
list.gainers = await market.list('gainers') // Gainers.
list.iex_volume = await market.list('iexvolume') // IEX Volume.
list.iex_percent = await market.list('iexpercent') // IEX Percent.
list.in_focus = await market.list('infocus') // In Focus.
list.losers = await market.list('losers') // Losers.
list.most_active = await market.list('mostactive') // Most Active.
Sector Performance
const sector_performance = await market.sector_performance()
Short Interest
const short_interest = {}
short_interest.recent = await market.short_interest()
short_interest.specific = await market.short_interest('20171210')
Threshold Securities
const threshold_securities = {}
threshold_securities.recent = await market.threshold_securities()
threshold_securities.specific = await market.threshold_securities('20171210')
Reference Queries
Reference
const reference = IEX.reference
Corporate Actions
const corporate_actions = {}
corporate_actions.recent = await reference.corporate_actions() // Recent (default).
corporate_actions.specific = await reference.corporate_actions('20171210') // Specific Date.
Dividends
const dividends = {}
dividends.recent = await reference.dividends()
dividends.specific = await reference.dividends('20171210')
Next Day Ex Date
const next_day_e x_date = {}
next_day_ex_date.recent = await reference.next_day_ex_date() // Recent (default).
next_day_ex_date.recent = await reference.next_day_ex_date('20171210') // Specific Date.
Symbols
const symbols = {}
symbols.json = await ref.symbols() // JSON Format.
symbols.csv = await ref.symbols({format: 'csv'}) // CSV Format.
Symbols Directory
const symbol_directory = {}
symbol_directory.recent = await reference.symbol_directory() // Recent (default).
symbol_directory.specific = await reference.symbol_directory('20171210') // Specific Date.