I haven’t been able to find a step-by-step guide that describes how to make a custom data feed for Marketcetera, so here I describe how I managed to do it. The procedure is partly based on information that I have found in forum posts and blog posts (see references at the bottom), and partly based on my own experiences. I also received a lot of help from the Marketcetera forum (especially Colin), and I can highly recommend using the forum if you run into trouble.
I used the existing Marketcetera data feed as the basis for my implementation, because I wanted to be able to connect to my own FIX server, and the Marketcetera data feed already implements a lot of the functionality I needed. If you don’t need to connect to a server but, e.g., just want to load a file with tick data, you can use the Bogus feed as the basis for your implementation.
I have done all development using Eclipse.
1. Follow the Marketceterea build instructions
(I skipped the tests during installation due to failures in some of the tests)
2. Go throught the Building Photon guide for Marketcetera (this will tell you how to build and run Marketcetera in Eclipse)
Note: It usually has to build 2 times before all build errors are gone. After the first autobuild go to (in Eclipse) Project -> Clean… and select Clean All. This will rebuild the entire solution, and should resolve all build errors.
3. Make sure that you can build and run both ORS and Photon from Eclipse.
4. Copy/paste the marketdata-marketcetera project (or the marketdata-bogus project) and give it a name of your choice e.g. marketdata-
5. Rename all the files in your project to <myFeed>…java
6. Open the MANIFEST.MF in the META-INF folder and change the ID to “org.marketcetera.modules.mdata.<myFeed>”, the Name to “<my> Marketdata Module” and the Provider to <myProvider> (or whatever you find appropriate).
7. Open the pom.xml file and change the ArtifactId to “marketdata-<myFeed>” and Name to “<myFeed> Marketdata Module”.
8. Change the IDENTIFIER field in the bottom of the FeedModuleFactory file to “<myFeed>”.
9. Expand the project org.marketcetera.photon.feature and open the feature.xml and select the Plug-ins tab.
7. In Plug-ins and Fragments add your data feed project (org.marketcetera.modules.mdata.<myFeed>).
8. In order to make the adapter available in Photon you need to modify the Eclipse Run Configuration.
In Eclipse go to Run -> Run Configurations and select Photon. Then select the Plug-ins tab and make sure your new plugin is checked.
9. Open Command Prompt (Windows) and change directory to your data feed project.
10. Run the command “mvn -DskipTests=true install”. This will build the project and generate the necessary .jar file (and skip all tests, note that you should be able to run all tests to make sure everything works as it should).
9. Rebuild the workspace and run ORS and Photon again. You should now be able to select your data feed in Photon under Edit -> Preferences -> Market Data. You should also be able to configure it by expanding Market Data and select <myFeed>.
Note that the FIX configuration file is located in your project under src/main/resources, and is called fixdatafeed.properties. Use this for your specific FIX configurations.
You have to go through each of the files to look for error and log messages that incorporate the name of the datafeed and change it to .
The primary methods that I needed to change was toEvent(Object inData, String inHandle) in the EventTranslator.java class and is responsible for parsing FIX messages into Marketcetera events, and fireMarketDataMessage(Message refresh) in <myFeed>.java.
I hope this is useable.