Futures Options Expirations API

getFuturesOptionsExpirations

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

All APIs

Contact Us to Get Access

By submitting this form you are opting in to receive email communications from Barchart for related product, service or company information, updates and announcements. You can unsubscribe at anytime. View our Privacy Policy.

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": "BC1Q20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "BC2Q20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "BC4Q20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "BCDF21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDG21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDH21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDJ21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDK21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDM21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDN21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDQ21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDU20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BCDU21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDV20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDX20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BCDZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "BZ2Z20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BZ8Z20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BZCU20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "BZCZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "ZCH21",
            "exchange": "CBOT",
            "underlyingContract": "ZCH21",
            "expirationDate": "2021-02-19"
        },
        {
            "symbol": "ZCH22",
            "exchange": "CBOT",
            "underlyingContract": "ZCH22",
            "expirationDate": "2022-02-18"
        },
        {
            "symbol": "ZCK21",
            "exchange": "CBOT",
            "underlyingContract": "ZCK21",
            "expirationDate": "2021-04-23"
        },
        {
            "symbol": "ZCN21",
            "exchange": "CBOT",
            "underlyingContract": "ZCN21",
            "expirationDate": "2021-06-25"
        },
        {
            "symbol": "ZCN22",
            "exchange": "CBOT",
            "underlyingContract": "ZCN22",
            "expirationDate": "2022-06-24"
        },
        {
            "symbol": "ZCU20",
            "exchange": "CBOT",
            "underlyingContract": "ZCU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "ZCU21",
            "exchange": "CBOT",
            "underlyingContract": "ZCU21",
            "expirationDate": "2021-08-27"
        },
        {
            "symbol": "ZCV20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "ZCX20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "ZCZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "ZCZ21",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ21",
            "expirationDate": "2021-11-26"
        },
        {
            "symbol": "ZCZ22",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ22",
            "expirationDate": "2022-11-25"
        },
        {
            "symbol": "BS2X20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BS3X20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BSZX20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BYDF21",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-22"
        },
        {
            "symbol": "BYDG21",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-22"
        },
        {
            "symbol": "BYDU20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "BYDV20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-22"
        },
        {
            "symbol": "BYDX20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-22"
        },
        {
            "symbol": "BYDZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-22"
        },
        {
            "symbol": "ZSF21",
            "exchange": "CBOT",
            "underlyingContract": "ZSF21",
            "expirationDate": "2020-12-24"
        },
        {
            "symbol": "ZSH21",
            "exchange": "CBOT",
            "underlyingContract": "ZSH21",
            "expirationDate": "2021-02-19"
        },
        {
            "symbol": "ZSK21",
            "exchange": "CBOT",
            "underlyingContract": "ZSK21",
            "expirationDate": "2021-04-23"
        },
        {
            "symbol": "ZSN21",
            "exchange": "CBOT",
            "underlyingContract": "ZSN21",
            "expirationDate": "2021-06-25"
        },
        {
            "symbol": "ZSQ21",
            "exchange": "CBOT",
            "underlyingContract": "ZSQ21",
            "expirationDate": "2021-07-23"
        },
        {
            "symbol": "ZSU20",
            "exchange": "CBOT",
            "underlyingContract": "ZSU20",
            "expirationDate": "2020-08-21"
        },
        {
            "symbol": "ZSU21",
            "exchange": "CBOT",
            "underlyingContract": "ZSU21",
            "expirationDate": "2021-08-27"
        },
        {
            "symbol": "ZSV20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "ZSX20",
            "exchange": "CBOT",
            "underlyingContract": "ZSX20",
            "expirationDate": "2020-10-23"
        },
        {
            "symbol": "ZSX21",
            "exchange": "CBOT",
            "underlyingContract": "ZSX21",
            "expirationDate": "2021-10-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>BC1Q20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>BC2Q20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>BC4Q20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>BCDF21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDG21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDH21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDJ21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDK21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDM21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDN21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDQ21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BCDU21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDV20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BCDZ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ21</underlyingContract>
   <expirationDate>2021-11-26</expirationDate>
  </item>
  <item>
   <symbol>BZ2Z20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BZ8Z20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BZCU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>BZCZ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>ZCH21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH21</underlyingContract>
   <expirationDate>2021-02-19</expirationDate>
  </item>
  <item>
   <symbol>ZCH22</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH22</underlyingContract>
   <expirationDate>2022-02-18</expirationDate>
  </item>
  <item>
   <symbol>ZCK21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCK21</underlyingContract>
   <expirationDate>2021-04-23</expirationDate>
  </item>
  <item>
   <symbol>ZCN21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN21</underlyingContract>
   <expirationDate>2021-06-25</expirationDate>
  </item>
  <item>
   <symbol>ZCN22</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN22</underlyingContract>
   <expirationDate>2022-06-24</expirationDate>
  </item>
  <item>
   <symbol>ZCU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>ZCU21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU21</underlyingContract>
   <expirationDate>2021-08-27</expirationDate>
  </item>
  <item>
   <symbol>ZCV20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>ZCX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</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>ZCZ22</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ22</underlyingContract>
   <expirationDate>2022-11-25</expirationDate>
  </item>
  <item>
   <symbol>BS2X20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BS3X20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BSZX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BYDF21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-22</expirationDate>
  </item>
  <item>
   <symbol>BYDG21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-22</expirationDate>
  </item>
  <item>
   <symbol>BYDU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>BYDV20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-22</expirationDate>
  </item>
  <item>
   <symbol>BYDX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-22</expirationDate>
  </item>
  <item>
   <symbol>BYDZ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-22</expirationDate>
  </item>
  <item>
   <symbol>ZSF21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF21</underlyingContract>
   <expirationDate>2020-12-24</expirationDate>
  </item>
  <item>
   <symbol>ZSH21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSH21</underlyingContract>
   <expirationDate>2021-02-19</expirationDate>
  </item>
  <item>
   <symbol>ZSK21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSK21</underlyingContract>
   <expirationDate>2021-04-23</expirationDate>
  </item>
  <item>
   <symbol>ZSN21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN21</underlyingContract>
   <expirationDate>2021-06-25</expirationDate>
  </item>
  <item>
   <symbol>ZSQ21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSQ21</underlyingContract>
   <expirationDate>2021-07-23</expirationDate>
  </item>
  <item>
   <symbol>ZSU20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSU20</underlyingContract>
   <expirationDate>2020-08-21</expirationDate>
  </item>
  <item>
   <symbol>ZSU21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSU21</underlyingContract>
   <expirationDate>2021-08-27</expirationDate>
  </item>
  <item>
   <symbol>ZSV20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>ZSX20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX20</underlyingContract>
   <expirationDate>2020-10-23</expirationDate>
  </item>
  <item>
   <symbol>ZSX21</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX21</underlyingContract>
   <expirationDate>2021-10-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
"BC1Q20","CBOT","ZCU20","2020-08-21"
"BC2Q20","CBOT","ZCU20","2020-08-21"
"BC4Q20","CBOT","ZCU20","2020-08-21"
"BCDF21","CBOT","ZCZ21","2021-11-26"
"BCDG21","CBOT","ZCZ21","2021-11-26"
"BCDH21","CBOT","ZCZ21","2021-11-26"
"BCDJ21","CBOT","ZCZ21","2021-11-26"
"BCDK21","CBOT","ZCZ21","2021-11-26"
"BCDM21","CBOT","ZCZ21","2021-11-26"
"BCDN21","CBOT","ZCZ21","2021-11-26"
"BCDQ21","CBOT","ZCZ21","2021-11-26"
"BCDU20","CBOT","ZCZ20","2020-11-20"
"BCDU21","CBOT","ZCZ21","2021-11-26"
"BCDV20","CBOT","ZCZ21","2021-11-26"
"BCDX20","CBOT","ZCZ21","2021-11-26"
"BCDZ20","CBOT","ZCZ21","2021-11-26"
"BZ2Z20","CBOT","ZCZ20","2020-11-20"
"BZ8Z20","CBOT","ZCZ20","2020-11-20"
"BZCU20","CBOT","ZCU20","2020-08-21"
"BZCZ20","CBOT","ZCZ20","2020-11-20"
"ZCH21","CBOT","ZCH21","2021-02-19"
"ZCH22","CBOT","ZCH22","2022-02-18"
"ZCK21","CBOT","ZCK21","2021-04-23"
"ZCN21","CBOT","ZCN21","2021-06-25"
"ZCN22","CBOT","ZCN22","2022-06-24"
"ZCU20","CBOT","ZCU20","2020-08-21"
"ZCU21","CBOT","ZCU21","2021-08-27"
"ZCV20","CBOT","ZCZ20","2020-11-20"
"ZCX20","CBOT","ZCZ20","2020-11-20"
"ZCZ20","CBOT","ZCZ20","2020-11-20"
"ZCZ21","CBOT","ZCZ21","2021-11-26"
"ZCZ22","CBOT","ZCZ22","2022-11-25"
"BS2X20","CBOT","ZSX20","2020-10-23"
"BS3X20","CBOT","ZSX20","2020-10-23"
"BSZX20","CBOT","ZSX20","2020-10-23"
"BYDF21","CBOT","ZSX21","2021-10-22"
"BYDG21","CBOT","ZSX21","2021-10-22"
"BYDU20","CBOT","ZSX20","2020-10-23"
"BYDV20","CBOT","ZSX21","2021-10-22"
"BYDX20","CBOT","ZSX21","2021-10-22"
"BYDZ20","CBOT","ZSX21","2021-10-22"
"ZSF21","CBOT","ZSF21","2020-12-24"
"ZSH21","CBOT","ZSH21","2021-02-19"
"ZSK21","CBOT","ZSK21","2021-04-23"
"ZSN21","CBOT","ZSN21","2021-06-25"
"ZSQ21","CBOT","ZSQ21","2021-07-23"
"ZSU20","CBOT","ZSU20","2020-08-21"
"ZSU21","CBOT","ZSU21","2021-08-27"
"ZSV20","CBOT","ZSX20","2020-10-23"
"ZSX20","CBOT","ZSX20","2020-10-23"
"ZSX21","CBOT","ZSX21","2021-10-22"


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