Equity Option API
getEquityOptions
The getEquityOptions API provides intraday or end-of-day options data such as strike price, closing price, expiration date, volume and volatility, etc.
View All APIsunderlying_symbolsrequired
A valid equity symbol. A maximum of 5 tickers per request.
AAPL
typeoptional
The type of option desired, Call or Put.
Call
strikePriceoptional
The strike price of the option.
37.5
expirationMonthoptional
The numeric representation of the expiration month.
05
expirationDateoptional
The numeric date for of the expiration day.
2024-11-07
optionTypeoptional
Type of option to be returned. Possible Values: Monthly, Weekly. By default both are returned.
Monthly
fieldsoptional
Additional fields requested.
bid,bidSize,ask,askSize
onlyStrikesoptional
To return only the strike prices.
1
legacySymbolsoptional
Whether to return our new symbology (AAPL|20200417|250.00C) or legacy symbology (AAPL200417C00250000). Only applies to customers starting before April 13, 2020, newer customers should request the legacySymbol field.
returnActualLegacySymboloptional
Traditionally our legacy symbols have ignored ".X" or "-X" syntax from preferred equities. If you would like the options symbol to include it, please pass this parameter with a value of 1.
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
as requested
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A date in the format of YYYY-MM-DD.
always returned
A sequence of characters. (example: GOOG)
always returned
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A date in the format of YYYY-MM-DD.
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A sequence of characters. (example: GOOG)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a whole number. (example: 2)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
GET
GET https://ondemand.websol.barchart.com/getEquityOptions.json?apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptions.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Response
{
"status": {
"code": 204,
"message": "Success, but no content to return."
},
"results": []
}
GET
GET https://ondemand.websol.barchart.com/getEquityOptions.xml?apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptions.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Response
<?xml version="1.0" encoding="utf-8"?>
<getEquityOptions>
<status>
<code>204</code>
<message>Success, but no content to return.</message>
</status>
</getEquityOptions>
GET
GET https://ondemand.websol.barchart.com/getEquityOptions.csv?apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptions.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&underlying_symbols=AAPL&type=Call&expirationMonth=05&optionType=Monthly&fields=bid%2CbidSize%2Cask%2CaskSize&onlyStrikes=1&legacySymbols=0&returnActualLegacySymbol=0
Response
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'underlying_symbols' => 'AAPL',
'type' => 'Call',
'expirationMonth' => '05',
'optionType' => 'Monthly',
'fields' => 'bid,bidSize,ask,askSize',
'onlyStrikes' => '1',
'legacySymbols' => '0',
'returnActualLegacySymbol' => '0',
];
$result = $ondemand->getEquityOptions($params);
var_dump($result);
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.getEquityOptions("YOUR_API_KEY", "AAPL", "Call", "05", "Monthly", "bid,bidSize,ask,askSize", "1", "0", "0")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getEquityOptions('YOUR_API_KEY', 'AAPL', 'Call', '05', 'Monthly', 'bid,bidSize,ask,askSize', '1', '0', '0');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getEquityOptions('YOUR_API_KEY', 'AAPL', 'Call', '05', 'Monthly', 'bid,bidSize,ask,askSize', '1', '0', '0')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getEquityOptions,
message: {
apikey: 'YOUR_API_KEY',
underlying_symbols: 'AAPL',
type: 'Call',
expirationMonth: '05',
optionType: 'Monthly',
fields: 'bid,bidSize,ask,askSize',
onlyStrikes: '1',
legacySymbols: '0',
returnActualLegacySymbol: '0',
}
)
response.body