Futures Options Expirations API
getFuturesOptionsExpirations
The getFuturesOptionsExpiration API provides last trade dates for options on futures contracts.
View All APIsContact Us to Get Access
Inputs
rootsoptional
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
contractsoptional
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
symbolsoptional
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
symbol
always returned
always returned
A symbol or code that identifies the futures symbol.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
exchange
always returned
always returned
The name of the exchange the instrument belongs to.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
underlyingContract
always returned
always returned
The contract the option belongs to.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
expirationDate
always returned
always returned
The expiration date.
date
A date in the format of YYYY-MM-DD.
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": "ZCF25",
"exchange": "CBOT",
"underlyingContract": "ZCH25",
"expirationDate": "2024-12-27"
},
{
"symbol": "ZCG25",
"exchange": "CBOT",
"underlyingContract": "ZCH25",
"expirationDate": "2025-01-24"
},
{
"symbol": "ZCH25",
"exchange": "CBOT",
"underlyingContract": "ZCH25",
"expirationDate": "2025-02-21"
},
{
"symbol": "ZCH26",
"exchange": "CBOT",
"underlyingContract": "ZCH26",
"expirationDate": "2026-02-20"
},
{
"symbol": "ZCK25",
"exchange": "CBOT",
"underlyingContract": "ZCK25",
"expirationDate": "2025-04-25"
},
{
"symbol": "ZCK26",
"exchange": "CBOT",
"underlyingContract": "ZCK26",
"expirationDate": "2026-04-24"
},
{
"symbol": "ZCN25",
"exchange": "CBOT",
"underlyingContract": "ZCN25",
"expirationDate": "2025-06-20"
},
{
"symbol": "ZCN26",
"exchange": "CBOT",
"underlyingContract": "ZCN26",
"expirationDate": "2026-06-26"
},
{
"symbol": "ZCU25",
"exchange": "CBOT",
"underlyingContract": "ZCU25",
"expirationDate": "2025-08-22"
},
{
"symbol": "ZCZ25",
"exchange": "CBOT",
"underlyingContract": "ZCZ25",
"expirationDate": "2025-11-21"
},
{
"symbol": "ZCZ26",
"exchange": "CBOT",
"underlyingContract": "ZCZ26",
"expirationDate": "2026-11-20"
},
{
"symbol": "ZSF25",
"exchange": "CBOT",
"underlyingContract": "ZSF25",
"expirationDate": "2024-12-27"
},
{
"symbol": "ZSF26",
"exchange": "CBOT",
"underlyingContract": "ZSF26",
"expirationDate": "2025-12-26"
},
{
"symbol": "ZSG25",
"exchange": "CBOT",
"underlyingContract": "ZSH25",
"expirationDate": "2025-01-24"
},
{
"symbol": "ZSH25",
"exchange": "CBOT",
"underlyingContract": "ZSH25",
"expirationDate": "2025-02-21"
},
{
"symbol": "ZSH26",
"exchange": "CBOT",
"underlyingContract": "ZSH26",
"expirationDate": "2026-02-20"
},
{
"symbol": "ZSK25",
"exchange": "CBOT",
"underlyingContract": "ZSK25",
"expirationDate": "2025-04-25"
},
{
"symbol": "ZSN25",
"exchange": "CBOT",
"underlyingContract": "ZSN25",
"expirationDate": "2025-06-20"
},
{
"symbol": "ZSQ25",
"exchange": "CBOT",
"underlyingContract": "ZSQ25",
"expirationDate": "2025-07-25"
},
{
"symbol": "ZSU25",
"exchange": "CBOT",
"underlyingContract": "ZSU25",
"expirationDate": "2025-08-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>ZCF25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCH25</underlyingContract>
<expirationDate>2024-12-27</expirationDate>
</item>
<item>
<symbol>ZCG25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCH25</underlyingContract>
<expirationDate>2025-01-24</expirationDate>
</item>
<item>
<symbol>ZCH25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCH25</underlyingContract>
<expirationDate>2025-02-21</expirationDate>
</item>
<item>
<symbol>ZCH26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCH26</underlyingContract>
<expirationDate>2026-02-20</expirationDate>
</item>
<item>
<symbol>ZCK25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCK25</underlyingContract>
<expirationDate>2025-04-25</expirationDate>
</item>
<item>
<symbol>ZCK26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCK26</underlyingContract>
<expirationDate>2026-04-24</expirationDate>
</item>
<item>
<symbol>ZCN25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCN25</underlyingContract>
<expirationDate>2025-06-20</expirationDate>
</item>
<item>
<symbol>ZCN26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCN26</underlyingContract>
<expirationDate>2026-06-26</expirationDate>
</item>
<item>
<symbol>ZCU25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCU25</underlyingContract>
<expirationDate>2025-08-22</expirationDate>
</item>
<item>
<symbol>ZCZ25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCZ25</underlyingContract>
<expirationDate>2025-11-21</expirationDate>
</item>
<item>
<symbol>ZCZ26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZCZ26</underlyingContract>
<expirationDate>2026-11-20</expirationDate>
</item>
<item>
<symbol>ZSF25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSF25</underlyingContract>
<expirationDate>2024-12-27</expirationDate>
</item>
<item>
<symbol>ZSF26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSF26</underlyingContract>
<expirationDate>2025-12-26</expirationDate>
</item>
<item>
<symbol>ZSG25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSH25</underlyingContract>
<expirationDate>2025-01-24</expirationDate>
</item>
<item>
<symbol>ZSH25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSH25</underlyingContract>
<expirationDate>2025-02-21</expirationDate>
</item>
<item>
<symbol>ZSH26</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSH26</underlyingContract>
<expirationDate>2026-02-20</expirationDate>
</item>
<item>
<symbol>ZSK25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSK25</underlyingContract>
<expirationDate>2025-04-25</expirationDate>
</item>
<item>
<symbol>ZSN25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSN25</underlyingContract>
<expirationDate>2025-06-20</expirationDate>
</item>
<item>
<symbol>ZSQ25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSQ25</underlyingContract>
<expirationDate>2025-07-25</expirationDate>
</item>
<item>
<symbol>ZSU25</symbol>
<exchange>CBOT</exchange>
<underlyingContract>ZSU25</underlyingContract>
<expirationDate>2025-08-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
"ZCF25","CBOT","ZCH25","2024-12-27"
"ZCG25","CBOT","ZCH25","2025-01-24"
"ZCH25","CBOT","ZCH25","2025-02-21"
"ZCH26","CBOT","ZCH26","2026-02-20"
"ZCK25","CBOT","ZCK25","2025-04-25"
"ZCK26","CBOT","ZCK26","2026-04-24"
"ZCN25","CBOT","ZCN25","2025-06-20"
"ZCN26","CBOT","ZCN26","2026-06-26"
"ZCU25","CBOT","ZCU25","2025-08-22"
"ZCZ25","CBOT","ZCZ25","2025-11-21"
"ZCZ26","CBOT","ZCZ26","2026-11-20"
"ZSF25","CBOT","ZSF25","2024-12-27"
"ZSF26","CBOT","ZSF26","2025-12-26"
"ZSG25","CBOT","ZSH25","2025-01-24"
"ZSH25","CBOT","ZSH25","2025-02-21"
"ZSH26","CBOT","ZSH26","2026-02-20"
"ZSK25","CBOT","ZSK25","2025-04-25"
"ZSN25","CBOT","ZSN25","2025-06-20"
"ZSQ25","CBOT","ZSQ25","2025-07-25"
"ZSU25","CBOT","ZSU25","2025-08-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 = ondemand.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