getFuturesOptionsExpirations API

The getFuturesOptionsExpiration API provides last trade dates for options on futures contracts.

All APIs

Contact Us to Get Access

Inputs

roots optional

A symbol or code that identifies a futures root. Multiple symbols separated by a comma may be used.

Type
list (A comma or semi-colon delimited string.) 
Example
ZC,ZS 

contracts optional

A symbol or code that identifies a futures contract. Multiple symbols separated by a comma may be used.

Type
list (A comma or semi-colon delimited string.) 
Example
ZCN14,ZCU14 

symbols optional

A symbol or code that identifies a futures option. Multiple symbols separated by a comma may be used.

Type
list (A comma or semi-colon delimited string.) 
Example
ZCK210C,ZCK210P 

Outputs

Name / Requirement
Description
Type
symbol
always returned
A symbol or code that identifies the futures symbol.
string
A sequence of characters. (example: GOOG)
exchange
always returned
The name of the exchange the instrument belongs to.
string
A sequence of characters. (example: GOOG)
underlyingContract
always returned
The contract the option belongs to.
string
A sequence of characters. (example: GOOG)
expirationDate
always returned
The expiration date.
date
A date in the format of YYYY-MM-DD.

Status Code Responses

200
OK
Success
400
Bad Request
The request was invalid, please see the message for more information.
500
Internal Server Error
Something is not working correctly, please contact support.


JSON

GET

GET https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.json?apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "BC1Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BC2X17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BC2Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BC3X17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BCDF18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDG18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDH18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDJ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDK18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDM18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDU18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BZ2Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BZ7H18",
            "exchange": "CBOT",
            "underlyingContract": "ZCH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "BZ8Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "BZCZ17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "ZCF18",
            "exchange": "CBOT",
            "underlyingContract": "ZCH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "ZCG18",
            "exchange": "CBOT",
            "underlyingContract": "ZCH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "ZCH18",
            "exchange": "CBOT",
            "underlyingContract": "ZCH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "ZCH19",
            "exchange": "CBOT",
            "underlyingContract": "ZCH19",
            "expirationDate": "2019-02-22"
        },
        {
            "symbol": "ZCK18",
            "exchange": "CBOT",
            "underlyingContract": "ZCK18",
            "expirationDate": "2018-04-20"
        },
        {
            "symbol": "ZCK19",
            "exchange": "CBOT",
            "underlyingContract": "ZCK19",
            "expirationDate": "2019-04-26"
        },
        {
            "symbol": "ZCN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZCN19",
            "exchange": "CBOT",
            "underlyingContract": "ZCN19",
            "expirationDate": "2019-06-21"
        },
        {
            "symbol": "ZCU18",
            "exchange": "CBOT",
            "underlyingContract": "ZCU18",
            "expirationDate": "2018-08-24"
        },
        {
            "symbol": "ZCZ17",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ17",
            "expirationDate": "2017-11-24"
        },
        {
            "symbol": "ZCZ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "ZCZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BS5F18",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        },
        {
            "symbol": "BY1Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        },
        {
            "symbol": "BY2Z17",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        },
        {
            "symbol": "BY3X17",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        },
        {
            "symbol": "BYDF18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDF19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDG18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDH18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDJ18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDK18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDM18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDM19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDN18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDU18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "ZSF18",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        },
        {
            "symbol": "ZSF19",
            "exchange": "CBOT",
            "underlyingContract": "ZSF19",
            "expirationDate": "2018-12-21"
        },
        {
            "symbol": "ZSG18",
            "exchange": "CBOT",
            "underlyingContract": "ZSH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "ZSH18",
            "exchange": "CBOT",
            "underlyingContract": "ZSH18",
            "expirationDate": "2018-02-23"
        },
        {
            "symbol": "ZSK18",
            "exchange": "CBOT",
            "underlyingContract": "ZSK18",
            "expirationDate": "2018-04-20"
        },
        {
            "symbol": "ZSN18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZSQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZSQ18",
            "expirationDate": "2018-07-27"
        },
        {
            "symbol": "ZSU18",
            "exchange": "CBOT",
            "underlyingContract": "ZSU18",
            "expirationDate": "2018-08-24"
        },
        {
            "symbol": "ZSX18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "ZSX19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "ZSZ17",
            "exchange": "CBOT",
            "underlyingContract": "ZSF18",
            "expirationDate": "2017-12-22"
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.xml?apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P

Response


<?xml version="1.0" encoding="utf-8"?>
 <getFuturesOptionsExpirations>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>BC1Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BC2X17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BC2Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BC3X17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BCDF18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDG18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDH18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDJ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDK18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDM18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BZ2Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BZ7H18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>BZ8Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>BZCZ17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>ZCF18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>ZCG18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>ZCH18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>ZCH19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH19</underlyingContract>
   <expirationDate>2019-02-22</expirationDate>
  </item>
  <item>
   <symbol>ZCK18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCK18</underlyingContract>
   <expirationDate>2018-04-20</expirationDate>
  </item>
  <item>
   <symbol>ZCK19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCK19</underlyingContract>
   <expirationDate>2019-04-26</expirationDate>
  </item>
  <item>
   <symbol>ZCN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>ZCN19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN19</underlyingContract>
   <expirationDate>2019-06-21</expirationDate>
  </item>
  <item>
   <symbol>ZCU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU18</underlyingContract>
   <expirationDate>2018-08-24</expirationDate>
  </item>
  <item>
   <symbol>ZCZ17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ17</underlyingContract>
   <expirationDate>2017-11-24</expirationDate>
  </item>
  <item>
   <symbol>ZCZ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>ZCZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BS5F18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
  <item>
   <symbol>BY1Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
  <item>
   <symbol>BY2Z17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
  <item>
   <symbol>BY3X17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
  <item>
   <symbol>BYDF18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDF19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDG18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDH18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDJ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDK18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDM18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDM19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>ZSF18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
  <item>
   <symbol>ZSF19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF19</underlyingContract>
   <expirationDate>2018-12-21</expirationDate>
  </item>
  <item>
   <symbol>ZSG18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>ZSH18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSH18</underlyingContract>
   <expirationDate>2018-02-23</expirationDate>
  </item>
  <item>
   <symbol>ZSK18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSK18</underlyingContract>
   <expirationDate>2018-04-20</expirationDate>
  </item>
  <item>
   <symbol>ZSN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>ZSQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSQ18</underlyingContract>
   <expirationDate>2018-07-27</expirationDate>
  </item>
  <item>
   <symbol>ZSU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSU18</underlyingContract>
   <expirationDate>2018-08-24</expirationDate>
  </item>
  <item>
   <symbol>ZSX18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>ZSX19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>ZSZ17</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF18</underlyingContract>
   <expirationDate>2017-12-22</expirationDate>
  </item>
 </getFuturesOptionsExpirations>

CSV

GET

GET https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.csv?apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesOptionsExpirations.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&roots=ZC%2CZS&contracts=ZCN14%2CZCU14&symbols=ZCK210C%2CZCK210P

Response

symbol,exchange,underlyingContract,expirationDate
"BC1Z17","CBOT","ZCZ17","2017-11-24"
"BC2X17","CBOT","ZCZ17","2017-11-24"
"BC2Z17","CBOT","ZCZ17","2017-11-24"
"BC3X17","CBOT","ZCZ17","2017-11-24"
"BCDF18","CBOT","ZCZ18","2018-11-23"
"BCDG18","CBOT","ZCZ18","2018-11-23"
"BCDH18","CBOT","ZCZ18","2018-11-23"
"BCDJ18","CBOT","ZCZ18","2018-11-23"
"BCDK18","CBOT","ZCZ18","2018-11-23"
"BCDM18","CBOT","ZCZ18","2018-11-23"
"BCDN18","CBOT","ZCZ18","2018-11-23"
"BCDQ18","CBOT","ZCZ18","2018-11-23"
"BCDU18","CBOT","ZCZ18","2018-11-23"
"BCDU19","CBOT","ZCZ19","2019-11-22"
"BZ2Z17","CBOT","ZCZ17","2017-11-24"
"BZ7H18","CBOT","ZCH18","2018-02-23"
"BZ8Z17","CBOT","ZCZ17","2017-11-24"
"BZCZ17","CBOT","ZCZ17","2017-11-24"
"ZCF18","CBOT","ZCH18","2018-02-23"
"ZCG18","CBOT","ZCH18","2018-02-23"
"ZCH18","CBOT","ZCH18","2018-02-23"
"ZCH19","CBOT","ZCH19","2019-02-22"
"ZCK18","CBOT","ZCK18","2018-04-20"
"ZCK19","CBOT","ZCK19","2019-04-26"
"ZCN18","CBOT","ZCN18","2018-06-22"
"ZCN19","CBOT","ZCN19","2019-06-21"
"ZCU18","CBOT","ZCU18","2018-08-24"
"ZCZ17","CBOT","ZCZ17","2017-11-24"
"ZCZ18","CBOT","ZCZ18","2018-11-23"
"ZCZ19","CBOT","ZCZ19","2019-11-22"
"BS5F18","CBOT","ZSF18","2017-12-22"
"BY1Z17","CBOT","ZSF18","2017-12-22"
"BY2Z17","CBOT","ZSF18","2017-12-22"
"BY3X17","CBOT","ZSF18","2017-12-22"
"BYDF18","CBOT","ZSX18","2018-10-26"
"BYDF19","CBOT","ZSX19","2019-10-25"
"BYDG18","CBOT","ZSX18","2018-10-26"
"BYDH18","CBOT","ZSX18","2018-10-26"
"BYDJ18","CBOT","ZSX18","2018-10-26"
"BYDK18","CBOT","ZSX18","2018-10-26"
"BYDM18","CBOT","ZSX18","2018-10-26"
"BYDM19","CBOT","ZSX19","2019-10-25"
"BYDN18","CBOT","ZSX18","2018-10-26"
"BYDQ18","CBOT","ZSX18","2018-10-26"
"BYDU18","CBOT","ZSX18","2018-10-26"
"ZSF18","CBOT","ZSF18","2017-12-22"
"ZSF19","CBOT","ZSF19","2018-12-21"
"ZSG18","CBOT","ZSH18","2018-02-23"
"ZSH18","CBOT","ZSH18","2018-02-23"
"ZSK18","CBOT","ZSK18","2018-04-20"
"ZSN18","CBOT","ZSN18","2018-06-22"
"ZSQ18","CBOT","ZSQ18","2018-07-27"
"ZSU18","CBOT","ZSU18","2018-08-24"
"ZSX18","CBOT","ZSX18","2018-10-26"
"ZSX19","CBOT","ZSX19","2019-10-25"
"ZSZ17","CBOT","ZSF18","2017-12-22"


PHP

<?php

$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');

$params = [
    'roots' => 'ZC,ZS',
    'contracts' => 'ZCN14,ZCU14',
    'symbols' => 'ZCK210C,ZCK210P',
];

$result = $ondemand->getFuturesOptionsExpirations($params);
var_dump($result);

Classic ASP

Dim ondemand
Dim result

Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://ondemand.websol.barchart.com/service?wsdl")

Set result = ondemand.getFuturesOptionsExpirations("ZC,ZS", "ZCN14,ZCU14", "ZCK210C,ZCK210P")

Perl

use SOAP::Lite;
use SOAP::WSDL;

my $ondemand = SOAP::Lite
    -> service('https://ondemand.websol.barchart.com/service?wsdl');

my $result = $ondemand->getFuturesOptionsExpirations('ZC,ZS', 'ZCN14,ZCU14', 'ZCK210C,ZCK210P');

print $result;

Python

from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')

result = client.service.getFuturesOptionsExpirations('ZC,ZS', 'ZCN14,ZCU14', 'ZCK210C,ZCK210P')

print result

Ruby

require 'savon'

ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')

response = ondemand.call(
    :getFuturesOptionsExpirations,
    message: {
        roots: 'ZC,ZS',
        contracts: 'ZCN14,ZCU14',
        symbols: 'ZCK210C,ZCK210P',
    }
)

response.body