| gif | history | intraday | java | news | objects | options | quote | soap | spots | tickers | weather | end of day | wddx |

Requests:
 OptionChain
  Types:
   ·Query
   ·Delimited
 Quote
Sample Code:
 Coldfusion
 ASP
 JSP
 PHP
 Perl
 
OptionChain (Query)
Required Parameters
Username = myUsername
Password = myPassword
Id = 1183
Request = OptionChain
 
Optional Parmeters
Symbol = any valid ticker symbol
Fields = Comma delimeted list of fields you want returned. You can find a list of available fields by security type here.
Month = must be a single letter or comma delimited list of letters that corresponds to the matrix below:
Puts = 1 or true

Month Call letter Put letter
JAN A M
FEB B N
MAR C O
APR D P
MAY E Q
JUN F R
JUL G S
AUG H T
SEP I U
OCT J V
NOV K W
DEC L X

If you passed symbol=MSFT and Month=L, you would retrieve a chain with all the CALL options for Microsoft for the month of December. To retrieve PUTS as well as CALLS for DEC you would pass symbol=MSFT, Month=L, Puts=True. To receive just PUTS for December you would pass symbol=MSFT, Month=X. Here is post data for some sample scenarios (note: postdata is a string representing the form elements. If you are using CF, each of these name/value pairs is a "formfield" for cfhttpparam):
 
Example WDDX Packet
OptionChain Query
 
Optionchain Type=Query returns a WDDX recordset with the following default columns. You can request other columns by using the optional "fields" parameter.
Base_Symbol - This is the base symbol of the underlying equity for the option. For example, if the option is DLY ID - the September Call for a strike price of 20 on Dell computer, the base_symbol field would be DELL - the ticker symbol for company stock on which the option is drawn.
Last - This is the last trade price for base_symbol.
High - Todays high price.
Open - Today's open price.
Low - Today's low price.
Prev - Last trading days close.
Close - This is the closing price for the previous day OR today's closing price if trading has ended.
Desc - Company or issuer name.
Call_recs - This key contains a "recordset" with the chain information. Accessing the data or attributes contained in this key will give you the symbols and related data for the actual CALL options. The columns for the Call_Recs are listed below:
  • Symbol - the option symbol. The first 3 characters are the "option root". An option root for a NYSE or AMEX stock is usually the same as the ticker symbol. However, the option root for a Nasdaq stock is a 3-letter derivative of the ticker symbol (for example - DELL uses DLQ for many options). The option root is followed by a space, then 2 more letters (ie. DLQ IU). The trailing letters represent the month of the options expiration, and the strike price (price at issue) for the option. A cross-reference table for the month is provided below.
  • Expire - This is a string with six characters representing the expiration date. All of the characters are numeric values. The first 2 characters are the month, the next 2 are the day and the next 2 are the year. To convert to a readable date format, use date functions provided by your scripting language, or insert dashes or slashes after the first 2 and first 4 characters (ie. 090101 becomes 09-01-01).
  • Strike - This is the Strike price for the option. It is the price of the option when first issued.
  • Last - This is the price of the option when last traded.
  • Change - This is the change value from the previous close.
  • Bid - Current best bid for this option.
  • Bid_size - Current bid size for this option.
  • Ask - Current best ask for this option.
  • Ask_size - Current ask size for this option.
  • Volume - Days cumulative volume.
  • Inc_Volume - Last Trade size.
  • OpenInt - Open Interest. This number represents the number of contracts currently held for that option. Open interest is an indication of the level or scale of interest in the option.
Put_recs - This key contains a "recordset" with the chain information for option PUTS. Getting PUTS as well as CALLS is optional. To get PUTS included in the chain, simply pass a form element called "puts" and set it to 1 or "true". Accessing the data or attributes contained in this key will give you the symbols and related data for the actual PUT options. The columns for the Put_recs are the same as those for the call_recs key.


Cold Fusion Example
<cfhttp url="http://www.finwin.com/processCT/ProcessOptionTag.cfm" method="POST">
  <cfhttpparam name="username" value="myPassword" type="formfield">
  <cfhttpparam name="password" value="myUsername" type="formfield">
  <cfhttpparam name="id" value="1183" type="formfield">
  <cfhttpparam name="request" value="optionchain" type="formfield">
  <cfhttpparam name="symbol" value="msft" type="formfield">
  <cfhttpparam name="month" value="a" type="formfield">
  <cfhttpparam name="type" value="query" type="formfield">
  <cfhttpparam name="puts" value="1" type="formfield"> 
</cfhttp>
<cfoutput>#cfhttp.filecontent#</cfoutput>
ASP Example
	
Dim strSymbol
Dim strMonth
strMonth 	 = Request.Form("Month")
strSymbol   = Request.Form("Symbol")

Request_POST = 	1
Set HttpObj  = Server.CreateObject("SOFTWING.AspTear")
FinwinURL 	 = "http://www.finwin.com/processCT/ProcessOptionTag.cfm"

PostData = "username=myUsername&password=myPassword&id=1183&request=OptionChain&Symbol=" & 
strSymbol & "&type=query"

content = HttpObj.Retrieve(FinwinURL, Request_POST,PostData, "", "")
Response.write(content)
OptionChain (Type = Query) Example:
MICROSOFT (MSFT)   Last : 30.2400   Close : 29.9500
Calls Last Change Bid Ask Volume Strike Puts Last Change Bid Ask Volume Strike
MSFT1220J14 0.00 0.00 14.3 17.9 00 14.0
MSFT1220J15 0.00 0.00 13.6 16.9 00 15.0
MSFT1220J16 0.00 0.00 12.6 15.9 00 16.0
MSFT1220J17 0.00 0.00 11.6 14.9 00 17.0
MSFT1220J18 0.00 0.00 10.6 14.0 00 18.0
MSFT1220J19 0.00 0.00 9.60 12.9 00 19.0
MSFT1220J20 0.00 0.00 8.75 11.8 00 20.0
MSFT1220J21 0.00 0.00 7.75 10.8 00 21.0
MSFT1220J22 7.45 0.00 8.20 8.35 00 22.0
MSFT1220J23 7.30 0.75 7.25 7.40 9 23.0
MSFT1220J24 5.75 0.00 6.30 6.45 00 24.0
MSFT1220J25 5.20 0.00 5.45 5.60 00 25.0
MSFT1220J26 4.83 0.38 4.65 4.75 30 26.0
MSFT1220J27 3.94 0.14 3.85 4.00 5 27.0
MSFT1220J28 3.20 0.20 3.15 3.25 7 28.0
MSFT1220J29 2.55 0.14 2.55 2.59 361 29.0
MSFT1220J30 2.00 0.09 2.00 2.03 417 30.0
MSFT1220J31 1.54 0.07 1.53 1.56 353 31.0
MSFT1220J32 1.17 0.09 1.14 1.17 715 32.0
MSFT1220J33 0.85 0.07 0.84 0.86 324 33.0
MSFT1220J34 0.60 0.05 0.60 0.61 282 34.0
MSFT1220J35 0.42 0.01 0.42 0.43 1129 35.0
MSFT1220J36 0.28 0.01 0.28 0.30 24 36.0
MSFT1220J37 0.00 0.00 0.19 0.21 00 37.0
MSFT1220J38 0.10 0.00 0.13 0.16 00 38.0
MSFT1220J39 0.00 0.00 0.07 0.11 00 39.0
MSFT1220J40 0.00 0.00 0.05 0.09 00 40.0
MSFT1220V14 0.18 0.00 0.06 0.10 00 14.0
MSFT1220V15 0.00 0.00 0.08 0.12 00 15.0
MSFT1220V16 0.13 0.00 0.10 0.14 00 16.0
MSFT1220V17 0.18 0.00 0.12 0.15 00 17.0
MSFT1220V18 0.19 0.00 0.14 0.19 00 18.0
MSFT1220V19 0.22 0.00 0.18 0.23 00 19.0
MSFT1220V20 0.22 -0.05 0.22 0.25 20 20.0
MSFT1220V21 0.28 -0.04 0.27 0.30 10 21.0
MSFT1220V22 0.34 -0.09 0.35 0.36 5 22.0
MSFT1220V23 0.50 0.00 0.44 0.46 00 23.0
MSFT1220V24 0.55 -0.08 0.56 0.58 10 24.0
MSFT1220V25 0.70 -0.10 0.71 0.73 111 25.0
MSFT1220V26 0.90 -0.10 0.91 0.93 76 26.0
MSFT1220V27 1.18 -0.10 1.15 1.18 1 27.0
MSFT1220V28 1.43 -0.14 1.46 1.49 72 28.0
MSFT1220V29 1.84 -0.21 1.84 1.87 51 29.0
MSFT1220V30 2.24 -0.32 2.30 2.33 26 30.0
MSFT1220V31 2.77 -0.33 2.83 2.87 17 31.0
MSFT1220V32 3.60 0.00 3.45 3.50 00 32.0
MSFT1220V33 4.35 0.00 4.10 4.20 00 33.0
MSFT1220V34 5.55 0.00 4.85 4.95 00 34.0
MSFT1220V35 0.00 0.00 5.65 5.80 00 35.0
MSFT1220V36 7.45 0.00 6.55 6.65 00 36.0
MSFT1220V37 0.00 0.00 6.15 8.70 00 37.0
MSFT1220V38 0.00 0.00 6.95 9.90 00 38.0
MSFT1220V39 0.00 0.00 7.80 10.9 00 39.0
MSFT1220V40 0.00 0.00 8.75 11.8 00 40.0

DTN Market Access
9110 West Dodge Road, Suite 200   Omaha, Nebraska 68114
Copyright 2012, All rights reserved