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": "BC1M18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BC2M18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BC3K18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BCDF19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDH19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDM18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDN19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCDU18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BCDU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BCWN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BCWZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "BZ2Z18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BZ6N18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BZ8Z18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "BZCN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BZCU18",
            "exchange": "CBOT",
            "underlyingContract": "ZCU18",
            "expirationDate": "2018-08-24"
        },
        {
            "symbol": "BZCZ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "ZCH19",
            "exchange": "CBOT",
            "underlyingContract": "ZCH19",
            "expirationDate": "2019-02-22"
        },
        {
            "symbol": "ZCK19",
            "exchange": "CBOT",
            "underlyingContract": "ZCK19",
            "expirationDate": "2019-04-26"
        },
        {
            "symbol": "ZCM18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZCN18",
            "exchange": "CBOT",
            "underlyingContract": "ZCN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZCN19",
            "exchange": "CBOT",
            "underlyingContract": "ZCN19",
            "expirationDate": "2019-06-21"
        },
        {
            "symbol": "ZCN20",
            "exchange": "CBOT",
            "underlyingContract": "ZCN20",
            "expirationDate": "2020-06-26"
        },
        {
            "symbol": "ZCQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCU18",
            "expirationDate": "2018-08-24"
        },
        {
            "symbol": "ZCU18",
            "exchange": "CBOT",
            "underlyingContract": "ZCU18",
            "expirationDate": "2018-08-24"
        },
        {
            "symbol": "ZCU19",
            "exchange": "CBOT",
            "underlyingContract": "ZCU19",
            "expirationDate": "2019-08-23"
        },
        {
            "symbol": "ZCZ18",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ18",
            "expirationDate": "2018-11-23"
        },
        {
            "symbol": "ZCZ19",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ19",
            "expirationDate": "2019-11-22"
        },
        {
            "symbol": "ZCZ20",
            "exchange": "CBOT",
            "underlyingContract": "ZCZ20",
            "expirationDate": "2020-11-20"
        },
        {
            "symbol": "BS1X18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BS2X18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BS6N18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BY1M18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BY3K18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "BYDF19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDG19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDH19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDJ19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDK19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "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": "BYDN19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDQ18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDQ19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "BYDU18",
            "exchange": "CBOT",
            "underlyingContract": "ZSX18",
            "expirationDate": "2018-10-26"
        },
        {
            "symbol": "BYDU19",
            "exchange": "CBOT",
            "underlyingContract": "ZSX19",
            "expirationDate": "2019-10-25"
        },
        {
            "symbol": "ZSF19",
            "exchange": "CBOT",
            "underlyingContract": "ZSF19",
            "expirationDate": "2018-12-21"
        },
        {
            "symbol": "ZSH19",
            "exchange": "CBOT",
            "underlyingContract": "ZSH19",
            "expirationDate": "2019-02-22"
        },
        {
            "symbol": "ZSK19",
            "exchange": "CBOT",
            "underlyingContract": "ZSK19",
            "expirationDate": "2019-04-26"
        },
        {
            "symbol": "ZSM18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZSN18",
            "exchange": "CBOT",
            "underlyingContract": "ZSN18",
            "expirationDate": "2018-06-22"
        },
        {
            "symbol": "ZSN19",
            "exchange": "CBOT",
            "underlyingContract": "ZSN19",
            "expirationDate": "2019-06-21"
        },
        {
            "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"
        }
    ]
}

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>BC1M18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BC2M18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BC3K18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BCDF19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BCDH19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</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>BCDN19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BCDQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BCDQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</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>BCWN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BCWZ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ19</underlyingContract>
   <expirationDate>2019-11-22</expirationDate>
  </item>
  <item>
   <symbol>BZ2Z18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BZ6N18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BZ8Z18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>BZCN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BZCU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU18</underlyingContract>
   <expirationDate>2018-08-24</expirationDate>
  </item>
  <item>
   <symbol>BZCZ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ18</underlyingContract>
   <expirationDate>2018-11-23</expirationDate>
  </item>
  <item>
   <symbol>ZCH19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCH19</underlyingContract>
   <expirationDate>2019-02-22</expirationDate>
  </item>
  <item>
   <symbol>ZCK19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCK19</underlyingContract>
   <expirationDate>2019-04-26</expirationDate>
  </item>
  <item>
   <symbol>ZCM18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN18</underlyingContract>
   <expirationDate>2018-06-22</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>ZCN20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCN20</underlyingContract>
   <expirationDate>2020-06-26</expirationDate>
  </item>
  <item>
   <symbol>ZCQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU18</underlyingContract>
   <expirationDate>2018-08-24</expirationDate>
  </item>
  <item>
   <symbol>ZCU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU18</underlyingContract>
   <expirationDate>2018-08-24</expirationDate>
  </item>
  <item>
   <symbol>ZCU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCU19</underlyingContract>
   <expirationDate>2019-08-23</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>ZCZ20</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZCZ20</underlyingContract>
   <expirationDate>2020-11-20</expirationDate>
  </item>
  <item>
   <symbol>BS1X18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BS2X18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BS6N18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BY1M18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BY3K18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>BYDF19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDG19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDH19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDJ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDK19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</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>BYDN19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDQ18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDQ19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>BYDU18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX18</underlyingContract>
   <expirationDate>2018-10-26</expirationDate>
  </item>
  <item>
   <symbol>BYDU19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSX19</underlyingContract>
   <expirationDate>2019-10-25</expirationDate>
  </item>
  <item>
   <symbol>ZSF19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSF19</underlyingContract>
   <expirationDate>2018-12-21</expirationDate>
  </item>
  <item>
   <symbol>ZSH19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSH19</underlyingContract>
   <expirationDate>2019-02-22</expirationDate>
  </item>
  <item>
   <symbol>ZSK19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSK19</underlyingContract>
   <expirationDate>2019-04-26</expirationDate>
  </item>
  <item>
   <symbol>ZSM18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>ZSN18</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN18</underlyingContract>
   <expirationDate>2018-06-22</expirationDate>
  </item>
  <item>
   <symbol>ZSN19</symbol>
   <exchange>CBOT</exchange>
   <underlyingContract>ZSN19</underlyingContract>
   <expirationDate>2019-06-21</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>
 </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
"BC1M18","CBOT","ZCN18","2018-06-22"
"BC2M18","CBOT","ZCN18","2018-06-22"
"BC3K18","CBOT","ZCN18","2018-06-22"
"BCDF19","CBOT","ZCZ19","2019-11-22"
"BCDH19","CBOT","ZCZ19","2019-11-22"
"BCDM18","CBOT","ZCZ18","2018-11-23"
"BCDN18","CBOT","ZCZ18","2018-11-23"
"BCDN19","CBOT","ZCZ19","2019-11-22"
"BCDQ18","CBOT","ZCZ18","2018-11-23"
"BCDQ19","CBOT","ZCZ19","2019-11-22"
"BCDU18","CBOT","ZCZ18","2018-11-23"
"BCDU19","CBOT","ZCZ19","2019-11-22"
"BCWN18","CBOT","ZCN18","2018-06-22"
"BCWZ19","CBOT","ZCZ19","2019-11-22"
"BZ2Z18","CBOT","ZCZ18","2018-11-23"
"BZ6N18","CBOT","ZCN18","2018-06-22"
"BZ8Z18","CBOT","ZCZ18","2018-11-23"
"BZCN18","CBOT","ZCN18","2018-06-22"
"BZCU18","CBOT","ZCU18","2018-08-24"
"BZCZ18","CBOT","ZCZ18","2018-11-23"
"ZCH19","CBOT","ZCH19","2019-02-22"
"ZCK19","CBOT","ZCK19","2019-04-26"
"ZCM18","CBOT","ZCN18","2018-06-22"
"ZCN18","CBOT","ZCN18","2018-06-22"
"ZCN19","CBOT","ZCN19","2019-06-21"
"ZCN20","CBOT","ZCN20","2020-06-26"
"ZCQ18","CBOT","ZCU18","2018-08-24"
"ZCU18","CBOT","ZCU18","2018-08-24"
"ZCU19","CBOT","ZCU19","2019-08-23"
"ZCZ18","CBOT","ZCZ18","2018-11-23"
"ZCZ19","CBOT","ZCZ19","2019-11-22"
"ZCZ20","CBOT","ZCZ20","2020-11-20"
"BS1X18","CBOT","ZSX18","2018-10-26"
"BS2X18","CBOT","ZSX18","2018-10-26"
"BS6N18","CBOT","ZSN18","2018-06-22"
"BY1M18","CBOT","ZSN18","2018-06-22"
"BY3K18","CBOT","ZSN18","2018-06-22"
"BYDF19","CBOT","ZSX19","2019-10-25"
"BYDG19","CBOT","ZSX19","2019-10-25"
"BYDH19","CBOT","ZSX19","2019-10-25"
"BYDJ19","CBOT","ZSX19","2019-10-25"
"BYDK19","CBOT","ZSX19","2019-10-25"
"BYDM18","CBOT","ZSX18","2018-10-26"
"BYDM19","CBOT","ZSX19","2019-10-25"
"BYDN18","CBOT","ZSX18","2018-10-26"
"BYDN19","CBOT","ZSX19","2019-10-25"
"BYDQ18","CBOT","ZSX18","2018-10-26"
"BYDQ19","CBOT","ZSX19","2019-10-25"
"BYDU18","CBOT","ZSX18","2018-10-26"
"BYDU19","CBOT","ZSX19","2019-10-25"
"ZSF19","CBOT","ZSF19","2018-12-21"
"ZSH19","CBOT","ZSH19","2019-02-22"
"ZSK19","CBOT","ZSK19","2019-04-26"
"ZSM18","CBOT","ZSN18","2018-06-22"
"ZSN18","CBOT","ZSN18","2018-06-22"
"ZSN19","CBOT","ZSN19","2019-06-21"
"ZSQ18","CBOT","ZSQ18","2018-07-27"
"ZSU18","CBOT","ZSU18","2018-08-24"
"ZSX18","CBOT","ZSX18","2018-10-26"
"ZSX19","CBOT","ZSX19","2019-10-25"


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