1.1.5 • Published 5 years ago

@ibble/iexcloud_api_wrapper v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

iexcloud_api_wrapper

CircleCI tested with jest

A Typescript wrapper for the new iexcloud market data API from IEX Group Inc. All data is returned as Promises for asynchronous data requests.

A complementary R package is also availiable.

Usage

  • See USAGE.md file for complete interface definition and call signitures

Use the npm cli to install as a dependancy into your project

npm install --save git+https://git@github.com/schardtbc/iexcloud_api_wrapper

// OR

npm i iexcloud_api_wrapper

then in your .env file add the following keys

IEXCLOUD_API_VERSION = "stable"
IEXCLOUD_PUBLIC_KEY = "pk_..."
IEXCLOUD_SECRET_KEY = "sk_..."

# use the pk and sk obtained from your iexcloud account
# make sure the .env file is in your .gitignore file
# do not hard code the keys into your application code
# do not upload the keys to github.
# you can easily change the keys if they become compromised

To test that everything installed correctly and the .env file is properly setup you can use the following or similar code

// reminder: this is an async interface ...it's promises all the way down

const  iex = require( 'iexcloud_api_wrapper' )

const quote = async (sym) => {
    const quoteData = await iex.quote(sym);
    // do something with returned quote data
    console.log(quoteData)
};

quote("WDC");

//  Quote {
//   symbol: 'WDC',
//   companyName: 'Western Digital Corporation',
//   calculationPrice: 'tops',
//   open: 47.56,
//   openTime: 1550154600850,
//   close: 47.69,
//   closeTime: 1550091600563,
//   high: 48.75,
//   low: 47.43,
//   latestPrice: 47.89,
//   latestSource: 'IEX real time price',
//   latestTime: '11:53:07 AM',
//   latestUpdate: 1550163187646,
//   latestVolume: 2660380,
//   iexRealtimePrice: 47.89,
//   iexRealtimeSize: 1,
//   iexLastUpdated: 1550163187646,
//   delayedPrice: 47.925,
//   delayedPriceTime: 1550162368700,
//   extendedPrice: 47.56,
//   extendedChange: -0.33,
//   extendedChangePercent: -0.00689,
//   extendedPriceTime: 1550189098346,
//   previousClose: 47.69,
//   change: 0.2,
//   changePercent: 0.00419,
//   iexMarketPercent: 0.03971124425833904,
//   iexVolume: 105647,
//   avgTotalVolume: 8340178,
//   iexBidPrice: 47.8,
//   iexBidSize: 100,
//   iexAskPrice: 47.89,
//   iexAskSize: 100,
//   marketCap: 13928854390,
//   week52High: 106.96,
//   week52Low: 33.83,
//   ytdChange: 0.25066151071615267 }

About iexcloud

iexcloud is a product of IEX Group Inc. which operates the Investors Exchange IEX, a stock exhange for US equities which trades > 9B notational value on a daily basis.

Using iexcloud requires registration to obtain a unique api key which is used for all data requests.

A majority of the endpoints are charged a usage free which varies by the source and type of data returned. All IEX Group sourced data is free.

Each endpoint is assigned a cost in terms of message units.

PlanMonthly Message Unit AllotmentMonthy Fee
Free500,000Free
Launch5,000,000$9
Grow100,000,000$59($49 paid annually)
Scale2,000,000,000$ 499

see https://iexcloud.io/pricing/ for current plans, rates

Api reference documentation

https://iexcloud.io/docs/api/#introduction

Attribution to IEX

Attribution is required of all users of iexcloud. Put “Powered by IEX Cloud” somewhere on your site or app, and link that text to https://iexcloud.io. Alternately, the attribution link can be included in your terms of service.

Powered by IEX Cloud

Current Implementation Status

Below is a list of the iexcloud APIs that have (x) and have not ( ) been implemented by this package.

Account

EndpointMessage Unitsper
xMetaData0as in free
xUsage0as in free
xPay as you go0as in free

Stocks

EndpointMessage Unitsper
xBalance Sheet3000per symbol per period
Batch Requestsvarieswith data types requested
xBook1per symbol
xCash Flow1000per symbol per period
xCollections1per symbol in collection
xCompany1per symbol
xDelayed Quote1per symbol
xDividends10per symbol
xEarnings1000per symbol per period
Earnings Today1051per symbol returned
xEffective Spread0as in free
xEstimates10000per symbol per period
xFinancials5000per symbol per period
xHistorical Prices
xEnd of day10per symbol per day
xIncome Statement1000per symbol per period
IPO Calendar upcoming-ipos100per IPO returned
IPO Calendar today-ipos500per iPO returned
xKey Stats20per symbol
Largest Trades1per trade returned
xList1per quote returned
xLogo1per logo
xMarket Volume (U.S.)1per call
xNews10per news item returned
xOHLC2per symbol
xPeers500per symbol
xPrevious Day Prices2 per symbol
xPrice1per symbol per call
xPrice Target500per symbol
xRecommendation Trends1000per symbol
xQuote1per quote
xSector Performance1per sector
xSocial Sentiment, daily100per date
xSocial Sentiment, by minute200per date
xSplits10per symbol per record
xVolume by Venue20per call

Alternative Data

EndpointMessage Unitsper
xNews
Crypto

Reference Data

EndpointMessage Unitsper
xSymbols100per call
xIEX Symbols0as in free
U.S. Exchanges1per call
U.S. Holidays and Trading Days1per call
Stock Tags
Stock Collections
Mutual Fund Symbols100per call
OTC Symbols100per call
Forex / Currency Symbols
Options Symbols
Commodities Symbols
Bonds Symbols
Crypto Symbols

Investors Exchange Data Free

Endpoint
xTOPS
xTOPS Last
DEEP
xDEEP Auction
xDEEP Book
DEEP Operational Halt Status
xDEEP Official Price
DEEP Security Event
DEEP Short Sale Price Tst Status
DEEP System Event
xDEEP Trades
DEEP Trade Break
DEEP Trading Status
Listed Regulation SHO Threshold Securities List
Listed Short Interest List
Stats Historical Daily
Stats Historical Summary
Stats Intraday
Stats Recent
Stats Records

API System Metadata

EndpointMessage Unitsper
Status0

In Development at IEX Group

  • FOREX CURRANCIES
  • OPTIONS
  • COMMODITIES
  • BONDS
  • REALTME, SCALABLE NOTIFICATIONS
  • EVENT DRIVEN AUTOMATED RULES FOR SERVERLESS DATA ANALYSIS