Investors Exchange (IEX) Trading

FREE
By eec19846
Updated 4 months ago
Finance
9.8/10
Popularity Score
587ms
Latency
57%
Success Rate

Investors Exchange (IEX) Trading API Documentation

The IEX API is a is a free, web-based API supplying IEX quoting and trading data.

View API Details
Stocks
GETEffective Spread
GETIEX Short Interest List
GETIEX Regulation SHO Threshold Securities List
GETTime Series
GETOHLC
GETBook
GETEffective Spread

Returns an array of effective spread, eligible volume, and price improvement of a stock, by market.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
symbolSTRING
REQUIRED
Code Snippet
unirest.get("https://investors-exchange-iex-trading.p.rapidapi.com/stock/msft/effective-spread")
.header("X-RapidAPI-Host", "investors-exchange-iex-trading.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://investors-exchange-iex-trading.p.rapidapi.com/stock/{symbol}/effective-spread
Request Method: GET
Response Headers
"access-control-allow-credentials": "true"
"access-control-allow-headers": "Origin, X-Requested-With, Content-Type, Accept"
"access-control-allow-methods": "GET, OPTIONS"
"access-control-allow-origin": "*"
"content-security-policy": "default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self' 'unsafe-inline'; font-src data:; frame-src 'self'; connect-src 'self' https://auth.iextrading.com https://api.iextrading.com https://api.iextrading.com wss://iextrading.com wss://tops.iextrading.com wss://api.iextrading.com wss://iextrading.com https://iextrading.com/member-center; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google-analytics.com/analytics.js;"
"content-type": "application/json; charset=utf-8"
"date": "Mon, 03 Jun 2019 23:39:55 GMT"
"frame-options": "SAMEORIGIN"
"server": "RapidAPI-1.0.16"
"set-cookie": "ctoken=8cfb19c50a5c43958768ca96ed9f1d3b; Domain=.iextrading.com; Path=/; Expires=Tue, 04 Jun 2019 11:39:55 GMT; Secure"
"strict-transport-security": "max-age=15768000"
"x-content-security-policy": "default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self' 'unsafe-inline'; font-src data:; frame-src 'self'; connect-src 'self' https://auth.iextrading.com https://api.iextrading.com https://api.iextrading.com wss://iextrading.com wss://tops.iextrading.com wss://api.iextrading.com wss://iextrading.com https://iextrading.com/member-center; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google-analytics.com/analytics.js;"
"x-content-type-options": "nosniff"
"x-frame-options": "SAMEORIGIN"
"x-rapidapi-region": "AWS - us-east-1"
"x-rapidapi-version": "1.0.16"
"content-length": "1994"
"connection": "Close"
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://investors-exchange-iex-trading.p.rapidapi.com/stock/msft/effective-spread")
.header("X-RapidAPI-Host", "investors-exchange-iex-trading.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication