IEX - Account Set Up

  1. Install the Stock Analysis Engine

  2. Register for an Account

  3. Set IEX_TOKEN the Environment Variable


IEX - Fetch API Reference

IEX - HTTP Fetch Functions

IEX - Build Auth URL Using Publishable Token

Build an authenticated url for IEX Cloud

analysis_engine.iex.build_auth_url.build_auth_url(url, token=None)[source]

Helper for constructing authenticated IEX urls using an IEX Publishable Token with a valid IEX Cloud Beta Account

This will return a string with the token as a query parameter on the HTTP url

  • url – initial url to make authenticated
  • token – optional - string IEX Publishable Token (defaults to IEX_TOKEN environment variable or None)

IEX - Extraction API Reference

Here is the extraction API for returning a pandas.DataFrame from cached or archived IEX datasets.

IEX API Example - Fetch Minute Intraday Data using HTTP


This will fetch minute data using your IEX Cloud account and can cost money depending on your request usage.

import analysis_engine.iex.fetch_api as fetch
df = fetch.fetch_minute(ticker='SPY')

IEX API Example - Extract Minute Intraday Data from Cache

import datetime
import analysis_engine.iex.extract_df_from_redis as extract
ticker = 'SPY'
today ='%Y-%m-%d')
status, df = extract.extract_minute_dataset({
    'ticker': f'{ticker}',
    'redis_key': f'{ticker}_{today}_minute'})

IEX API Example - Get Minute Data from IEX (calls fetch and cache)


This will fetch and cache minute data using your IEX Cloud account and can cost money depending on your request usage.

import analysis_engine.iex.get_data as get_data
df = get_data.get_data_from_iex({
    'ticker': 'SPY',
    'ft_type': 'minute'})

IEX - Get Data

Use this function to pull data from IEX with a shared API for supported fetch routines over the IEX HTTP Rest API.

Distributed Automation API

This is a helper for the parent method:

Default Fields

Get defaults fields for supported teyps of data

Parameters:field – types of data to get