Option Months

R. Todd Gafford -

This executable sample demonstrates methods for requesting and processing available months for options contracts. There is a link to download the sample at the end of this article.

Before you run this sample, you need to have a current Interactive Data 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:

Windows
> OptionMonthSample.exe[-h <host>] -u <username> -p <password> [-s <symbol> -t <type>]
Linux
$ export LD_LIBRARY_PATH=./
$ chmod a+x OptionMonthSample
$ ./OptionMonthSample [-h <host>] -u <username> -p <password> [-s <symbol> -t <type>]

where:

Argument Value Description
-h <host> is the address to use to connect to the Interactive Data Consolidated Feed Network.
-u <username> is the username for your client (required field)
-p <password> is the password for your client (required field)
-s <symbols> is a comma separated list of symbols for which to make a Option Month/Year request. Multiple symbols must be enclosed in quotes with no spaces between symbols. For example: IBM,GE,WFM
-t <type> specifies on of the following request types:

STOCK_OPTIONS - indicates the request is for a stock options chain
FUTURE_OPTIONS - indicates the request is for a futures options chain
FUTURE_CHAIN - indicates the request is for a future chain

Note: If you do not enter a values for the sample arguments, default values will be used.

<username> and <password> must be entered at the command line.