Welcome to org.otfeed project home.

What is it?

org.otfeed is a software to access financial data feed services of Opentick Corporation .

Disclaimer: This software is not endorsed by Opentick Corporation. Author of this software is not affiliated with Opentick Corporation.

Opentick Corporation provides access to the financial data, including real-time feeds, and historical quotes. They provide client API libraries for many languages, including .NET, COM, CPP, and Java.

This project includes an alternative Java client API. The reason for forking the client code are:

  • Code currency. org.otfeed is meant to be up-to-date, providing all features that Opentick's .NET client does.
  • Structured API. org.otfeed API is built around interfaces, making it easier to stub and mock code for prototyping and testing.
  • Event-driven, asynchronous API. org.otfeed API is asynchronous, for scalability and performance.

Who is using org.otfeed?

Following projects use org.otfeed :


Following packages constitute the org.otfeed project:

  • The Driver. Java client library, providing API to access Opentick services. This API is functionally complete, and supports full set of features provided by Opentick services. However, API calls are not compatible with the ones provided by Opentick Corporation. Therefore, org.otfeed can not be used as a drop-in replacement of the Opentick Driver.
  • Samples. A set of simple Java applications that demonstrate how to use org.otfeed API calls.
  • Scripting Engine. A command-line application allowing to script requests to Opentick services in Groovy language.


If you have problems using org.otfeed or think you discovered a bug, go to the forums. You can reach forum page from Sourceforge's front page for this project:

You may also want to subscribe to the forums in order to get notifications of new releases.


  • To use the software you need Java run-time , release 1.5 or newer.
  • To compile driver and application from sources, you will need Java SDK (release 1.5 or later) and Maven2 .
  • To get sources from sourceforge's SVN repository, you will need subversion client.

Maturity level

Currently, code maturity is at BETA stage: all functionality is in place, no major API changes are expected. Testing and bug fixes have to be completed.

We are proud to announce the first stable release, 0.1.0 (9/16/2007).

Compiling from sources

Get the latest source tree from the SVN repository:

$ svn co https://otfeed.svn.sourceforge.net/svnroot/otfeed/trunk/otfeed-all
Alternatively, you can download source release from project's file release page and unpack it in the current directory.

This will create a folder in your current directory with the following structure:


Change current directory to otfeed-all and build all artifacts:

$ cd otfeed-all
$ mvn -Dmaven.test.skip=true install
This will compile, package, and install all artifacts in the Maven's local repository. We skip tests, because unit tests depend on configuring Maven profile, which is outside of the scope of this document.

To assemble scripting application, do this:

$ cd otfeed-all/otfeed-script
$ mvn assembly:directory

To generate javadoc documentation for driver package, do:

$ cd otfeed-all/otfeed-driver
$ mvn javadoc:javadoc

Getting binary distribution

Compiled project artifacts can be downloaded from the project's file release page .

Currently, we release the following binary packages:

  • otfeed-driver-X.X.X.jar : client driver.
  • otfeed-driver-X.X.X-javadoc.zip : archived javadoc documentation for the client driver.
  • otfeed-script-X.X.X-bin.zip : binary distribution of the Scripting Engine.
  • otfeed-all-X.X.X-sources.zip : all sources.

Using org.otfeed Driver

To use the driver, you will need driver's JAR file, and API docs. Both are available at the project's file release page : look for the files named otfeed-driver-X.X.X.jar and otfeed-driver-X.X.X-javadoc.zip.

Online Javadoc API can be found there . We recommend downloading and reading sample application sources from project's file release page (look for otfeed-all-X.X.X-sources.zip), or directly from the subversion repository:

svn co https://otfeed.svn.sourceforge.net/svnroot/otfeed/trunk/otfeed-all/otfeed-samples

Using org.otfeed Scripting Engine

Scripting engine allows one to issue arbitrary requests to the Opentick server, using a simple script written in Groovy. If you are new to Groovy, you may need to check Groovy project home . However, most people find Groovy syntax intuitive enough to start coding right away.

Following is a simple script, that requests historical quotes:

import org.otfeed.*;
import org.otfeed.event.*;
import org.otfeed.command.*;
import org.otfeed.support.*;

// command-line parameters are in the pre-defined variable called "args".
println("script called with parameters: $args");
// create Connection factory
def cf = new OTConnectionFactory(
	username: args[0],
	password: args[1],

	hosts: [
        	new OTHost("feed1.opentick.com", 10010)
	//        , new OTHost("feed2.opentick.com", 10010)
// helper: convenient date input
def dateParser = new DateFormat("MM/dd/yyyy");

// handles incoming data: just print it out (make date look nice too)
def dataHandler = {
	def t = dateParser.format(it.timestamp);
	println("$t, $it.openPrice, $it.highPrice, $it.lowPrice, $it.closePrice"); 
// prepare a command.
def command = new HistDataCommand(
	exchangeCode:      "Q",
	symbolCode:        "GOOG",
	startDate:          dateParser.parse("1/1/2006"),
	endDate:            dateParser.parse("5/5/2006"),
	aggregationSpan:    AggregationSpan.days(), 
	dataDelegate:       dataHandler as IDataDelegate

// connect (connection specs set on the factory, so pass null as first param)
def connection = cf.connect(null, new SimpleConnectionStateListener());

// prepare and submit request. Wait for request completion.
def r = connection.prepareRequest(command);
if(r.error != null) {
	println "ERROR: $r.error"

// disconnect

To use the Scripting Engine you have to either build it from sources, or download binary distribution from the project's file release page : look for the archive named otfeed-script-X.X.X-bin.zip.

Note that Java run-time version 1.5 or later must be installed and available on the command search path.

Unpacked scripting archive has the following structure:


To run the scripting engine, change current directory to otfeed-script-X.X.X-bin and fire the engine:

$ cd otfeed-script-X.X.X-bin
$ java -jar lib/otfeed-script-X.X.X.jar samples/exa01.groovy username password
This will run groovy script named samples/exa01.groovy .

Examine the content of samples/ directory for the sample scripts. Use them as a template to write your own requests to the Opentick server.

To do

  • Finalize the API (review packaging, check class naming, typesafe flags, compare with the latest Opentick's .NET client)
  • Mock Connection Factory for testing.
  • Review Javadocs.
  • Create user guide docs (wiki or neutral format, like txt2tags).
  • Better binary distribution of the Scripting Engine (shell scripts to wrap cumbersome java command line, Win installer).
  • Testing Testing Testing