DTN ProphetX® Web Services

GetMarketHours

This operation provides the ability to retrieve the hours that a security is open for trading. For each symbol requested the response includes a list of trade dates based on the inputs to the request, and for each trade date the response includes a list of trading sessions. Each session has an open time and a close time. If a security has multiple trading sessions, then the security does not trade between the close time of one session and the open of the next. Most securities will only have a single session per trade day, but some securities, particularly futures contracts, will have two or more sessions. It is possible for the open time of the first session of a trade date to be on a date prior to the trade date. The open and close times of sessions are in the timezone of the exchange the security trades on.

Parameter Value
UserID*
Password* Password is case sensitive.
 
Symbol* A comma separated list of symbols or search patterns based on wildcards.
StartDate Start date in the format "MM-DD-YYYY" or "MM/DD/YY". An integer number is accepted to indicate a relative date in the past counted as days from market current date. Default is seven days in the past.
EndDate End date in the format "MM-DD-YYYY" or "MM/DD/YY". An integer number is accepted to indicate a relative date in the past counted as days from market current date. Default value is tomorrow.
 
Symbol Limit Maximum number of symbols to return in one response. Default is 600. Absolute maximum is 4,000.
Page Token A page token returned from a previous request. It is used to resume a request that matched more symbols than the SymbolLimit allowed in one request.
 
Market Optional market name or code (see notes below).
Vendor Optional vendor name or code.
Format Optional parameter to request the result in an specific format.  Default value is XML.

Notes

*Mandatory parameters are marked with an asterisk.

Symbol

Each symbol or search pattern is separated by a comma and it is important to note that there is a limit of 2048 characters in the length of a request string when calling the service via HTTP/GET through the PXServiceWeb.svc URL.  This limitation does not exist when calling the service using the SOAP protocols, check the Connectivity Overview section for more details.

The following table shows some examples of search patterns for futures options:

Pattern Description
C`##C6### 10 Selects calls of the first 10 contracts of Corn futures options with a strike price between 600 and 699.
C`##<CP>68## 20 Selects calls and puts of the first 20 contracts of Corn futures options with a strike price between 680 and 689.

Following are some more generic examples of search patterns:

Pattern Description
@C@1 Selects the first electronic Corn contract.
@C@5 Selects the fifth electronic Corn contract.
@C`## Selects all electronic Corn contracts.
@S`## 3 Selects first three electronic Soybean contracts (there is a space between # and 3).
@C`##,@S`##,@W`## Selects all the electronic Corn, Soybean, and Wheat contracts.

As some of the examples above suggests, there is a way to limit the number of symbols returned by a search pattern by explicitly specifying a quantifier.  The quantifier is an integer number separated by a space after the search pattern and can be specified for each pattern as in this example:

    *B*L 2,NG`## 5,C@3 3

In general, the value of the quantifier is limited to 600, which is the same as the maximum total of symbols returned by the whole list of search patterns.  The exception is the GetOptionGreeks operation, where the quantifier is limited to 200.

Symbol and Market

Since there are symbols that can be differentiated only by the market, a request for a given symbol may return multiple entries, one for each market.  To avoid this situation a symbol can be fully qualified in the request by explicitly indicating the vendor and market as in "DTN:NYS:IBM".

Limit

Data is available back to January 1st, 1990, and up to 600 symbols can be specified in a single request. However the system has a limit of a total of 219,000 calendar date symbol combinations, so a request for 600 symbols will be limited to a date range of 365 calendar days. A request that is trying to load data since 1990 will need to have 20 or fewer symbols.

Market and Vendor

For most of the cases, the Market and Vendor input fields are optional and are rarely needed to refine the request for symbols within a specific Market and/or Vendor.  Only one Market and/or Vendor can be entered and they are overridden when entering a fully qualified symbol notation.

A history request for expired symbols requires the explicit specification of the market using any valid method.

These parameters are needed when the user is registered for accessing same symbol from two different sources, which in practice is not common.  A user permitted to obtain quotes from DTN and other vendors, by default, will see DTN information unless explicitly sets the desired Vendor parameter to something different.

Format

Supported format codes are: XML, CSV and JSN.