This executable sample demonstrates the methods for requesting and processing snapshot or streaming Level 1 data. 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 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:
Windows
> Level1QuoteRequest.exe[-h <host>] -u <username> -p <password> [-m <mode> -s <symbol>]
Linux
$ export LD_LIBRARY_PATH=./ $ chmod a+x Level1QuoteRequest $ ./Level1QuoteRequest [-h <host>] -u <username> -p <password> [-m <mode> -s <symbol> -csv <nodisp>]
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) |
-m | <mode> | Indicates if the request is for snapshot or streaming data. Acceptable values include: snapshot or subscribe |
-s | <symbols> | The symbol, or symbols, to use for making the Market Depth 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: This sample also supports the following "special" instruments for requesting user entitlements:
|
-csv | <nodisp> | When this option is set the application will format the output to be suitable for a comma-separated value (CSV) file. When this option is not set, the application will format the output for display within the console window. To use this option you must also provide output file instructions. For example:
When you provide output instructions, no information will display on the console window. All output will be written to the file you specify. |
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.