1 Overview NASDAQ Global Index Watch (GIW) Secure Web Service 2.0 Access NASDAQ OMX is a global leader in creating and licensing indexes and is home to the most widely tracked indexes and exchange traded funds (ETFs) in the world. NASDAQ OMX offers diverse indexes from multiple asset classes (i.e.: equities, bonds, and commodities) including many indexes calculated for third parties. This adds significant value to customers and helps them track market performance. GIW Web Service is available to Premier subscribers only. In order to access this service, users are now required to POST their username and password in the Web Request of the reporting service. NASDAQ OMX calculates and disseminates real-time values for its indices and listed ETFs throughout the trading day. Additionally NASDAQ OMX compiles and distributes the component securities and relative weightings information for index based products via secure access as part of the NASDAQ OMX Global Index Watch service. NASDAQ Global Index Watch (GIW) is an indispensable tool for investment professionals who track NASDAQ OMX indexes or trade NASDAQ OMX index-related derivative instruments. Features include: Advanced Corporate Actions/Index News Index Holdings Daily Summary Statistics Industry Breakdowns Index Methodologies As a premier subscriber to GIW, users can now access the following information from the NASDAQ OMX secure web service: Weighting Data Service Corporate Action Service History Service 2 Web Service Introduction This specification document outlines the file format for the GIW Secure Web Service. The Web Service provides the most recent and archived list of weightings, historical data and corporate actions for covered indexes. Typically the first files are posted to the GIW web service at approximately 2:00 a.m. Eastern Time. To have the most up-to-date information during the trading day, subscribers should continue to process the files periodically. VERSION 1.0 PAGE 1
3 Architecture GLOBAL INDEX WATCH WEB SERVICE NASDAQ OMX has modified the authentication process for fetching files from the GIW Secure Web Service. NASDAQ OMX is making this change in an effort to meet industry security standards. For a list of indexes available please visit the index directory list on the GIW website. The following is an example call that can be used to retrieve files: GetFile("https://indexes.nasdaqomx.com/reports2/weighting.ashx?IndexSymbol=BANK &Date=2009-01-21&Type=pipe&FileType=SOD","YOURUSERNAME","YOURPASSWORD"); static private void GetFile(string url, string username, string password) string postdata = String.Format("username=0&password=1", username, password); StreamReader sr = null; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.method = "POST"; request.cookiecontainer = new CookieContainer(); byte[] bytearray = System.Text.Encoding.UTF8.GetBytes(postData); request.contenttype = "application/x-www-form-urlencoded"; request.contentlength = bytearray.length; Stream datastream = request.getrequeststream(); datastream.write(bytearray, 0, bytearray.length); datastream.close(); try using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) if ((int)response.statuscode < 400 (int)response.statuscode > 499) sr = new StreamReader(response.GetResponseStream()); //here you can parse the stream and store in db, or write to a file //i will simply write it to the console Console.WriteLine(sr.ReadToEnd()); else //error in web request returned by server Console.WriteLine(response.StatusCode + ": " + response.statusdescription); catch (Exception e) Console.WriteLine(e.Message); finally sr.close(); Clients are required to replace username and password with their unique assigned logon credentials from NASDAQ OMX. Additional authentication examples are available upon request. VERSION 2.0 PAGE 2
Sample Calls Using CURL: curl -b cookies.txt -c cookies.txt -d "username=xxx&password=yyy" url Using WGET: wget -q --no-check-certificate --post-data username=xxx&password=yyy -- cookies=on --keep-session-cookies --save-cookies=cookie.txt --loadcookies=cookie.txt url Using PERL: Using PERL: #################################################### ############################ use strict; use warnings; use LWP::UserAgent; #################################################### ############################ my $url = 'https://indexes.nasdaqomx.com/reports2/weighting.ashx?indexsymbol=bank&dat e=2009-01-21&type=pipe&filetype=sod'; my $username = 'YOURUSERNAME'; my $password = 'YOURPASSWORD'; my $cookie = 'YOURCOOKIEFILE'; GetFile($url, $username, $password, $cookie); #################################################### ############################ sub GetFile my ($url, $username, $password, $cookie) = @_; my $ua = LWP::UserAgent->new; $ua->cookie_jar(file => $cookie); $ua->post($url, username => $username, password => $password); my $response = $ua->get($url); my $content = ($response->is_success)? $response->content() : ''; print $content; Note: Cookies should be turned on to retain sessions. In addition, explicitly post the username and password (lower case) and remove server variables. The 2.0 Service does NOT allow queries to be directly entered a browser. The Web Service is intended for automation via web authentication processes. VERSION 2.0 PAGE 3
4 Output Formats GLOBAL INDEX WATCH WEB SERVICE GIW data output can be provided in pipe ( ) or csv (,) delimited, ASCII-text format. To reduce the download time, NASDAQ OMX will not include extra spaces or leading/trailing zeros for any fields. Additionally, fields that contain no data will not be populated, data will be returned with two delimiters in a row. 5 Data Service Formats As a subscriber to the GIW premier service, clients can access the secure web services and receive access to the following information: Weighting Data Service Corporate Action Service History Service 5.1 Weightings Data Service This service will return to the client a data stream representing the weightings and component information related to the specific index identified in the web query. Input Format The service takes in the following parameters: IndexSymbol format uses the Global Index Data Service (GIDS) assigned instrument ID; Date of Weightings File - format yyyy-mm-dd Type format provided as either pipe( ) or csv(,); default is pipe FileType values are either SOD (for start of day requests) or EOD (for end of day requests) Where XXXXXX = GIDS assigned instrument ID, ZZZZ = clients preferred return of data stream (pipe or csv) and WWW= whether the request is Start of Day or End of Day https://indexes.nasdaqomx.com/reports2/weighting.ashx?indexsymbol=xxxxxx&d ate=yyyy-mm-dd&type=zzzz&filetype=www VERSION 2.0 PAGE 4
Weightings Data Service Header Data Field Description Max Field Size / Attribution Parameter Parameter of the query Varchar (24) Alphanumeric Example: QQQQ2010-03-12 EOD Weightings Content Data Field Description Max Field Size / Attribution Symbol The identifier or ticker symbol of the index security. Varchar (18) Alphanumeric Closing Price For EOD files, the Closing Price is the last trade received from the primary market for all securities except NASDAQ securities where the NASDAQ Official Closing Price (NOCP) will be used instead. Varchar (12) Numeric (including Market Value Index Shares For SOD files, the Closing price is the previous day s closing price adjusted for overnight corporate actions (if any). The market capitalization of the index security which is obtained by multiplying the instrument Market Value at the start of the day by the Index Shares. This value is based on the start of day market value of the underlying components provided by the instrument sponsor. This field represents the number of shares for an issue within a given index and is based on the specific index s Calculation Method. This value is used to calculate the issue s market value. The market value for each issue is summed to get the Aggregate Market Value used in the index calculation below: Varchar (53) Numeric Varchar (53) Numeric (including Index Value = (Aggregate Market Value / Divisor) Market Percentage The weighting of each security in the index (market Varchar (9) Numeric (including value of the security divided by the total market value of the index). Company Name The name of the issuer of the index security. Varchar (50) Alphanumeric Footer Data Field Description Max Field Size / Attribution Index Market Value Represents the summation of the market value of all component securities within the index. Varchar (53) Numeric (including decimal) Total Index Shares Represents the summation of the index shares of all component securities within the index. Varchar (53) Numeric (including decimal) Market Percentage Represents the summation of the market percentage of all component securities within the index. Varchar (9) Numeric (including Net Change This field reflects the difference between the current tick value and the prior day s closing tick value for a given instrument. Note: This value will be 0 for Start of Day requests. Varchar (12) Numeric (including High Low As Of Divisor This field reflects the highest calculated value for an instrument during the business day. Note: This value will be 0 for Start of Day requests. This field reflects the lowest calculated value for an instrument during the business day. Note: This value will be 0 for Start of Day requests. Date of the report as of market close adjusted for corporate actions to become effective prior to market open on subsequent day. MM/DD/YYYY (9/21/2009) The Divisor is a number that is adjusted periodically (due to component changes and corporate actions) to ensure continuity of an index. This value is used in the index calculations. Varchar (12) Numeric (including Varchar (12) Numeric (including Varchar (12) Alphanumeric (including special characters and spaces) Varchar (53) Numeric (including decimal) VERSION 2.0 PAGE 5
Current Index Value Calculated value: Index Market Value / Divisor Varchar (12) Numeric (including Index Dividend Point Index Dividend Point = Dividend Market Value/Divisor Varchar (9) Numeric 9 Dividend Market Value Represents the summation of all index securities dividend market values Varchar (19) Numeric 19 Base Value Dividend Market Value = Cash dividend * index shares per security Index Value at inception. The base value represents the index inception value and may be adjusted by the sponsor occasionally. Varchar (12) Numeric (including VERSION 2.0 PAGE 6
5.2 CORPORATE ACTIONS SERVICE: This service will return to the client a stream representing the corporate action information related to the specific index identified in the web query. This service will also allow the client to enter a future date and if an advance corporate action exists the stream will include this data with the effective date populated. Input Format The service takes in the following parameters: IndexSymbol format uses the Global Index Data Service (GIDS) assigned instrument ID; Start Date - format yyyy-mm-dd EndDate - format yyyy-mm-dd Type format provided as either pipe( ) or csv(,); default is pipe Where XXXXXX = GIDS assigned instrument ID and ZZZZ = clients preferred return of data stream (pipe or csv) https://indexes.nasdaqomx.com/reports2/corpactions.ashx?indexsymbol=xxxxxx& StartDate=YYYY-MM-DD&EndDate=YYYY-MM-DD&Type=ZZZZ Optional Input Format to return changes since last request By including an optional input, in place of the start and end dates, the client can receive a return of just the changes since the last client update request (Delta Date). IndexSymbol format uses the Global Index Data Service (GIDS) assigned instrument ID; Delta Date format mm/dd/yyyy hh:mm:ss (time represented as 24 hour input) Type format provided as either pipe( ) or csv(,); default is pipe Where XXXXXX = GIDS assigned instrument ID; mm/dd/yyyy hh:mm:ss = optional input of date and time of last record (Delta Date) pull and ZZZZ = clients preferred return of data stream (pipe or csv); https://indexes.nasdaqomx.com/reports2/corpactions.ashx?indexsymbol=xxxxxx& DeltaDate=mm/dd/yyyy hh:mm:ss&type=zzzz Header Data Field Description Max Field Size / Attribution Parameter Parameter of the query Example: QQQQ2010-03-12_QQQQ2010-03-30 Varchar (40) Alphanumeric Output Stream Data Field Description Max Field Length / Attribution ID Effective Date Assigned ID value in the NASDAQ OMX GIW service Date the corporate action will take effect and may include a date later than the current date. Varchar (9) - Numeric Field Length (8) Numeric represented as (YYYYDDMM) Current Symbol New Symbol Current Company Name The current identifier or ticker symbol of the index security. The new identifier or ticker symbol of the index security. The current name of the issuer of the index security. Varchar (18) - Alphanumeric Varchar (18) - Alphanumeric Varchar (50) - Alphanumeric VERSION 2.0 PAGE 7
Output Stream Data Field Description Max Field Length / Attribution New Company Name The new name of the issuer of the index security. Varchar (50) - Alphanumeric Current Index Shares This field represents the current number of shares for an issue within a given index and is Varchar (53) - Numeric (including based on the specific index s Calculation Method. New Index Shares This field represents the new number of shares for an issue within a given index and is based Varchar (53) - Numeric (including on the specific index s Calculation Method. Reason This represents the reason for the corporate Variable action. Allowable values currently defined: o Addition o Adjustment o Component Change o Deletion o Divisor Change o Index News o Name Change o Name and Symbol Change o Quarterly o Share Change o Special Corporate Action o Stock Split o Stock Dividend o Symbol Change o Update Split Ratio Represents the split ratio to take place on effective date Variable Alphanumeric represented as (#:# 0r ##:#) 2:1 Comments Free form space available for comment Variable Last update date/time This field represents the last time that the record was updated. Varchar (18) - Alphanumeric represented as (MM/dd/yyyy HH:mm:ss) Deleted Flag This field represents if a record has been deleted from previous files. Field Length (1) Alphanumeric allowable values: Empty consecutive delimiters (,, or ) Deleted D VERSION 2.0 PAGE 8
5.3 HISTORY SERVICE: This service will return to the client data representing the historical daily summary information related to a specific index identified in the web query. Input Format The service takes in the following parameters: IndexSymbol format uses the Global Index Data Service (GIDS) assigned instrument ID; Start Date - format yyyy-mm-dd EndDate - format yyyy-mm-dd Type format provided as either pipe( ) or csv(,); default is pipe FileType values are either SOD (for start of day requests) or EOD (for end of day requests) Where XXXXXX = GIDS assigned instrument ID,ZZZZ = clients preferred return of data stream (pipe or csv) and WWW= whether the request is Start of Day or End of Day Example: https://indexes.nasdaqomx.com/reports2/history.ashx?indexsymbol=xxxxxx&start Date=YYYY-MM-DD&EndDate=YYYY-MM-DD&Type=ZZZZ&FileType=WWW Header Data Field Description Max Field Size / Attribution Parameter Output Stream Parameter of the query Example: QQQQ2010-03-12_QQQQ2010-03- 30 EOD Varchar (40) Alphanumeric Data Field Description Max Field Size / Attribution Trade Date Represents the trade date for the index Field Length (8) Numeric represented as (YYYYDDMM) Index Value This field reflects the final calculated value for an instrument for the defined trade date. This value may be adjusted for corporate actions from prior days. Varchar (12) - Numeric (including Net Change High Low Total Index Shares Total Market Value Divisor This field reflects the difference between the current tick value and the prior day s closing tick value for a given instrument. Note: This value will be 0 for Start of Day requests. This field reflects the highest calculated value for an instrument during the business day. Note: This value will be 0 for Start of Day requests. This field reflects the lowest calculated value for an instrument during the business day. Note: This value will be 0 for Start of Day requests. Represents the summation of the index shares of all component securities within the index. This field reflects the closing Market Value at the end of day trade reporting for the instrument identified in the message. The Divisor is a number that is adjusted periodically (due to component changes and corporate actions) to ensure continuity of an index. This value is used in the index calculations. Varchar (12) - Numeric (including Varchar (12) - Numeric (including Varchar (12) - Numeric (including Varchar (53) Numeric (including decimal) Varchar (53) - Numeric (including decimal) Varchar (53) - Numeric (including decimal) Index Dividend Point Index Dividend Point = Dividend Market Varchar (9) Numeric 9 VERSION 2.0 PAGE 9
Value/Divisor Dividend Market Value Represents the summation of all index securities dividend market values Varchar (19) - Numeric Dividend Market Value = Cash dividend * index shares per security Base Value Index Value at inception (as adjusted) Varchar (12) - Numeric (including VERSION 2.0 PAGE 10
6 Support o o For general product support for NASDAQ data feeds, please contact NASDAQ OMX Global Data Products at +1 301 978 5307 or dataproducts@nasdaqomx.com. For technical support for NASDAQ data feeds, please contact NASDAQ OMX Systems Engineering at devsupport@nasdaqomx.com. VERSION 2.0 PAGE 11
Appendix A Documentation Revision Control Log GLOBAL INDEX WATCH WEB SERVICE April 13, 2009 GIW WebService Version 0.10 (DRAFT) o Released initial product specification, in draft format, to a few developers for comment. May 15, 2009 GIW WebService Version 1.0 (Final) o Released initial product specification March 2010 GIW WebService Version 2.0 o Revised Weightings and History Data Service to include Start of Day and End of Day files o Modified Authentication Protocol to conform with industry standards April 2010 GIW WebService Version 2.0 o Revised format of Parameter field in History Data Service o Revised History Data Service to include Total Index Shares o Revised Corporate Actions Data Service to include the parameter of the query call o Revised format of As Of field in Weightings Data Service VERSION 2.0 PAGE 12