Query Financial Data#

Here is the easiest way to get started querying IEX Cloud Data.

Prerequisite

Free Trial or IEX Cloud account. Create one here.

Step 1: Go to the API Reference#

Go to the IEX Cloud Data in the API Reference. 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.

Reference pages include the following items:

  • Description: Details the kind of data the endpoint provides.

  • Methods: The endpoint’s paths and operations.

  • Example HTTP Requests: URLs that demonstrate using the endpoint’s methods.

  • Path Parameters: Parameters to use in the endpoint path.

  • Query Parameters: Parameters to specify additional filters or flags.

  • Response Attributes: Describes the fields returned in the response.

  • Attribution Requirements: Verbiage you must publish crediting IEX Cloud the endpoint data provider.

  • Data Bundle: Procurable package that authorizes access to the endpoint.

  • Workspace ID: core–the namespace for all financial data endpoints.

  • Dataset ID: Endpoint identifier.

  • Data Timing: New data frequency at its source.

  • Update Schedule: Regular times IEX Cloud publishes new data for the endpoint.

  • Additional Resources: Links to documents and media to learn more about the endpoint and related topics.

Examine the endpoint reference page content to learn about the endpoint.

Step 3: Try an Example Request#

Apply an API Token to your API Reference 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 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 index

  • subkey (not in all endpoints) denotes a secondary index

  • date 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 Data!

What’s Next#

Data Bundles describes our data offering. The data bundle pages summarize each endpoint and link directly to each endpoint reference page.

Query Financial Time Series Data demonstrates querying time series data.

Batch Data Queries demonstrates batching data queries in a single call.

Stream Financial Data describes streaming stock quotes and more, using SSE and Firehose endpoints available with specific IEX Cloud plans.