Futures Options API
getFuturesOptions
The getFuturesOptionsExpiration API provides last trade dates for options on futures contracts.
View All APIsContact Us to Get Access
Inputs
rootoptional
A symbol or code that identifies an option root.
Type
string (A sequence of characters. (example: GOOG))
Example
ZC
contractoptional
A symbol or code that identifies an options contract.
Type
string (A sequence of characters. (example: GOOG))
Example
ZCN18
symbolsoptional
A symbol or code that identifies an option. Multiple symbols separated by a comma may be used.
Type
list (A comma or semi-colon delimited string.)
Example
ZCK210C,ZCK210P
exchangeoptional
Exchange code for the marketplace where the financial instruments are listed.
Type
string (A sequence of characters. (example: GOOG))
Example
CME
typeoptional
The type of option desired, Call or Put.
Type
string (A sequence of characters. (example: GOOG))
Example
Call
expirationMonthoptional
The numeric representation of the expiration month.
Type
int (A numeric type defining a whole number. (example: 2))
Example
12
expirationDayoptional
The numeric date for of the expiration day.
Type
int (A numeric type defining a whole number. (example: 2))
Example
12
fieldsoptional
Additional fields requested.
Type
list (A comma or semi-colon delimited string.)
Example
premium,openInterest
Outputs
symbol
always returned
always returned
A symbol or code that identifies the futures contract.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
root
always returned
always returned
The root symbol for the future.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
contract
always returned
always returned
The symbol for the futures contract.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
contractName
always returned
always returned
The name of the futures contract.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
contractMonth
always returned
always returned
The month code for this option's contract.
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)
type
always returned
always returned
Either Call or Put.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
strike
always returned
always returned
The option's strike price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
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.
date
always returned
always returned
The price date.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
impliedVolatility
always returned
always returned
The estimated volatility of a security's price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
delta
always returned
always returned
The option's delta value.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
gamma
always returned
always returned
The option's gamma value.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
theta
always returned
always returned
The option's theta value.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
vega
always returned
always returned
The option's vega value.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
bid
as requested
as requested
The current bid price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
bidSize
as requested
as requested
The size (quantity) of the current bid price.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
ask
as requested
as requested
The current ask price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
askSize
as requested
as requested
The size (quantity) of the current ask price.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
open
always returned
always returned
The opening (first) price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
high
always returned
always returned
The highest traded price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
low
always returned
always returned
The lowest traded price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
last
always returned
always returned
The last price the instrument traded.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
previousClose
always returned
always returned
The last price the instrument traded.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
change
always returned
always returned
The difference between the last traded price and the previous close.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
percentChange
always returned
always returned
The percent difference between the last traded price and the previous close.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
premium
as requested
as requested
The option's premium.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
flag
as requested
as requested
The option's settled flag.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
volume
always returned
always returned
The trade volume of the option.
integer
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
openInterest
as requested
as requested
Open interest of the option
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
settlement
as requested
as requested
The settlement price determined by the exchange.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
previousSettlement
as requested
as requested
The settlement price for the previous session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
extendedSymbol
as requested
as requested
The new barchart options symbol.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
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/getFuturesOptions.json?apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesOptions.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Response
{
"status": {
"code": "204",
"message": "No options were found for ZCN18. The options for this contract may have expired. Please request another contract."
},
"results": []
}
XML
GET
GET https://ondemand.websol.barchart.com/getFuturesOptions.xml?apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesOptions.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Response
<?xml version="1.0" encoding="utf-8"?>
<getFuturesOptions>
<status>
<code>204</code>
<message>No options were found for ZCN18. The options for this contract may have expired. Please request another contract.</message>
</status>
</getFuturesOptions>
CSV
GET
GET https://ondemand.websol.barchart.com/getFuturesOptions.csv?apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesOptions.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&contract=ZCN18&symbols=ZCK210C%2CZCK210P&exchange=CME&type=Call&fields=premium%2CopenInterest
Response
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'root' => 'ZC',
'contract' => 'ZCN18',
'symbols' => 'ZCK210C,ZCK210P',
'exchange' => 'CME',
'type' => 'Call',
'fields' => 'premium,openInterest',
];
$result = $ondemand->getFuturesOptions($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.getFuturesOptions("YOUR_API_KEY", "ZC", "ZCN18", "ZCK210C,ZCK210P", "CME", "Call", "premium,openInterest")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getFuturesOptions('YOUR_API_KEY', 'ZC', 'ZCN18', 'ZCK210C,ZCK210P', 'CME', 'Call', 'premium,openInterest');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getFuturesOptions('YOUR_API_KEY', 'ZC', 'ZCN18', 'ZCK210C,ZCK210P', 'CME', 'Call', 'premium,openInterest')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getFuturesOptions,
message: {
apikey: 'YOUR_API_KEY',
root: 'ZC',
contract: 'ZCN18',
symbols: 'ZCK210C,ZCK210P',
exchange: 'CME',
type: 'Call',
fields: 'premium,openInterest',
}
)
response.body