| 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 (Delimited)
Required Parameters
Username = myUsername
Password = myPassword
Id = 1183
Request = OptionChain
Type = Delimited
 
Optional Parmeters
Fields = Comma delimeted list of fields you want returned. You can find a list of available fields by security type here.
Symbol = any valid ticker symbol
Delimiter = we strongly recommend NOT using a comma (,) or a space if you wish to have a tab delimiter please enter the word "tab". Default (|)
Fields = List of data fields you wish to be returned
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 Delimited Packet
OptionChain Delimited
 
Optionchain Type=Delimited returns a Delimited recordset with the following default columns. You can request other columns by using the optional "fields" parameter.

  • 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.
  • Option - A letter, either "C" or "P". The letter defines whether the option is a call or a put.


Cold Fusion Example
<cfhttp url="http://www.finwin.com/processCT/ProcessOptionTag.cfm" method="POST">
  <cfhttpparam name="username" value="myUsername" type="formfield">
  <cfhttpparam name="password" value="myPassword" 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="delimited" 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=delimited"

content = HttpObj.Retrieve(FinwinURL, Request_POST,PostData, "", "")
Response.write(content)

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