USAGE:

   Windows
   -------
      java -cp .;JStandardSamples.jar;lib/* HistoryManager.DWMHistory.Main
                [-h <host> -conn <connectionType>] -u <username> -p <password> 
                [-m <mode> -ver <ver>]
                [-b <beginDate -e <endDate> -i <interval> -s <symbols> ]
                [-o <options> ]
                [-disp <displaySwitch>]
   Linux
   ------
      java -cp .:JStandardSamples.jar:lib/* HistoryManager.DWMHistory.Main
                [-h <host> -conn <connectionType>] -u <username> -p <password> 
                [-m <mode> -ver <ver>]
                [-b <beginDate -e <endDate> -i <interval> -s <symbols> ]
                [-o <options> ]
                [-disp <displaySwitch>]
                
where           

   Arg   Value                  Description
   ---   -----                  -----------
   -h    <host>                 Specifies the address to use to connect to the ICE 
                                Data Services network.  
                                
                                For example: cm*.dataservices.theice.com

   -conn <connectionType>       Specifies the type of connection to use with the ICE Data Services
                                network.  Valid values include:
                                
                                   0 - SOCKTYPE_LEGACY    Uses a non TLS connection.
                                   1 - SOCKTYPE_TLS       Uses a secure/encrypted socket connection.
                                   2 - SOCKTYPE_TLS_PLUS  Not yet implemented; reserved for future support.

   -u    <username>  (required) The username for the account entitled to receive data from 
                                ICE Data Services. If you do not have one, please contact 
                                your ICE Data Services representative.

   -p    <password>  (required) The password for the account entitled to receive data from 
                                ICE Data Services. If you do not have one, please contact 
                                your ICE Data Services representative.

                                                                                                        
   -m    <mode>                 Identifies the type of request to make. The following modes may be      
                                specified:                                                              
                                                                                                        
                                   - history                                                            
                                     Instructs the sample to make a request for interday historical     
                                     data.  Other arguments provided indicate the type of interday      
                                     history to request, such as DAILY bar history.                     
                                                                                                        
                                   - dictionary                                                         
                                     Instructs the sample to make a request that returns the fields     
                                     supported by the Flexible Data feature.  The Interday History      
                                     service will return the most current dictionary fields supported   
                                     by the Flexible Data feature.                                      
                                                                                                        
                                     note:  The dictionary mode may be used with the -ver argument      
                                            to specify the client's version of the dictionary.          
                                            All other sample arguments will be ignored.                 
                                            See -ver <dictID> for more details.    

                                     The "flexible data" features are available for the "desktop                                            
                                     offerings" only.
                                                                                                
   -ver  <ver>                  Indicates the version of the dictionary known to the client.            
                                The Interday History service will return all the fields added or changed 
                                between the version reported by the client and the version known to the 
                                service.                                                                
                                                                                                        
                                If there are no new fields or changes, the service will return an empty 
                                set.                                                                    
                                                                                                        
                                note:  Set the client version to 0 to retrieve a full dictionary update.
                                       For example:                                                     
                                                                                                        
                                       -ver 0                                                           
                                                                                                        
   -b    <beginDate>            is the start date for the request. The form of the date 
                                is yyyy/mm/dd.  For example:
   
                                   2016/1/1
                                   
   -e    <endDate>              is the end date for the request.  The form of the date 
                                is yyyy/mm/dd.  for example:
   
                                   2016/3/31
   
   -i    <interval>             is the bar interval for the request. 
                                Valid intervals include: 
   
                                   DAILY, WEEKLY, MONTHLY, QUARTERLY, FOURMONTHS, 
                                   THREEWEEKS, TWODAYS, YEARLY
                                
   -s    <symbols>              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. For example:

                                    -s "CL #F"

                                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.  Here are two examples:
   
                                    -s  IBM,GE,WFM
 
                                    -s  "IBM,CL #F,WFM"

   -o    <options>              Specifies the options for this request.                                 
                                The Interday History service provides two groups of options:            
                                                                                                        
                                   - Standard Bar Request Options                                       
                                     Options available to requests for standard bar data returned       
                                     as a set of record structures.  Standard bar data is based upon    
                                     trade prices for most instruments.  Standard bar data for FOREX    
                                     instruments is based upon bid prices.                              
                                                                                                        
                                   - Flexible Data Request Options                                      
                                     Options for requesting bar data based upon specific fields of data.
                                     For example, bars based on "ask_price" can be returned:          
                                                                                                        
                                     ASK PRICE: [high:99.8475  low:99.756  open:99.7906  close:99.7776] 
                                                                                                        
                                     The above "bar" provides "standard" fields (OHLC), but the     
                                     values for these fields are based upon the ask price for the       
                                     instrument requested.                                              
                                                                                                        
                                     note:  1. Only fields listed as part of the Flexible Data          
                                               Dictionary are supported.                                
                                                                                                        
                                            2. Flexible Data Request options support TRACE Bonds (-TB),       
                                               NYSE Listed Corporate Bonds (-NB), Municipal Securities 
                                               Rulemaking Board (MSRB) Bonds (-MB), U.S. Energy Information
                                               Administration Data (-DOE), Commodity Futures Trading 
                                               Commission Data (-CFTC), and instruments available to the
                                               Continuously Evaluated Pricing (CEP) feed only. 
                                    
                                            3. The "flexible data" features are available for the "desktop 
                                               offerings" only.                     
                                                                                                        
                                --------------------------------------------------------------------    
                                STANDARD BAR REQUEST OPTIONS:                                           
                                --------------------------------------------------------------------    
                                                                                                        
                      ADJEQPCTCHGPRIORBAR     instructs the Interday History service to provide the     
                                              percentage change from the last bar's close value.        
                                              The percentage change value will be available in the      
                                              adjustments field of the current bar.            
                                              The default setting provides cumulative split
                                              adjustment value in the bar's adjustments field.                                                          
                                                                                                        
                                 BACKADJT *   used for continuous charts in conjunction with
                                              the CONTCHART option. For example, a user 
                                              requests 200 bars to build back adjusted
                                              continuous charts for crude using the symbol
                                              %CL 1!;B.
                                                 
                                              The initial request specifies the CONTCHART 
                                              option and does not specify the BACKADJT 
                                              option.  The data returned includes adjustment
                                              values. The next request for another 200 bars
                                              adds the BACKADJT option with the adjustment 
                                              value provided from the first response.
                                                 
                                              Requests can continue in this fashion until 
                                              the desired time frame is completed. 
   
                                CONTCHART     indicates that the request is for continuous 
                                              charts instruments. Continuous charts are 
                                              available to futures instruments only.
                                   
                                 CURRENCY *   indicates that the pricing should be converted
                                              into a given currency.  For example: GBP
                                              
                                  FORWARD     indicates the order to provide the bars.
                                              When this option is specified the order of
                                              the bars will return oldest first moving
                                              forward to the most current time.
                                
                                  MAXBARS *   indicates the maximum number of bars that may
                                              be sent in a single update.  The range is 1 to
                                              2500. The default is 400.
                                              
                                    NBARS *   used in conjunction with a numeric value to
                                              indicate the number of bars to return starting
                                              with the end date provided and moving backward
                                              through time until the number of bars is
                                              reached.
                                              
                                 NULLBARS     indicates to provide a bar even when there is
                                              no market data available.  For example, 
                                              sparsely traded instruments may not trade for
                                              any given market day.  When this option is set
                                              a bar will still be returned, but it will 
                                              contain the date and bar length only, since
                                              there is no pricing data available. 
                                              The default is to not return a bar on days
                                              with no market activity.
                                              
                                PRICETYPE *   indicates to replace the "CLOSE" price in the
                                              bar with one of the following price types:
                                              
                                                 MID        Mid price type.
                                                 KASSA      Kassa price type.
                                                 VARIABLE   Variable price type.
                                                 
                                              This option is available to contracts from 
                                              London, Frankfurt, and other venues where this
                                              could apply.  The default is to apply no price
                                              type.
                                              
                  REQUESTAGGREGATIONFIELD *   indicates to apply yields on NASDAQ Money 
                                              Funds.  When one of the following yield types 
                                              is set that type will be applied to the data 
                                              returned for the request:
                                                         
                                                 SIMPLEYIELD  Subsidized 7-Day Yield
                                                 7DAYYIELD    Gross 7-Day Yield
                                                 30DAYYIELD   30-Day Yield 
                                
                                  SHIFTOI     indicates to shift the open interest to the
                                              previous day for futures. The default is to 
                                              not perform this shift, but when this option
                                              is specified the sample will shift the volume.
                                              
                                 SHIFTVOL     indicates to shift the volume to the previous
                                              day for futures. The default is to not perform
                                              this shift, but when this option is specified
                                              the sample will shift the volume.
                                              
                                    SPLIT     indicates if the data should be split adjusted
                                              or not. When this option is specified the 
                                              sample assumes the data should not be split
                                              adjusted.  The default is to provide split
                                              adjusted data.
                                              
                                --------------------------------------------------------------------    
                                FLEXIBLE DATA REQUEST OPTIONS:                                          
                                --------------------------------------------------------------------    
                                 important:  The "flexible data" features are available to "desktop 
                                             offerings" only.
                                                                                                         
                                  COLUMNS     identifies which Flexible Data field to use for building  
                                              the bar prices.                                           
                                              Use the DWMHistory sample to request the Flexible Data    
                                              dictionary for the latest listing of supported fields.    
                                                                                                        
                                              note: You may specify one field for each bar data request.
                                                    For example:                                        
                                                                                                        
                                                    COLUMNS=ask_price                                   
                                                                                                        
                                              The COLUMNS option requires the option FLEX=T to be set.  
                                                                                                        
                                     FLEX     instructs the Interday History service that this is a     
                                              Flexible Data request and to provide a Flexible Data      
                                              response. (default is false)                              
                                                                                                        
                                              note: This option must be set when using the COLUMNS
                                                    option, otherwise the Interday History service  
                                                    will return an error.                       
                                                                                                        
                               * For this sample, options marked with an asterisk ( * ) must
                                 be set using the request option key followed by an equal 
                                 sign ( = ) and a value.  For example:
                                 
                                    MAXBARS=2500
                                    
                                 Multiple option-key pairs may be entered when separated by
                                 commas.  For example:
                                 
                                    MAXBARS=2500,CURRENCY=GBP
                               
                                Options not marked with an asterisk have a default value of
                                true or false.  When those options are specified this sample
                                assumes they should not use their default value.                              
                                      
                                                                                                        
   -disp <displaySwitch>        indicates how to format the data received from the Interday History     
                                service.  Valid settings include:                                       
                                                                                                        
                                   ON      the data will be formatted for viewing the output            
                                           on the screen. (default)                                     
                                                                                                        
                                   OFF     the data will be formatted for viewing the output            
                                           as a comma separated value (CSV) file.                       
                                                                                                        
                                note:  When set to OFF, the command line must end with standard         
                                       redirection syntax and a file name.  For example:                
                                                                                                        
                                          -disp OFF >> output.csv                                       
                                                                                                        
Note: If you do not enter a value for <host>, <beginDate>, <endDate>, <interval>, <symbols>,
      or <options> the values listed in the DWMHistorySample.properties file will be used.
      <username> and <password> must be entered at the command line.


