• No results found

Returns a list of option chains associated with a specific underlier

Description

This API returns a list of option chains for a specific underlying instrument. The request must specify an instrument, the month the option expires, and whether you are interested in calls, puts, or both. Values returned include the option pair count and information about each option pair, including the type, call count, symbol, product, date, and strike price.

URL

https://etws.etrade.com/market/rest/optionchains

HTTP Method: GET Request Parameters

Parameter Type Required? Description

chainType enum required The type of option chain. Possible values are: CALL, PUT, or CALLPUT (i.e., both calls and puts).

expirationMonth integer required The month the option will expire expirationYear integer required The year the option will expire

underlier string required The market symbol for the underlying security

skipAdjusted boolean optional Specifies whether to show (TRUE) or not show (FALSE) adjusted options, i.e., options that have undergone a change resulting in a modification of the option contract. Default value is TRUE.

Response Properties

Property Type Description

optionPairCount integer The number of option pairs returned

optionPairs complex Container for an option pair. There will be one of these for each option pair in the response.

callCount (or putCount)

integer The number of call or put objects in this container

pairType string Determines whether the response will contain calls, puts, or both.

Possible values are: CALLONLY, PUTONLY, or CALLPUT.

call (or put) complex Container for a call or put. There are typically more than one of these in a response - check callCountor putCountfor the count.

E*TRADE Developer Platform 94 Get Option Chains rootSymbol string The underlier for the option as originally contracted, e.g., GOOG.

For adjusted options, this root symbol may not match the current symbol.

expireDate complex Container for information on the expiration date day integer Expiration day as a day of the month

month integer Expiration month as number year integer Four-digit expiration year

expiryType string Expiry type of the option. Possible values are: QUARTERLY, MONTHLY, or WEEKLY.

product complex A container for information on the product specified in this option exchangeCode string The primary exchange where the option is traded

symbol string The market symbol for the option, formatted as the stock symbol, expiration date, price, "Put" or "Call", and expiry type - "w"

(weekly), "q" (quarterly), or neither (monthly). For example,

"GOOG Jan 07 '11 $660 Call w".

typeCode string Value is always OPTN. Supported for legacy purposes.

strikePrice double The agreed strike price for the option, as stated in the contract callCount (or

putCount)

integer The number of call or put objects in this response symbol string The market symbol for the instrument, e.g., GOOG

Sample Request

GET

https://etws.etrade.com/market/rest/optionchains?expirationMonth=04&expirationYear=201 1&chainType=PUT&skipAdjusted=true&underlier=GOOG

Sample Response - XML

<OptionChainResponse>

<optionPairCount>2</optionPairCount>

<optionPairs>

<call>

<rootSymbol>GOOG</rootSymbol>

<expireDate>

<day>7</day>

<month>1</month>

<year>2011</year>

<expiryType>WEEKLY</expiryType>

</expireDate>

<product>

<exchangeCode>CINC</exchangeCode>

<symbol>GOOG Jan 07 '11 $540 Call w</symbol>

<typeCode>OPTN</typeCode>

</product>

<strikePrice>540.000000</strikePrice>

</call>

<callCount>1</callCount>

<pairType>CALLPUT</pairType>

E*TRADE Developer Platform 95 Get Option Chains <put>

<rootSymbol>GOOG</rootSymbol>

<expireDate>

<day>7</day>

<month>1</month>

<year>2011</year>

<expiryType>WEEKLY</expiryType>

</expireDate>

<product>

<exchangeCode>CINC</exchangeCode>

<symbol>GOOG Jan 07 '11 $540 Put w</symbol>

<typeCode>OPTN</typeCode>

</product>

<strikePrice>540.000000</strikePrice>

</put>

<putCount>1</putCount>

</optionPairs>

<optionPairs>

<call>

<rootSymbol>GOOG</rootSymbol>

<expireDate>

<day>7</day>

<month>1</month>

<year>2011</year>

<expiryType>WEEKLY</expiryType>

</expireDate>

<product>

<exchangeCode>CINC</exchangeCode>

<symbol>GOOG Jan 07 '11 $660 Call w</symbol>

<typeCode>OPTN</typeCode>

</product>

<strikePrice>660.000000</strikePrice>

</call>

<callCount>1</callCount>

<pairType>CALLPUT</pairType>

<put>

<rootSymbol>GOOG</rootSymbol>

<expireDate>

<day>7</day>

<month>1</month>

<year>2011</year>

<expiryType>WEEKLY</expiryType>

</expireDate>

<product>

<exchangeCode>CINC</exchangeCode>

<symbol>GOOG Jan 07 '11 $660 Put w</symbol>

<typeCode>OPTN</typeCode>

</product>

<strikePrice>660.000000</strikePrice>

</put>

<putCount>1</putCount>

</optionPairs>

<symbol>goog</symbol>

</OptionChainResponse>

E*TRADE Developer Platform 96 Get Option Chains

Sample response - JSON

{

"OptionChainResponse": { "optionPairCount": "2", "optionPairs": [

E*TRADE Developer Platform 97 Get Option Chains "strikePrice": "660.000000"

},

"callCount": "1", "pairType": "CALLPUT", "put": {

"rootSymbol": "GOOG", "expireDate": { "day": "7", "month": "1", "year": "2011",

"expiryType": "WEEKLY"

},

"product": {

"exchangeCode": "CINC",

"symbol": "GOOG Jan 07 '11 $660 Put w", "typeCode": "OPTN"

},

"strikePrice": "660.000000"

},

"putCount": "1"

} ],

"symbol": "goog"

} }

Notes

Sample use cases