Query IEX Cloud Financial Data#
Here is the easiest way to get started querying IEX Cloud Financial Data.
Prerequisite
IEX Cloud account - Create one here.
Step 1: Go to the API Docs#
Go to the IEX Cloud Data in the API Docs. The endpoint names appear grouped by data bundle in the navigation sidebar.
Note
If the IEX Cloud Data endpoint names aren’t showing in the sidebar, click IEX Cloud Data in the sidebar to expand the endpoint list.
Step 2: Open an Endpoint Page#
Click a data endpoint name to view its reference page. The endpoint page appears.
Endpoint reference pages include the following items:
Description
Methods list
Example HTTP requests (the one used in the HTTP Request/Response section on the right)
Path Parameters
Query Parameters
Response Attributes
Attribution Requirements
Data Bundle
Workspace ID
Dataset ID
Data Timing
Update Schedule
Additional Resources
Step 3: Try an Example Request#
Apply an API Token to your API Docs session if you haven’t already.
Click one of the Example HTTP Request URLs (the image above highlights one). Your browser sends the request and shows the response.
Here’s a request and response for Apple’s latest Historical Equity Prices.
Request:
https://api.iex.cloud/v1/data/core/historical_prices/aapl
Response:
[
{
"close": 147.92,
"fclose": 147.92,
"fhigh": 150.13,
"flow": 147.85,
"fopen": 150.02,
"fvolume": 65187092,
"high": 150.13,
"low": 147.85,
"open": 150.02,
"priceDate": "2021-11-10",
"symbol": "AAPL",
"uclose": 147.92,
"uhigh": 150.13,
"ulow": 147.85,
"uopen": 150.02,
"uvolume": 65187092,
"volume": 65187092,
"id": "HISTORICAL_PRICES",
"key": "AAPL",
"subkey": "",
"date": 1636502400000,
"updated": 1668021550000
}
]
Note
If the request didn’t include your API token, you can get for your API token in the Console.
Step 4: Examine Endpoint Options#
In the endpoint reference page, scroll down to the Path Parameters table. A key
label and subkey
label (not in all endpoints) denotes the dataset’s primary index and secondary index. Most IEX Cloud Data endpoints accept a key
path parameter. Some of the endpoints have a subkey
; the subkey can be used as an additional path parameter, after the key
path parameter.
The Response Attributes table, further down the page, describes the data’s attributes (columns) and also indicates indexes. In addition to key
and subkey
it includes the date
index.
key
denotes the primary indexsubkey
(not in all endpoints) denotes a secondary indexdate
denotes the date index
The image below shows some of the Historical Equity Prices endpoint response attributes.
If a data endpoint has a date
index, it is a time series endpoint and it supports time-windowing–filtering on a specific time or time range.
See also
See the GET /data page for supported range parameters and examples.
Step 5: Refine Your Query#
Experiment with endpoints by entering different values for the key
path parameter. If it’s a time series data endpoint, you can time-window results using on=timestamp
, range=some_range
, or other time range query parameters.
For example, below is a request and response for Apple’s last two months of prices.
Request:
https://api.iex.cloud/v1/data/core/historical_prices/aapl?range=2m
Response:
[
{
"close": 170.29,
"fclose": 170.29,
"fhigh": 171.17,
"flow": 168.87,
"fopen": 169.02,
"fvolume": 51130955,
"high": 171.17,
"low": 168.87,
"open": 169.02,
"priceDate": "2023-10-30",
"symbol": "AAPL",
"uclose": 170.29,
"uhigh": 171.17,
"ulow": 168.87,
"uopen": 169.02,
"uvolume": 51130955,
"volume": 51130955,
"id": "HISTORICAL_PRICES",
"key": "AAPL",
"subkey": "",
"date": 1698624000000,
"updated": 1698714114000
},
{
"close": 168.22,
"fclose": 168.22,
"fhigh": 168.96,
"flow": 166.83,
"fopen": 166.91,
"fvolume": 58499129,
"high": 168.96,
"low": 166.83,
"open": 166.91,
"priceDate": "2023-10-27",
"symbol": "AAPL",
"uclose": 168.22,
"uhigh": 168.96,
"ulow": 166.83,
"uopen": 166.91,
"uvolume": 58499129,
"volume": 58499129,
"id": "HISTORICAL_PRICES",
"key": "AAPL",
"subkey": "",
"date": 1698364800000,
"updated": 1698456638000
}
// ... more prices
]
Congratulations on your start in querying IEX Cloud Financial Data!
What’s Next#
Querying Data in iexjs shows how to query data using the iexjs JavaScript client library.
Batch Data Queries demonstrates batching data queries in a single call.
Data Bundles describes the data categories and their data bundles. The data bundle pages link directly to each API endpoint’s reference page.