Contents
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.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, click
> . -
Enter
morning
to narrow the list of options. -
Select Morningstar Quote Feed adapter from the StreamBase Market Data Adapters category.
-
Click
.
StreamBase Studio creates a new project for the sample.
To run the Interactive feed sample:
-
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
> from the context menu. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
morningstar-interactive.sbapp
application. -
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.
-
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.
-
Look for Admin messages every 10 seconds. These are keepalive messages sent by the Quote server.
-
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 . This subscribes to a foreign exchange symbol. -
When done , press F9 or click the Terminate EventFlow Fragment button.
To run the Broadcast feed sample:
-
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. -
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.
-
Click the Run button. This opens the Test/Debug perspective and starts the module.
-
Since a Broadcast feed defaults to immediately sending all data you are entitled to see, look for data flowing in the Output Streams tab.
-
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 . You may need to edit thecommands-broadcast.csv
, depending on what markets you are entitled to see. -
When done , press F9 or click the Terminate EventFlow Fragment button.
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.