This sample demonstrates methods for requesting and processing Daily bars, or other intervals greater than a single day, such as Weekly or Monthly. Please see the Tick History sample for tick or minute 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 from a command line, go to the folder in which you unzipped the sample (see attachment below) and enter the following command:
> java -jar DWMHistory.jar [-h <host>] -u <username> -p <password>
[-b <beginDate> -e <endDate> -i <interval> -s <symbols>]
$ export LD_LIBRARY_PATH=./bin $ java -jar DWMHistory.jar [-h <host>] -u <username> -p <password>
[-b <beginDate> -e <endDate> -i <interval> -s <symbols>
|-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. <yyyy/mm/dd>|
|-e||<endDate>||is the end date for the record set. <yyyy/mm/dd>|
|-i||<interval>||is the interval for the request. Valid intervals include:
|-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.
|-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.|
<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.