Barchart Market Data Solutions » Web Services » Historical Data
Event Queries
Event Queries return the date range available in the end of day database for a comma delimited list of symbols.
Contact Us
Historical Data
- Overview
- Tick Queries
- Minute Queries
- Minute Date Range Queries
- Nearby Minute Queries
- Form T Minute Queries
- End of Day (EOD) Queries
- End of Day Date Range Queries
- Event Queries
Instrument Definitions
Event Queries
Event queries return the stock related events for a comma delimited list of symbols. Three parameters are always required: username, password, and symbols.
The results consist of four-field records (i.e. SYMBOL,DATE,EVENT_TYPE,VALUE). Symbols that do not exist in the system are simply ignored and no corresponding record is returned. Optionally, start and end dates can be specified to filter events by date (all records are returned by default if no dates are specified). Also, the type of events to return can be specified setting the parameters splits, dividends, and earnings to true. If no event types are specified, all event types are returned by default. The request handler for event queries is queryevents.ashx
Event Query Parameters
The following parameters are either required or supported in event queries (required parameters are marked with an asterisk):
username*: this parameter should be set to the user name provided by ddfplus to the user account.
password*: this parameter should be set to the password provided by ddfplus for the user name passed in parameter username.
symbols*: this parameter should be set to a comma delimited list of symbols for which the query should return data.
start: this parameter should be set to the desired start date for the query (the result set will include records back to, and including, this value). If not set, the value will default to the beginning of available data. The value should conform to the format yyyymmdd.
end: this parameter should be set to the desired end date for the query (the result set will include records up to, and including, this value). If not set, the value will default to the end of available data. The value should conform to the format yyyymmdd.
splits: this parameter should be set to 'true' if splits are to be included in the result set.
dividends: this parameter should be set to 'true' if dividends are to be included in the result set.
earnings: this parameter should be set to 'true' if earnings are to be included in the result set.
Note: the above three parameters (splits, dividends and earnings) can be set to true in any combination. If none of the three is specified, the default is to return all available events.
Event Query Results Format
Results are returned by event queries in comma delimited text format, one symbol event record per line, as follows:
SYMBOL,YYYY-MM-DD,EVENT_TYPE,VALUE
Example:
IBM,1999-04-21,Earnings,1.55
IBM,1999-05-27,Split,2-1
IBM,2001-05-08,Dividend,0.14
Event Query Examples
In order to query all events available in the system for both IBM and AAPL, execute:
http://ds01.ddfplus.com/historical/queryevents.ashx?username=username&password=password&symbols=IBM,AAPL
In order to query all splits available in the system for both IBM and AAPL between 1995 and 2005, execute:
http://ds01.ddfplus.com/historical/queryevents.ashx?username=username&password=password&symbols=IBM,AAPL&splits=true&start=19950101&end=20051231