Skip to login Skip to main content
  • 1-855-880-2559
  • Open 24/7

Ally Invest API Documentation

Build your application to connect to our investment platform and the 250,000 traders connected to it.

GET/POST market/options/search{.format}

Description

This call will return the full list of available option strikes for a given symbol. While this request type is GET, POST can also be used and is recommended for longer queries.

Description
Authentication Required
Yes OAuth 1.0a
URI Parameters
format a response format, default is xml (See Response Structure )
Query Parameters
symbol
a single symbol for which options are traded
query
a query string composed using fields and operators. Option queries are composed of three elements: a condition, an operator and a value in the format field-operator:value (i.e., xyear-eq:2012). Multiple conditions can be joined together using the AND operator (i.e., xyear-eq:2012 AND xmonth-eq:07). The list of valid conditions and operators are listed below. Individual conditions should be separate by a single space.
fids a comma-delimited list of data fields (i.e. fids=ask,bid,vol). The fids parameter should be used when a customized list of fields is desired. By default, all applicable data fields are returned.
Example URL
https://devapi.invest.ally.com/v1/market/options/search.xml

Special Considerations

Special Considerations
Queryable Fields
strikeprice possible values: 5 or 7.50, integers or decimals
xdate YYYYMMDD
xmonth MM
xyear YYYY
put_call possible values: put, call
unique possible values: strikeprice, xdate
Operators
lt less than
gt greater than
gte greater than or equal to
lte less than or equal to
eq equal to

Data Fields

Data Fields
Data Tag Description
ask
Ask price
ask_time
Time of latest ask
asksz
Size of latest ask (in 100's)
basis
Reported precision (quotation decimal places)
bid
Bid price
bid_time
Time of latest bid
bidsz
Size of latest bid (in 100's)
chg
Change since prior day close (cl)
chg_sign
Change sign (e, u, d) as even, up, down
chg_t
change in text format
cl previous close
contract_size
contract size for option
date
Trade date of last trade
datetime Date and time
days_to_expiration
Days until option expiration date
exch
exchange code
exch_desc
exchange description
hi
High Trade Price for the trading day
incr_vl
Volume of last trade
issue_desc
Issue description
last
Last trade price
lo Low Trade Price for the trading day
op_delivery
Option Settlement Designation – S Std N – Non Std X - NA
op_flag
Security has options (1=Yes, 0=No).
op_style Option Style – values are “A” American and “E” European
op_subclass Option class (0=Standard, 1=Leap, 3=Short Term)
opn Open trade price
pchg percentage change from prior day close
pchg_sign pchg sign, "u" for up, "d" for down
pcls Prior day close
phi Prior day high value
plo Prior day low value
popn Prior day open
pr_date Trade Date of Prior Last
pr_openinterest Prior day's open interest
prchg Prior day change
prem_mult Option premium multiplier
put_call Option type (Put or Call)
pvol Prior day total volume
rootsymbol Option root symbol
secclass Security class (0=stock, 1=option)
sesn Trading session as (pre, regular, & post)
strikeprice Option strike price (not extended by multiplier)
symbol Symbol from data provider
tcond Trade condition code – (H) Halted or (R) Resumed
timestamp Timestamp
tr_num
Number of trades since market open
tradetick Tick direction from prior trade – (e,u,d) even, up, down)
under_cusip An option's underlying cusip
undersymbol An option's underlying symbol
vl Cumulative volume
vwap Volume weighted average price
wk52hi 52 week high
wk52hidate 52 week high date
wk52lo 52 week low
wk52lodate 52 week low date
xdate Expiration date of option in the format of (YYYYMMDD)
xday Expiration day of option
xmonth Expiration month of option
xyear Expiration year of option

Request Example

GET /v1/market/options/search.xml?symbol=MSFT&query=xyear-eq%3A2013%20AND%20xmonth-eq%3A01%20AND%20strikeprice-gt%3A30 HTTP/1.1
Authorization: OAuth
    oauth_consumer_key="672e71387c0a126f4e13296ecfb2b7bc",
    oauth_nonce="cfdb7f42de425d94fbc24c11a920c33e",
    oauth_signature="Vfm148kAgBZ6azEHqds43aY2UsEg3D",
    oauth_signature_method="HMAC-SHA1",
    oauth_timestamp="1306871932",
    oauth_token="819682555b63ab8bd90a4138138e7365",
    oauth_version="1.0"
Connection: close
Host: devapi.invest.ally.com

Response Example

<?xml version="1.0" encoding="UTF-8"?>
<response id=
"-198e0f1:1365a74e50d:56f">
    <quotes>
        <quote>
            <ask>
0</ask>
            <ask_time>
00:00</ask_time>
            <asksz>
0</asksz>
            <basis>
-2</basis>
            <bid>
0</bid>
            <bid_time>
00:00</bid_time>
            <bidsz>
0</bidsz>
            <chg>
0</chg>
            <chg_sign>
e</chg_sign>
            <chg_t>
0</chg_t>
            <cl>
0</cl>
            <contract_size>
100</contract_size>
            <date>
2012-03-28</date>
            <datetime>
2012-03-28T00:00:00-04:00</datetime>
            <days_to_expiration>
297</days_to_expiration>
            <exch>
CBOE_OP</exch>
            <exch_desc>
OPRA Electronic Options</exch_desc>
            <hi>
0</hi>
            <incr_vl>
0</incr_vl>
            <issue_desc>
PUT JAN-13 $ 35.00</issue_desc>
            <last>
0</last>
            <lo>
0</lo>
            <op_delivery>
S</op_delivery>
            <op_flag>
0</op_flag>
            <op_style>
A</op_style>
            <op_subclass>
0</op_subclass>
            <opn>
0</opn>
            <pchg>
nan %</pchg>
            <pchg_sign>
e</pchg_sign>
            <pcls>
0</pcls>
            <phi>
0</phi>
            <plo>
0</plo>
            <popn>
0</popn>
            <pr_openinterest>
13,200</pr_openinterest>
            <prchg>
0</prchg>
            <prem_mult>
100</prem_mult>
            <put_call>
put</put_call>
            <pvol>
0</pvol>
            <rootsymbol>
MSFT</rootsymbol>
            <secclass>
1</secclass>
            <sesn>
regular</sesn>
            <strikeprice>
35.00</strikeprice>
            <symbol>
MSFT130119P00035000</symbol>
            <tcond>
R</tcond>
            <timestamp>
1332907200</timestamp>
            <tr_num>
0</tr_num>
            <tradetick>
e</tradetick>
            <under_cusip>
59491810</under_cusip>
            <undersymbol>
MSFT</undersymbol>
            <vl>
0</vl>
            <vwap>
0</vwap>
            <wk52hi>
0</wk52hi>
            <wk52lo>
0</wk52lo>
            <xdate>
20130119</xdate>
            <xday>
19</xday>
            <xmonth>
01</xmonth>
            <xyear>
2013</xyear>
        </quote>
        <quote>
            <ask>
0</ask>
            <ask_time>00:00</ask_time>
            <asksz>
0</asksz>
            <basis>
-2</basis>
            <bid>
0</bid>
            <bid_time>
00:00</bid_time>
            <bidsz>
0</bidsz>
            <chg>
0</chg>
            <chg_sign>
e</chg_sign>
            <chg_t>
0</chg_t>
            <cl>
0</cl>
            <contract_size>
100</contract_size>
            <date>
2012-03-28</date>
            <datetime>
2012-03-28T00:00:00-04:00</datetime>
            <days_to_expiration>
297</days_to_expiration>
            <exch>
BATS_OP</exch>
            <exch_desc>
OPRA - BATS Trading</exch_desc>
            <hi>
0</hi>
            <incr_vl>
0</incr_vl>
            <issue_desc>
PUT JAN-13 $ 35.00</issue_desc>
            <last>
0</last>
            <lo>
0</lo>
            <op_delivery>
S</op_delivery>
            <op_flag>
0</op_flag>
            <op_style>
A</op_style>
            <op_subclass>
0</op_subclass>
            <opn>
0</opn>
            <pchg>
0.000 %</pchg>
            <pchg_sign>
d</pchg_sign>
            <pcls>
4.35</pcls>
            <phi>
4.35</phi>
            <plo>
4.35</plo>
            <popn>
4.35</popn>
            <pr_date>
2012-03-26</pr_date>
            <pr_openinterest>
13,200</pr_openinterest>
            <prchg>
-0.40</prchg>
            <prem_mult>
100</prem_mult>
            <put_call>
put</put_call>
            <pvol>
2</pvol>
            <rootsymbol>
MSFT</rootsymbol>
            <secclass>
1</secclass>
            <sesn>
regular</sesn>
            <strikeprice>
35.00</strikeprice>
            <symbol>
MSFT130119P00035000</symbol>
            <tcond>
R</tcond>
            <timestamp>
1332907200</timestamp>
            <tr_num>
0</tr_num>
            <tradetick>
e</tradetick>
            <under_cusip>
59491810</under_cusip>
            <undersymbol>
MSFT</undersymbol>
            <vl>
0</vl>
            <vwap>
0</vwap>
            <wk52hi>
11.75</wk52hi>
            <wk52hidate>
20110808</wk52hidate>
            <wk52lo>
4.35</wk52lo>
            <wk52lodate>
20120326</wk52lodate>
            <xdate>
20130119</xdate>
            <xday>
19</xday>
            <xmonth>
01</xmonth>
            <xyear>
2013</xyear>
        </quote>
    </quotes>
</response>

Disclaimer:

Any mention of actual symbols are to be used for coding purposes only and do not imply a recommendation or solicitation to buy or sell a particular security or to engage in any particular investment strategy.

At the time of publication and in the preceding month, Ally Invest did not have ownership greater than 1% in any stocks mentioned here and does not have any other actual, material conflict of interest known at the time of publication.

Ally Invest did not receive compensation from a public offering or from investment banking services related to any companies mentioned here within the past 12 months, or expects to receive any in the next 3 months. Ally Invest did not engage in market making in the securities mentioned here.

Ally Invest Securities' background can be found at FINRA's BrokerCheck . Options involve risk and are not suitable for all investors.

Review the Characteristics and Risks of Standardized Options brochure before you begin trading options. Options investors may lose the entire amount of their investment in a relatively short period of time.