Market API

Overview

The Market APIs provide information about market events.

Description

This API returns a list of securities of a specified type (e.g., equity stock) based on a full or partial match of any part of the company name. For instance, a search for "jones" returns a list of securities associated with "Jones Soda Co", "Stella Jones Inc", and many others. The list contains the company name, the exchange that lists the security, the security type, and the symbol, for as many matches as are found. The result may include some unexpected matches, because the search includes more than just the display version of the company name. For instance, searching on "etrade" returns securities for "E TRADE" - notice the space in the name. This API is for searching on the company name, not a security symbol. It's commonly used to look up a symbol based on the company name, e.g., "What is the symbol for Google stock?". To look up company information based on a symbol, or to find detailed information on a security, use the quote API.

HTTP Method: GET

Live URL

                    https://api.etrade.com/v1/market/lookup/{search}
                

Sandbox URL

                    https://apisb.etrade.com/v1/market/lookup/{search}
                

Request

Property Type Required? Description Allowable Values
search path yes The search request

Response

Status Code Reason Response Model Error Code
200 Successful operation. LookupResponse
400 The symbol entered is invalid. Please enter another symbol. 10033
400 Missing symbol. Please enter valid symbol. 10043
400 Unauthorized access to this API is restricted. 10035
400 Error getting the product details. 10034

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..

HTTP Method: GET

Live URL

                    https://api.etrade.com/v1/market/optionchains?symbol={symbol}
                

Sandbox URL

                    https://apisb.etrade.com/v1/market/optionchains?symbol={symbol}
                

Request

Property Type Required? Description Allowable Values
symbol query yes The market symbol for the instrument; for example, GOOG
expiryYear query no Indicates the expiry year corresponding to which the optionchain needs to be fetched
expiryMonth query no Indicates the expiry month corresponding to which the optionchain needs to be fetched
expiryDay query no Indicates the expiry day corresponding to which the optionchain needs to be fetched
strikePriceNear query no The optionchians fetched will have strike price nearer to this value
noOfStrikes query no Indicates number of strikes for which the optionchain needs to be fetched
includeWeekly query no The include weekly options request. Default: false. true, false
skipAdjusted query no The skip adjusted request. Default: true. true, false
optionCategory query no The option category. Default: STANDARD. STANDARD, ALL, MINI
chainType query no The type of option chain. Default: CALLPUT. CALL, PUT, CALLPUT
priceType query no The price type. Default: ATNM. ATNM, ALL

Response

Status Code Reason Response Model Error Code
200 Successful operation. OptionChainResponse
400 Invalid option type. Please provide valid option type. 10040
400 There are no options for the given month. 10031
400 Please provide a valid option type. 10042
400 Invalid option type in OSI key. Please provide valid OSI key. 10041
400 The Symbol entered is invalid. Please enter another symbol. 10033
400 There are no options available for the given symbol or expiration date. 10044
400 No options are available for this symbol. 10032
400 Missing symbol. Please enter valid symbol. 10043
400 Unauthorized access to this API is restricted. 10035
400 Invalid category. Please provide valid category for top five quotes. 10046
400 Error getting the product details. 10034
400 Top five quotes are not available at this time. 10045
400 There are no standard options available for the month. 10037
400 Error getting the ExpirationDates details. 10036
400 Please provide valid expiration date. 10039
400 Mini options not available for this symbol. 10038

Description

Returns a list of dates suitable for structuring an option table display. The dates are used to group option data (returned by the optionchains method) for a specified underlier, creating a table display.

HTTP Method: GET

Live URL

                    https://api.etrade.com/v1/market/optionexpiredate?symbol={symbol}
                

Sandbox URL

                    https://apisb.etrade.com/v1/market/optionexpiredate?symbol={symbol}
                

Request

Property Type Required? Description Allowable Values
expiryType query no Expiration type of the option
symbol query yes The symbol in the request

Response

Status Code Reason Response Model Error Code
200 Successful operation. OptionExpireDateResponse
400 Invalid option type. Please provide valid option type. 10040
400 There are no options for the given month. 10031
400 Please provide a valid option type. 10042
400 Invalid option type in OSI key. Please provide valid OSI key. 10041
400 The Symbol entered is invalid. Please enter another symbol. 10033
400 There are no options available for the given symbol or expiration date. 10044
400 No options are available for this symbol. 10032
400 Missing symbol. Please enter valid symbol. 10043
400 Unauthorized access to this API is restricted. 10035
400 Invalid category. Please provide valid category for top five quotes. 10046
400 Error getting the product details. 10034
400 Top five quotes are not available at this time. 10045
400 There are no standard options available for the month. 10037
400 Error getting the ExpirationDates details. 10036
400 Please provide valid expiration date. 10039
400 Mini options not available for this symbol. 10038
Property Type Description Possible Values
symbol string The market symbol for the security
description string The text description of the security
type string The symbol type
Property Type Description Possible Values
year integer (int32) The four-digit year the option will expire
month integer (int32) The month (1-12) the option will expire
day integer (int32) The day (1-31) the option will expire
expiryType string Expiration type of the option UNSPECIFIED, DAILY, WEEKLY, MONTHLY, QUARTERLY, VIX, ALL, MONTHEND, INVALID
Property Type Description Possible Values
data array[Data] The lookup response data
Property Type Description Possible Values
optioncall OptionDetails The option call in the option chain pair
optionPut OptionDetails The option put in the option chain pair
pairType string Determines whether the response will contain calls(CALLONLY), puts(PUTONLY), or both(CALLPUT)
Property Type Description Possible Values
optionPairs array[OptionChainPair] Container for an option pair; each option pair in the response has a container
timeStamp integer (int64) The option chain response timestamp
quoteType string The option chain response quote type
nearPrice number The near price in the option chain
selected SelectedED The selected option chain
Property Type Description Possible Values
optionCategory string The option category STANDARD, ALL, MINI, INVALID
optionRootSymbol string The root or underlying symbol of the option
timeStamp integer (int64) The timestamp of the option
adjustedFlag boolean Indicator signifying whether option is adjusted
displaySymbol string The display symbol
optionType string The option type
strikePrice number (double) The agreed strike price for the option as stated in the contract
symbol string The market symbol for the option
bid number (double) The bid
ask number (double) The ask
bidSize integer The bid size
askSize integer The ask size
inTheMoney string The "in the money" value; a put option is "in the money" when the strike price of the put is above the current market price of the stock
volume integer The option volume
openInterest integer The open interest value
netChange number (double) The net change value
lastPrice number (double) The last price
quoteDetail string The option quote detail
osiKey string The Options Symbology Initiative (OSI) key containing the option root symbol, expiration date, call/put indicator, and strike price
optionGreek OptionGreeks The Greeks on the option; Greeks are a collection of statistical values that measure the risk involved in an options contract in relation to certain underlying variables
Property Type Description Possible Values
expirationDates array[ExpirationDate] The expiration dates for the options
Property Type Description Possible Values
rho number The rho value
vega number The vega value
theta number The theta value
delta number The delta value
gamma number The gamma value
iv number The Implied Volatility (IV)
currentValue boolean The current value
Property Type Description Possible Values
month integer (int32) The selected month
year integer (int32) The selected year
day integer (int32) The selected day

Example

Look Up Product Request URL

https://api.etrade.com/v1/market/lookup/a
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<LookupResponse>
   <Data>
      <symbol>A</symbol>
      <description>AGILENT TECHNOLOGIES INC COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>AA</symbol>
      <description>ALCOA CORP COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>AABA</symbol>
      <description>ALTABA INC COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>AAPL</symbol>
      <description>APPLE INC COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ABBV</symbol>
      <description>ABBVIE INC COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ABEV</symbol>
      <description>AMBEV SA SPONSORED ADR</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ABT</symbol>
      <description>ABBOTT LABS COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ACN</symbol>
      <description>ACCENTURE PLC IRELAND SHS CLASS A</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ADBE</symbol>
      <description>ADOBE SYS INC COM</description>
      <type>EQUITY</type>
   </Data>
   <Data>
      <symbol>ADP</symbol>
      <description>AUTOMATIC DATA PROCESSING INC COM</description>
      <type>EQUITY</type>
   </Data>
</LookupResponse>
                  
                

Get Option Chains Request URL

https://api.etrade.com/v1/market/optionchains?symbol=IBM&expiryYear=2018&expiryMonth=08&strikePriceNear=200&noOfStrikes=2
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<OptionChainResponse>
   <OptionPair>
      <Call>
         <optionCategory>STANDARD</optionCategory>
         <optionRootSymbol>IBM</optionRootSymbol>
         <timeStamp>1529430484</timeStamp>
         <adjustedFlag>false</adjustedFlag>
         <displaySymbol>IBM Aug 17 '18 $200 Call</displaySymbol>
         <optionType>CALL</optionType>
         <strikePrice>200.0</strikePrice>
         <symbol>IBM</symbol>
         <bid>0.0</bid>
         <ask>0.05</ask>
         <bidSize>0</bidSize>
         <askSize>138</askSize>
         <inTheMoney>n</inTheMoney>
         <volume>0</volume>
         <openInterest>0</openInterest>
         <netChange>0.0</netChange>
         <lastPrice>0.0</lastPrice>
         <quoteDetail>https://api.etrade.com/v1/market/quote/IBM:2018:8:17:CALL:200.000000</quoteDetail>
         <osiKey>IBM---180817C00200000</osiKey>
         <OptionGreeks>
            <rho>0.001000</rho>
            <vega>0.008600</vega>
            <theta>-0.002000</theta>
            <delta>0.004900</delta>
            <gamma>0.000800</gamma>
            <iv>0.314500</iv>
            <currentValue>true</currentValue>
         </OptionGreeks>
      </Call>
      <Put>
         <optionCategory>STANDARD</optionCategory>
         <optionRootSymbol>IBM</optionRootSymbol>
         <timeStamp>1529431379</timeStamp>
         <adjustedFlag>false</adjustedFlag>
         <displaySymbol>IBM Aug 17 '18 $200 Put</displaySymbol>
         <optionType>PUT</optionType>
         <strikePrice>200.0</strikePrice>
         <symbol>IBM</symbol>
         <bid>0.0</bid>
         <ask>0.0</ask>
         <bidSize>0</bidSize>
         <askSize>0</askSize>
         <inTheMoney>y</inTheMoney>
         <volume>0</volume>
         <openInterest>0</openInterest>
         <netChange>0.0</netChange>
         <lastPrice>0.0</lastPrice>
         <quoteDetail>https://api.etrade.com/v1/market/quote/IBM:2018:8:17:PUT:200.000000</quoteDetail>
         <osiKey>IBM---180817P00200000</osiKey>
         <OptionGreeks>
            <rho>-0.278200</rho>
            <vega>0.015300</vega>
            <theta>-0.000200</theta>
            <delta>-0.991400</delta>
            <gamma>0.001300</gamma>
            <iv>0.348400</iv>
            <currentValue>true</currentValue>
         </OptionGreeks>
      </Put>
   </OptionPair>
   <OptionPair>
      <Call>
         <optionCategory>STANDARD</optionCategory>
         <optionRootSymbol>IBM</optionRootSymbol>
         <timeStamp>1529431379</timeStamp>
         <adjustedFlag>false</adjustedFlag>
         <displaySymbol>IBM Aug 17 '18 $205 Call</displaySymbol>
         <optionType>CALL</optionType>
         <strikePrice>205.0</strikePrice>
         <symbol>IBM</symbol>
         <bid>0.0</bid>
         <ask>0.0</ask>
         <bidSize>0</bidSize>
         <askSize>0</askSize>
         <inTheMoney>n</inTheMoney>
         <volume>0</volume>
         <openInterest>0</openInterest>
         <netChange>0.0</netChange>
         <lastPrice>0.0</lastPrice>
         <quoteDetail>https://api.etrade.com/v1/market/quote/IBM:2018:8:17:CALL:205.000000</quoteDetail>
         <osiKey>IBM---180817C00205000</osiKey>
         <OptionGreeks>
            <rho>0.000800</rho>
            <vega>0.007100</vega>
            <theta>-0.001700</theta>
            <delta>0.003900</delta>
            <gamma>0.000600</gamma>
            <iv>0.327500</iv>
            <currentValue>true</currentValue>
         </OptionGreeks>
      </Call>
      <Put>
         <optionCategory>STANDARD</optionCategory>
         <optionRootSymbol>IBM</optionRootSymbol>
         <timeStamp>1529431379</timeStamp>
         <adjustedFlag>false</adjustedFlag>
         <displaySymbol>IBM Aug 17 '18 $205 Put</displaySymbol>
         <optionType>PUT</optionType>
         <strikePrice>205.0</strikePrice>
         <symbol>IBM</symbol>
         <bid>0.0</bid>
         <ask>0.0</ask>
         <bidSize>0</bidSize>
         <askSize>0</askSize>
         <inTheMoney>y</inTheMoney>
         <volume>0</volume>
         <openInterest>0</openInterest>
         <netChange>0.0</netChange>
         <lastPrice>0.0</lastPrice>
         <quoteDetail>https://api.etrade.com/v1/market/quote/IBM:2018:8:17:PUT:205.000000</quoteDetail>
         <osiKey>IBM---180817P00205000</osiKey>
         <OptionGreeks>
            <rho>-0.282200</rho>
            <vega>0.034800</vega>
            <theta>-0.008300</theta>
            <delta>-0.974900</delta>
            <gamma>0.002400</gamma>
            <iv>0.442700</iv>
            <currentValue>true</currentValue>
         </OptionGreeks>
      </Put>
   </OptionPair>
   <timeStamp>1529430420</timeStamp>
   <quoteType>DELAYED</quoteType>
   <nearPrice>200.0</nearPrice>
   <SelectedED>
      <day>17</day>
      <month>8</month>
      <year>2018</year>
   </SelectedED>
</OptionChainResponse>
  
                

Get Option Expire Dates Request URL

https://api.etrade.com/v1/market/optionexpiredate?symbol=GOOG&expiryType=ALL
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<OptionExpireDateResponse>
   <ExpirationDate>
      <year>2018</year>
      <month>6</month>
      <day>22</day>
      <expiryType>WEEKLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>6</month>
      <day>29</day>
      <expiryType>WEEKLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>7</month>
      <day>6</day>
      <expiryType>WEEKLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>7</month>
      <day>13</day>
      <expiryType>WEEKLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>7</month>
      <day>20</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>7</month>
      <day>27</day>
      <expiryType>WEEKLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>8</month>
      <day>17</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>9</month>
      <day>21</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2018</year>
      <month>12</month>
      <day>21</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2019</year>
      <month>1</month>
      <day>18</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2019</year>
      <month>6</month>
      <day>21</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
   <ExpirationDate>
      <year>2020</year>
      <month>1</month>
      <day>17</day>
      <expiryType>MONTHLY</expiryType>
   </ExpirationDate>
</OptionExpireDateResponse>