Tick History

R. Todd Gafford -

This sample demonstrates methods for requesting and processing tick or minute bars. Please see the History sample for daily or greater interval bars. There is a link to download the sample at the end of this article.

Before you run the sample, you need to have the following:

  • Java Runtime Environment (JRE) 1.6 or higher
  • A current ICE Data Services client account. If you do not yet have an account, click here to find out about setting up a trial.

To run the sample executable jar from a command line, go to the folder in which you unzipped the sample (see attachment below) and enter the following command:

Windows
>java -jar TickHistorySample.jar [-h <host>] -u <username> -p <password> 
[-b <beginDate> -e <endDate> -i <interval> -s <symbols>]
[-o <options>]
Linux
$export LD_LIBRARY_PATH=./bin
$java -jar TickHistorySample.jar [-h <host>] -u <username> -p <password> 
[-b <beginDate> -e <endDate> -i <interval> -s <symbols>]
[-o <options>]

where:

Argument Value Description
-h <host> is the address to use to connect to the ICE Data Services Consolidated Feed Network.
-u <username> is the username for your client (required field)
-p <password> is the password for your client (required field)
-b <beginDate> is the start date for the record set.  Date format is "YYYY/mm/dd hh:mm:ss"
-e <endDate> is the end date for the record set.  Date format is "YYYY/mm/dd hh:mm:ss"
-i <interval> Specifies the interval for the request. Takes an int where:
   0 = Tick
Greater than 0 = minute intervals (e.g. 1 = 1-minute bars, 5 = 5-minute bars, etc.)
-s <symbols> is the symbol, or symbols, to use for making the historical request. A single instrument may be entered, or a comma separated list of symbols. Symbols that include a space must be enclosed in quotes.
Multiple symbols must be separated by commas with no spaces. If one of the symbols contains a space, the entire list must be enclosed in quotes.
   -s ICE,GE,WFM
-s "ICE,CL #F,WFM"
-o <options> is one or more options supported by this sample.  For a complete list of options, run the sample without a username or password. This will display the online help for the sample and provide a list of available options.

Note:  <username> and <password> must be entered at the command line, but the other arguments are optional. If you do not provide a value for an argument the sample will use a default value.