Equity Option History API
getEquityOptionsHistory
The getEquityOptionsHistory API allows users to get historical prices for equity options.
View All APIsContact Us to Get Access
Inputs
symbolrequired
Any valid equity options symbol.
Type
string (A sequence of characters. (example: GOOG))
Example
AAPL|20200417|250.00C
countryoptional
The country in which the options exchange is located. To help distinguish when requesting a dually listed instrument.
Type
string (A sequence of characters. (example: GOOG))
Example
US
Default
US
askbidoptional
Boolean flag field to include ask and bid data in the result.
Type
boolean (A logical type representing the truth of a value as 'true' or 'false'.)
Default
1
fieldsoptional
Additional fields requested.
Type
list (A comma or semi-colon delimited string.)
Example
settlement
Outputs
symbol
always returned
always returned
A symbol or code that identifies a equities option.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
date
always returned
always returned
Price date
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
open
always returned
always returned
Opening price of the option
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
High price of the option
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
Low price of the option
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)
close
always returned
always returned
Closing price of the option
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)
volume
always returned
always returned
Volume of the equity option
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)
openInterest
always returned
always returned
Open Interest of the option
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)
trades
always returned
always returned
Number of trades for the option
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)
ask
always returned
always returned
Ask value for the option
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
always returned
always returned
Ask size for the option
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
always returned
always returned
Bid value for the option
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
always returned
always returned
Bid size for the option
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)
settlement
as requested
as requested
The settlement 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)
volatility
as requested
as requested
The estimated volatility of the underlying stock over the period of the option.
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)
theoretical
as requested
as requested
The hypothetical value of the option.
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
as requested
as requested
Measures the sensitivity of an option's theoretical value to a change in the price of the underlying asset.
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
as requested
as requested
Measures the rate of change in the delta for each one-point increase in the underlying asset.
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
as requested
as requested
A measure of the time decay of an option, the dollar amount that an option will lose each day due to the passage of time.
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
as requested
as requested
Measures the sensitivity of the price of an option to changes in volatility.
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)
rho
as requested
as requested
The rate at which the price of a derivative changes relative to a change in the risk-free rate of interest.
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)
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/getEquityOptionsHistory.json?apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptionsHistory.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-19",
"open": 5.3,
"high": 5.3,
"low": 5.3,
"close": 5.3,
"volume": 1,
"openInterest": null,
"trades": 1,
"ask": 5,
"askSize": 20,
"bid": 4.4,
"bidSize": 23,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-20",
"open": 5.3,
"high": 5.3,
"low": 5.3,
"close": 5.3,
"volume": null,
"openInterest": 1,
"trades": 1,
"ask": 5.1,
"askSize": 26,
"bid": 4.45,
"bidSize": 21,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-21",
"open": 5.25,
"high": 5.25,
"low": 5.2,
"close": 5.2,
"volume": 4,
"openInterest": 1,
"trades": 1,
"ask": 5.45,
"askSize": 16,
"bid": 5.15,
"bidSize": 26,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-22",
"open": 5.45,
"high": 5.45,
"low": 5.3,
"close": 5.4,
"volume": 16,
"openInterest": 5,
"trades": 5,
"ask": 6,
"askSize": 1,
"bid": 4.1,
"bidSize": 10,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-23",
"open": 4.15,
"high": 4.15,
"low": 4.15,
"close": 4.15,
"volume": 3,
"openInterest": 17,
"trades": 1,
"ask": 6.05,
"askSize": 31,
"bid": 2.3,
"bidSize": 21,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-26",
"open": 4.55,
"high": 4.55,
"low": 4.55,
"close": 4.55,
"volume": 8,
"openInterest": 19,
"trades": 4,
"ask": 4.9,
"askSize": 4,
"bid": 4.55,
"bidSize": 33,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-27",
"open": 4.55,
"high": 4.55,
"low": 4.55,
"close": 4.55,
"volume": null,
"openInterest": 27,
"trades": 4,
"ask": 6.45,
"askSize": 23,
"bid": 3.9,
"bidSize": 23,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-28",
"open": 4.45,
"high": 4.45,
"low": 4.25,
"close": 4.45,
"volume": 27,
"openInterest": 27,
"trades": 5,
"ask": 4.55,
"askSize": 11,
"bid": 4.35,
"bidSize": 17,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-29",
"open": 4.45,
"high": 4.45,
"low": 4.25,
"close": 4.45,
"volume": null,
"openInterest": 48,
"trades": 5,
"ask": 5.1,
"askSize": 12,
"bid": 4.75,
"bidSize": 11,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-08-30",
"open": 4.45,
"high": 4.45,
"low": 4.25,
"close": 4.45,
"volume": null,
"openInterest": 48,
"trades": 5,
"ask": 7.2,
"askSize": 1,
"bid": 2.8,
"bidSize": 23,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-03",
"open": 4.45,
"high": 4.45,
"low": 4.25,
"close": 4.45,
"volume": null,
"openInterest": 48,
"trades": 5,
"ask": 4.7,
"askSize": 21,
"bid": 4,
"bidSize": 21,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-04",
"open": 4.7,
"high": 4.7,
"low": 4.55,
"close": 4.65,
"volume": 36,
"openInterest": 48,
"trades": 3,
"ask": 5.1,
"askSize": 30,
"bid": 4.6,
"bidSize": 15,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-05",
"open": 5.5,
"high": 5.55,
"low": 5.01,
"close": 5.15,
"volume": 28,
"openInterest": 79,
"trades": 1,
"ask": 5.35,
"askSize": 11,
"bid": 5.05,
"bidSize": 87,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-06",
"open": 5.3,
"high": 5.3,
"low": 5.2,
"close": 5.2,
"volume": 61,
"openInterest": 87,
"trades": 2,
"ask": 5.25,
"askSize": 13,
"bid": 4.75,
"bidSize": 13,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-09",
"open": 5.48,
"high": 5.48,
"low": 5.25,
"close": 5.25,
"volume": 760,
"openInterest": 116,
"trades": 10,
"ask": 7.4,
"askSize": 24,
"bid": 3,
"bidSize": 24,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-10",
"open": 4.95,
"high": 5.23,
"low": 4.95,
"close": 5.23,
"volume": 754,
"openInterest": 876,
"trades": 3,
"ask": 5.85,
"askSize": 11,
"bid": 5.5,
"bidSize": 21,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-11",
"open": 6.3,
"high": 7.35,
"low": 6.3,
"close": 7.25,
"volume": 243,
"openInterest": 1626,
"trades": 1,
"ask": 7.55,
"askSize": 19,
"bid": 7.2,
"bidSize": 5,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-12",
"open": 7.67,
"high": 8.12,
"low": 7.5,
"close": 7.92,
"volume": 7,
"openInterest": 1756,
"trades": 4,
"ask": 7.45,
"askSize": 19,
"bid": 6.7,
"bidSize": 39,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-13",
"open": 6.3,
"high": 6.5,
"low": 5.5,
"close": 6,
"volume": 31,
"openInterest": 1757,
"trades": 2,
"ask": 6.3,
"askSize": 1,
"bid": 5.5,
"bidSize": 11,
"settlement": null
},
{
"symbol": "AAPL|20200417|250.00C",
"date": "2019-09-16",
"open": 6.15,
"high": 6.15,
"low": 6.08,
"close": 6.08,
"volume": 4,
"openInterest": 1773,
"trades": 1,
"ask": 6.4,
"askSize": 22,
"bid": 5.9,
"bidSize": 23,
"settlement": null
}
]
}
XML
GET
GET https://ondemand.websol.barchart.com/getEquityOptionsHistory.xml?apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptionsHistory.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Response
<?xml version="1.0" encoding="utf-8"?>
<getEquityOptionsHistory>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-19</date>
<open>5.3</open>
<high>5.3</high>
<low>5.3</low>
<close>5.3</close>
<volume>1</volume>
<openInterest/>
<trades>1</trades>
<ask>5</ask>
<askSize>20</askSize>
<bid>4.4</bid>
<bidSize>23</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-20</date>
<open>5.3</open>
<high>5.3</high>
<low>5.3</low>
<close>5.3</close>
<volume/>
<openInterest>1</openInterest>
<trades>1</trades>
<ask>5.1</ask>
<askSize>26</askSize>
<bid>4.45</bid>
<bidSize>21</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-21</date>
<open>5.25</open>
<high>5.25</high>
<low>5.2</low>
<close>5.2</close>
<volume>4</volume>
<openInterest>1</openInterest>
<trades>1</trades>
<ask>5.45</ask>
<askSize>16</askSize>
<bid>5.15</bid>
<bidSize>26</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-22</date>
<open>5.45</open>
<high>5.45</high>
<low>5.3</low>
<close>5.4</close>
<volume>16</volume>
<openInterest>5</openInterest>
<trades>5</trades>
<ask>6</ask>
<askSize>1</askSize>
<bid>4.1</bid>
<bidSize>10</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-23</date>
<open>4.15</open>
<high>4.15</high>
<low>4.15</low>
<close>4.15</close>
<volume>3</volume>
<openInterest>17</openInterest>
<trades>1</trades>
<ask>6.05</ask>
<askSize>31</askSize>
<bid>2.3</bid>
<bidSize>21</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-26</date>
<open>4.55</open>
<high>4.55</high>
<low>4.55</low>
<close>4.55</close>
<volume>8</volume>
<openInterest>19</openInterest>
<trades>4</trades>
<ask>4.9</ask>
<askSize>4</askSize>
<bid>4.55</bid>
<bidSize>33</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-27</date>
<open>4.55</open>
<high>4.55</high>
<low>4.55</low>
<close>4.55</close>
<volume/>
<openInterest>27</openInterest>
<trades>4</trades>
<ask>6.45</ask>
<askSize>23</askSize>
<bid>3.9</bid>
<bidSize>23</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-28</date>
<open>4.45</open>
<high>4.45</high>
<low>4.25</low>
<close>4.45</close>
<volume>27</volume>
<openInterest>27</openInterest>
<trades>5</trades>
<ask>4.55</ask>
<askSize>11</askSize>
<bid>4.35</bid>
<bidSize>17</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-29</date>
<open>4.45</open>
<high>4.45</high>
<low>4.25</low>
<close>4.45</close>
<volume/>
<openInterest>48</openInterest>
<trades>5</trades>
<ask>5.1</ask>
<askSize>12</askSize>
<bid>4.75</bid>
<bidSize>11</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-08-30</date>
<open>4.45</open>
<high>4.45</high>
<low>4.25</low>
<close>4.45</close>
<volume/>
<openInterest>48</openInterest>
<trades>5</trades>
<ask>7.2</ask>
<askSize>1</askSize>
<bid>2.8</bid>
<bidSize>23</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-03</date>
<open>4.45</open>
<high>4.45</high>
<low>4.25</low>
<close>4.45</close>
<volume/>
<openInterest>48</openInterest>
<trades>5</trades>
<ask>4.7</ask>
<askSize>21</askSize>
<bid>4</bid>
<bidSize>21</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-04</date>
<open>4.7</open>
<high>4.7</high>
<low>4.55</low>
<close>4.65</close>
<volume>36</volume>
<openInterest>48</openInterest>
<trades>3</trades>
<ask>5.1</ask>
<askSize>30</askSize>
<bid>4.6</bid>
<bidSize>15</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-05</date>
<open>5.5</open>
<high>5.55</high>
<low>5.01</low>
<close>5.15</close>
<volume>28</volume>
<openInterest>79</openInterest>
<trades>1</trades>
<ask>5.35</ask>
<askSize>11</askSize>
<bid>5.05</bid>
<bidSize>87</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-06</date>
<open>5.3</open>
<high>5.3</high>
<low>5.2</low>
<close>5.2</close>
<volume>61</volume>
<openInterest>87</openInterest>
<trades>2</trades>
<ask>5.25</ask>
<askSize>13</askSize>
<bid>4.75</bid>
<bidSize>13</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-09</date>
<open>5.48</open>
<high>5.48</high>
<low>5.25</low>
<close>5.25</close>
<volume>760</volume>
<openInterest>116</openInterest>
<trades>10</trades>
<ask>7.4</ask>
<askSize>24</askSize>
<bid>3</bid>
<bidSize>24</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-10</date>
<open>4.95</open>
<high>5.23</high>
<low>4.95</low>
<close>5.23</close>
<volume>754</volume>
<openInterest>876</openInterest>
<trades>3</trades>
<ask>5.85</ask>
<askSize>11</askSize>
<bid>5.5</bid>
<bidSize>21</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-11</date>
<open>6.3</open>
<high>7.35</high>
<low>6.3</low>
<close>7.25</close>
<volume>243</volume>
<openInterest>1626</openInterest>
<trades>1</trades>
<ask>7.55</ask>
<askSize>19</askSize>
<bid>7.2</bid>
<bidSize>5</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-12</date>
<open>7.67</open>
<high>8.12</high>
<low>7.5</low>
<close>7.92</close>
<volume>7</volume>
<openInterest>1756</openInterest>
<trades>4</trades>
<ask>7.45</ask>
<askSize>19</askSize>
<bid>6.7</bid>
<bidSize>39</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-13</date>
<open>6.3</open>
<high>6.5</high>
<low>5.5</low>
<close>6</close>
<volume>31</volume>
<openInterest>1757</openInterest>
<trades>2</trades>
<ask>6.3</ask>
<askSize>1</askSize>
<bid>5.5</bid>
<bidSize>11</bidSize>
<settlement/>
</item>
<item>
<symbol>AAPL|20200417|250.00C</symbol>
<date>2019-09-16</date>
<open>6.15</open>
<high>6.15</high>
<low>6.08</low>
<close>6.08</close>
<volume>4</volume>
<openInterest>1773</openInterest>
<trades>1</trades>
<ask>6.4</ask>
<askSize>22</askSize>
<bid>5.9</bid>
<bidSize>23</bidSize>
<settlement/>
</item>
</getEquityOptionsHistory>
CSV
GET
GET https://ondemand.websol.barchart.com/getEquityOptionsHistory.csv?apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEquityOptionsHistory.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbol=AAPL%7C20200417%7C250.00C&country=US&askbid=&fields=settlement
Response
symbol,date,open,high,low,close,volume,openInterest,trades,ask,askSize,bid,bidSize,settlement
"AAPL|20200417|250.00C","2019-08-19","5.3","5.3","5.3","5.3","1","","1","5","20","4.4","23",""
"AAPL|20200417|250.00C","2019-08-20","5.3","5.3","5.3","5.3","","1","1","5.1","26","4.45","21",""
"AAPL|20200417|250.00C","2019-08-21","5.25","5.25","5.2","5.2","4","1","1","5.45","16","5.15","26",""
"AAPL|20200417|250.00C","2019-08-22","5.45","5.45","5.3","5.4","16","5","5","6","1","4.1","10",""
"AAPL|20200417|250.00C","2019-08-23","4.15","4.15","4.15","4.15","3","17","1","6.05","31","2.3","21",""
"AAPL|20200417|250.00C","2019-08-26","4.55","4.55","4.55","4.55","8","19","4","4.9","4","4.55","33",""
"AAPL|20200417|250.00C","2019-08-27","4.55","4.55","4.55","4.55","","27","4","6.45","23","3.9","23",""
"AAPL|20200417|250.00C","2019-08-28","4.45","4.45","4.25","4.45","27","27","5","4.55","11","4.35","17",""
"AAPL|20200417|250.00C","2019-08-29","4.45","4.45","4.25","4.45","","48","5","5.1","12","4.75","11",""
"AAPL|20200417|250.00C","2019-08-30","4.45","4.45","4.25","4.45","","48","5","7.2","1","2.8","23",""
"AAPL|20200417|250.00C","2019-09-03","4.45","4.45","4.25","4.45","","48","5","4.7","21","4","21",""
"AAPL|20200417|250.00C","2019-09-04","4.7","4.7","4.55","4.65","36","48","3","5.1","30","4.6","15",""
"AAPL|20200417|250.00C","2019-09-05","5.5","5.55","5.01","5.15","28","79","1","5.35","11","5.05","87",""
"AAPL|20200417|250.00C","2019-09-06","5.3","5.3","5.2","5.2","61","87","2","5.25","13","4.75","13",""
"AAPL|20200417|250.00C","2019-09-09","5.48","5.48","5.25","5.25","760","116","10","7.4","24","3","24",""
"AAPL|20200417|250.00C","2019-09-10","4.95","5.23","4.95","5.23","754","876","3","5.85","11","5.5","21",""
"AAPL|20200417|250.00C","2019-09-11","6.3","7.35","6.3","7.25","243","1626","1","7.55","19","7.2","5",""
"AAPL|20200417|250.00C","2019-09-12","7.67","8.12","7.5","7.92","7","1756","4","7.45","19","6.7","39",""
"AAPL|20200417|250.00C","2019-09-13","6.3","6.5","5.5","6","31","1757","2","6.3","1","5.5","11",""
"AAPL|20200417|250.00C","2019-09-16","6.15","6.15","6.08","6.08","4","1773","1","6.4","22","5.9","23",""
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbol' => 'AAPL|20200417|250.00C',
'country' => 'US',
'askbid' => '',
'fields' => 'settlement',
];
$result = $ondemand->getEquityOptionsHistory($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.getEquityOptionsHistory("YOUR_API_KEY", "AAPL|20200417|250.00C", "US", "", "settlement")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getEquityOptionsHistory('YOUR_API_KEY', 'AAPL|20200417|250.00C', 'US', '', 'settlement');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getEquityOptionsHistory('YOUR_API_KEY', 'AAPL|20200417|250.00C', 'US', '', 'settlement')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getEquityOptionsHistory,
message: {
apikey: 'YOUR_API_KEY',
symbol: 'AAPL|20200417|250.00C',
country: 'US',
askbid: '',
fields: 'settlement',
}
)
response.body