npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

investors-exchange.api

v0.1.17

Published

Unofficial Browser / NodeJS API for https://iextrading.com

Downloads

74

Readme

Investors-Exchange.API

An unaffiliated JavaScript / TypeScript 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 * as 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.