IEX Adapter Samples

About the Samples

These samples, using the Spotfire Streaming Adapter for IEX, demonstrate how to connect to the IEX stock exchange.

Legal

The Spotfire Streaming Adapters provide compatibility with third party APIs and/or data streams. Please be aware that calls or access to such third party sources are often governed by separate terms and conditions provided by the third party. In this case, the Spotfire Streaming Adapter for IEX utilizes the APIs provided by IEX. If you are using this API to access IEX API data, your use of the IEX API data is subject to the IEX Terms of Use and the IEX attribution requirements.

Preparation Before Running the Samples

Before using the IEX adapter samples, you must have an account with IEXCloud: https://iexcloud.io/cloud-login#/register.

In the Operator Properties tab, supply your:

  • Publishable token

  • Secret token

  • API version

Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

  • From the top menu, select File>Import Samples and Community Content.

  • Enter IEX to narrow the list of options.

  • Select IEX input adapters from the StreamBase Market Data Adapters category.

  • Click Import Now.

StreamBase Studio creates a single project containing the sample files.

Running the Alternative Data Sample

In the Project Explorer view, double-click to open AlternativeData.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

  1. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  2. In the Manual Input view, select the Control input stream. The Command field can be use to input requests for reference data such as CryptoQuote, CryptoPrice, CryptoBook, or Sentiment. Please reference the full adapter documentation for a list of all commands and parameters.

    Enter CryptoQuote into the Command field.

    Enter aapl into the Symbol field.

  3. Click the Send Data button to send a tuple into the system.

  4. In the Output Streams view, look for the data tuples for the selected operation.

  5. When done, press F9 or click the Stop Running Application button.

Running the Reference Data Sample

In the Project Explorer view, double-click to open ReferenceData.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

  1. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  2. In the Manual Input view, select the Control input stream. The Command field can be use to input requests for reference data such as Symbols, IEXDividends, or IEXSymbolDirectory. Please reference the full adapter documentation for a list of all commands and parameters.

    Enter Symbols into the Command field.

  3. Click the Send Data button to send a tuple into the system.

  4. In the Output Streams view, look for the data tuples for the selected operation.

  5. When done, press F9 or click the Stop Running Application button.

Running the Snapshot Market Data Sample

In the Project Explorer view, double-click to open SnapshotMarketData.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

  1. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  2. In the Manual Input view, select the Control input stream. The Command field can be use to input requests for reference data such as TOPS, Hist, or Book. Please reference the full adapter documentation for a list of all commands and parameters.

    Enter Hist into the Command field.

  3. Click the Send Data button to send a tuple into the system.

  4. In the Output Streams view, look for the data tuples for the selected operation.

  5. When done, press F9 or click the Stop Running Application button.

Running the Stocks Sample

In the Project Explorer view, double-click to open Stocks.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

  1. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  2. In the Manual Input view, select the Control input stream. The Command field can be use to input requests for reference data such as News, Dividends, or Earnings. Please reference the full adapter documentation for a list of all commands and parameters.

    Enter News into the Command field.

  3. Click the Send Data button to send a tuple into the system.

  4. In the Output Streams view, look for the data tuples for the selected operation.

  5. When done, press F9 or click the Stop Running Application button.

Running the Streaming Market Data Data Sample

In the Project Explorer view, double-click to open StreamingMarketData.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

  1. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  2. In the Manual Input view, select the Control input stream. The Command field and Type field can be use to send subscribe or unsubscribe requests for streaming data such as TOPS, Last, or Books. Please reference the full adapter documentation for a list of all commands and parameters.

    Enter subscribe into the Command field and TOPs into the Type field.

  3. Click the Send Data button to send a tuple into the system.

  4. In the Output Streams view, look for the data tuples for the selected operation.

  5. When done, press F9 or click the Stop Running Application button.

Sample Location

When you load the sample into StreamBase® Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.

Important

Load this sample in StreamBase® Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.

Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:

studio-workspace/sample_adapter_embedded_iex

See Default Installation Directories for the default location of studio-workspace on your system.