Historical Data Page Query Specification Fields

Parameter

Description

End Date/Time

Use the format yyyymmdd {space}hh:mm:ss{space}tmz where the time zone is allowed (optionally)after a space at the end.

Duration

This is the time span the request will cover, and is specified using the format integer {space} unit, where valid units are:

·          S (seconds)

·          D (days)

·          W (weeks)

·          Y (years)

This unit is currently limited to one. If no unit is specified, seconds are used.

Bar Size

Specifies the size of the bars that will be returned. The following bar sizes may be used, and are specified using the parametric value:

Bar Size String   Integer Value

1 second   1

5 seconds   2

15 seconds   3

30 seconds   4

1 minutes   5

2 minutes   6

3 minutes   16

5 minutes   7

15 minutes   8

30 minutes   9

1 hour   10

1 day   11

On the query return page, each "bar" is represented by a line in the spreadsheet. If you specify a duration of 300 seconds, and a bar size of "1" (one second) your return will include 300 lines, and the value in each line is equal to one second, or is a one-second bar. Note that you can use either the Integer value of the Bar Size String or the Integer Value to define the bar sizes.

What to Show

Determines the nature of the data extracted. Valid values include:

·          Trades

·          Midpoint

·          Bid

·          Ask

·          Bid/Ask

All but the Bid/Ask data contain the start time, open, high, low, close, volume and weighted average price during the time slice queried.

For the Bid/Ask query, the open and close values are the time-weighted average bid and the time-weighted average offer, respectively. These bars are identical to the TWS charts' candlestick bars.

RTH Only

Regular Trading Hours only. Valid values include:

·          0 - all data available during the time span requested is returned, including time intervals when the market in question was outside of regular trading hours.

·          1 - only data within the regular trading hours for the product requested is returned, even if the time span falls partially or completely outside.

Date Format Style

Valid values include:

·          1 - dates that apply to bars are returned in the format yyyymmdd{space}{space}hh:mm:dd (the same format used when reporting executions).

·          2 - the dates are returned as an integer specifying the number of seconds since 1/1/1970 GMT.

Page Name

The name of the results page. This appears in the tab for the results page at the bottom of the worksheet.

Activate page

Enter TRUE to display the results page on top of the current window. Enter FALSE to display the results on a new page in the spreadsheet without appearing on top of the current window.

Note that the new page is added to the right of the existing tabs on the worksheet.