Futures Options Expirations API

getFuturesOptionsExpirations

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": "BC1Q19",
            "exchange": "CBOT",
            "underlyingContract": "ZCU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "BCDF20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDG20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDH20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDJ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDK20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDM20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDN20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDQ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDU20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDV19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDX19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BZ2Z19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BZ6N20",
            "exchange": "CBOT",
            "underlyingContract": "ZCN20",
            "expirationDate": "2020-06-26"
        },
        {
            "symbol": "BZ8Z19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BZCU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "BZCZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "ZCH20",
            "exchange": "CBOT",
            "underlyingContract": "ZCH20",
            "expirationDate": "2020-02-21"
        },
        {
            "symbol": "ZCK20",
            "exchange": "CBOT",
            "underlyingContract": "ZCK20",
            "expirationDate": "2020-04-24"
        },
        {
            "symbol": "ZCN20",
            "exchange": "CBOT",
            "underlyingContract": "ZCN20",
            "expirationDate": "2020-06-26"
        },
        {
            "symbol": "ZCN21",
            "exchange": "CBOT",
            "underlyingContract": "ZCN21",
            "expirationDate": "2021-06-25"
        },
        {
            "symbol": "ZCQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "ZCU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "ZCU20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "ZCV19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "ZCZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "ZCZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "ZCZ21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BS1X19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BS2X19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BS3X19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BSZU19",
            "exchange": "CBOT",
            "underlyingContract": "ZSU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "BY1Q19",
            "exchange": "CBOT",
            "underlyingContract": "ZSQ19",
            "expirationDate": "2019-07-26"
        },
        {
            "symbol": "BYDQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDU19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDV19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BYDX19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BYDZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "ZSF20",
            "exchange": "CBOT",
            "underlyingContract": "ZSF20",
            "expirationDate": "2019-12-27"
        },
        {
            "symbol": "ZSH20",
            "exchange": "CBOT",
            "underlyingContract": "ZSH20",
            "expirationDate": "2020-02-21"
        },
        {
            "symbol": "ZSK20",
            "exchange": "CBOT",
            "underlyingContract": "ZSK20",
            "expirationDate": "2020-04-24"
        },
        {
            "symbol": "ZSN20",
            "exchange": "CBOT",
            "underlyingContract": "ZSN20",
            "expirationDate": "2020-06-26"
        },
        {
            "symbol": "ZSQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZSQ19",
            "expirationDate": "2019-07-26"
        },
        {
            "symbol": "ZSQ20",
            "exchange": "CBOT",
            "underlyingContract": "ZSQ20",
            "expirationDate": "2020-07-24"
        },
        {
            "symbol": "ZSU19",
            "exchange": "CBOT",
            "underlyingContract": "ZSU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "ZSV19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "ZSX19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "ZSX20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        }
    ]
}

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>BC1Q19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>BCDF20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDG20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDH20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDJ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDK20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDM20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDN20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BCDQ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BCDU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDV19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDX19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BZ2Z19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BZ6N20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN20</underlyingContract>
   <expirationDate>2020-06-26</expirationDate>
  </item>
  <item>
   <symbol>BZ8Z19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BZCU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>BZCZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>ZCH20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH20</underlyingContract>
   <expirationDate>2020-02-21</expirationDate>
  </item>
  <item>
   <symbol>ZCK20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCK20</underlyingContract>
   <expirationDate>2020-04-24</expirationDate>
  </item>
  <item>
   <symbol>ZCN20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN20</underlyingContract>
   <expirationDate>2020-06-26</expirationDate>
  </item>
  <item>
   <symbol>ZCN21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN21</underlyingContract>
   <expirationDate>2021-06-25</expirationDate>
  </item>
  <item>
   <symbol>ZCQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>ZCU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>ZCU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>ZCV19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>ZCZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>ZCZ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>ZCZ21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BS1X19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BS2X19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BS3X19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BSZU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>BY1Q19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSQ19</underlyingContract>
   <expirationDate>2019-07-26</expirationDate>
  </item>
  <item>
   <symbol>BYDQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDV19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BYDX19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BYDZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>ZSF20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF20</underlyingContract>
   <expirationDate>2019-12-27</expirationDate>
  </item>
  <item>
   <symbol>ZSH20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSH20</underlyingContract>
   <expirationDate>2020-02-21</expirationDate>
  </item>
  <item>
   <symbol>ZSK20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSK20</underlyingContract>
   <expirationDate>2020-04-24</expirationDate>
  </item>
  <item>
   <symbol>ZSN20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN20</underlyingContract>
   <expirationDate>2020-06-26</expirationDate>
  </item>
  <item>
   <symbol>ZSQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSQ19</underlyingContract>
   <expirationDate>2019-07-26</expirationDate>
  </item>
  <item>
   <symbol>ZSQ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSQ20</underlyingContract>
   <expirationDate>2020-07-24</expirationDate>
  </item>
  <item>
   <symbol>ZSU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSU19</underlyingContract>
   <expirationDate>2019-08-23</expirationDate>
  </item>
  <item>
   <symbol>ZSV19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>ZSX19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>ZSX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</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
"BC1Q19","CBOT","ZCU19","2019-08-23"
"BCDF20","CBOT","ZCZ20","2020-11-20"
"BCDG20","CBOT","ZCZ20","2020-11-20"
"BCDH20","CBOT","ZCZ20","2020-11-20"
"BCDJ20","CBOT","ZCZ20","2020-11-20"
"BCDK20","CBOT","ZCZ20","2020-11-20"
"BCDM20","CBOT","ZCZ20","2020-11-20"
"BCDN20","CBOT","ZCZ20","2020-11-20"
"BCDQ19","CBOT","ZCZ19","2019-11-22"
"BCDQ20","CBOT","ZCZ20","2020-11-20"
"BCDU19","CBOT","ZCZ19","2019-11-22"
"BCDU20","CBOT","ZCZ20","2020-11-20"
"BCDV19","CBOT","ZCZ20","2020-11-20"
"BCDX19","CBOT","ZCZ20","2020-11-20"
"BCDZ19","CBOT","ZCZ20","2020-11-20"
"BZ2Z19","CBOT","ZCZ19","2019-11-22"
"BZ6N20","CBOT","ZCN20","2020-06-26"
"BZ8Z19","CBOT","ZCZ19","2019-11-22"
"BZCU19","CBOT","ZCU19","2019-08-23"
"BZCZ19","CBOT","ZCZ19","2019-11-22"
"ZCH20","CBOT","ZCH20","2020-02-21"
"ZCK20","CBOT","ZCK20","2020-04-24"
"ZCN20","CBOT","ZCN20","2020-06-26"
"ZCN21","CBOT","ZCN21","2021-06-25"
"ZCQ19","CBOT","ZCU19","2019-08-23"
"ZCU19","CBOT","ZCU19","2019-08-23"
"ZCU20","CBOT","ZCU20","2020-08-21"
"ZCV19","CBOT","ZCZ19","2019-11-22"
"ZCZ19","CBOT","ZCZ19","2019-11-22"
"ZCZ20","CBOT","ZCZ20","2020-11-20"
"ZCZ21","CBOT","ZCZ21","2021-11-26"
"BS1X19","CBOT","ZSX19","2019-10-25"
"BS2X19","CBOT","ZSX19","2019-10-25"
"BS3X19","CBOT","ZSX19","2019-10-25"
"BSZU19","CBOT","ZSU19","2019-08-23"
"BY1Q19","CBOT","ZSQ19","2019-07-26"
"BYDQ19","CBOT","ZSX19","2019-10-25"
"BYDU19","CBOT","ZSX19","2019-10-25"
"BYDV19","CBOT","ZSX20","2020-10-23"
"BYDX19","CBOT","ZSX20","2020-10-23"
"BYDZ19","CBOT","ZSX20","2020-10-23"
"ZSF20","CBOT","ZSF20","2019-12-27"
"ZSH20","CBOT","ZSH20","2020-02-21"
"ZSK20","CBOT","ZSK20","2020-04-24"
"ZSN20","CBOT","ZSN20","2020-06-26"
"ZSQ19","CBOT","ZSQ19","2019-07-26"
"ZSQ20","CBOT","ZSQ20","2020-07-24"
"ZSU19","CBOT","ZSU19","2019-08-23"
"ZSV19","CBOT","ZSX19","2019-10-25"
"ZSX19","CBOT","ZSX19","2019-10-25"
"ZSX20","CBOT","ZSX20","2020-10-23"


PHP

<?php

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

$params = [
    'apikey' => 'YOUR_API_KEY',
    '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("YOUR_API_KEY", "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('YOUR_API_KEY', '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('YOUR_API_KEY', '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: {
        apikey: 'YOUR_API_KEY',
        roots: 'ZC,ZS',
        contracts: 'ZCN14,ZCU14',
        symbols: 'ZCK210C,ZCK210P',
    }
)

response.body