Morningstar Quotes Feed Adapter Sample

This sample demonstrates the use of the TIBCO StreamBase® Adapter for Morningstar Quotes Feed with Interactive feeds in one sample application and Broadcast feeds in another. See Morningstar Quotes Feed Input Adapter for details on the use and structure of this adapter.

For simplicity, the Interactive sample focuses on one security type. The sample is oriented to FOREX, and therefore has FOREX specific fields defined in the QuoteSchema. The principles around configuration, field naming, and such are the same for all security types. If you are interested in security types other than FOREX, you must configure different or additional fields in the data schemas. Similarly, the Broadcast sample is oriented to equities, so the schemas are defined for this security type.

The file MSFieldDictionary.csv is provided in this sample to show what a field dictionary looks like in general, and to show the default field ID to name mapping used by the Morningstar Quotes Feed adapter. The field dictionary has a complete list of field IDs, not just fields of interest to FOREX or equities. The file MSFieldDictionary.csv is not used in the sample application, but you could use it by configuring the Field Dictionary property.

Note

To run this sample, you must have access to a Morningstar Quotes server, and must configure the adapter icon in the sample with your server's address and port number, and with your Morningstar user name and password.

Importing This Sample into StreamBase Studio

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

  • From the top-level menu, click File>Import Samples and Community Content.

  • Enter morning to narrow the list of options.

  • Select Morningstar Quote Feed adapter from the StreamBase Market Data Adapters category.

  • Click Import Now.

StreamBase Studio creates a new project for the sample.

Running This Sample in StreamBase Studio

To run the Interactive feed sample:

  1. In the Project Explorer view, open the sample you just loaded.

    If you see red marks on a project folder, wait a moment for the project to load its features.

    If the red marks do not resolve themselves after a minute, select the project, right-click, and select Maven>Update Project from the context menu.

  2. Open the src/main/eventflow/packageName folder.

  3. Double-click to open the morningstar-interactive.sbapp application.

  4. Select the Morningstar Quotes Feed adapter and select the Adapter Properties tab. Fill in the required information with your user name and password, and the server address and port.

  5. Make sure the application is the currently active tab in the EventFlow Editor, then click the Run button. This opens the Test/Debug perspective and starts the module.

  6. Look for Admin messages every 10 seconds. These are keepalive messages sent by the Quote server.

  7. This sample ships with Interactive feed type selected, so you have to send a SymbolRequest command to see data flow. Select the Feed Simulations tab, select the initialize-interactive.sbfs feed simulation, and click Run. This subscribes to a foreign exchange symbol.

  8. When done , press F9 or click the Terminate EventFlow Fragment button.

To run the Broadcast feed sample:

  1. Continuing in the same sample project, double-click to open the morningstar-broadcast.sbapp application. Make sure the application is the currently active tab in the EventFlow Editor.

  2. Select the Morningstar Quotes Feed adapter and select the Adapter Properties tab. Fill in the required information with your user name and password, and the server address and port.

  3. Click the Run button. This opens the Test/Debug perspective and starts the module.

  4. Since a Broadcast feed defaults to immediately sending all data you are entitled to see, look for data flowing in the Output Streams tab.

  5. You can send the Morningstar Broadcast server a message to only send data for select markets. Select the Feed Simulations tab, select the initialize-broadcast.sbfs feed simulation, and click Run. You may need to edit the commands-broadcast.csv, depending on what markets you are entitled to see.

  6. When done , press F9 or click the Terminate EventFlow Fragment 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_morningstar

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