End of Day Quotes API
getQuoteEod
The getQuoteEod API is used to request end-of-day price data, by combined exchange and symbol, on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies. Historical data is available as tick, minute bars or end-of-day data.
View All APIssymbolsrequired
An MIC code or a Country code plus the symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used. For futures, notation such as
XASE:SPY,US:IBM
fieldsoptional
The fields requested.
previousClose
exchangeoptional
The list of valid exchange codes to limit symbol search.
NYSE,AMEX
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
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)
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)
always returned
A numeric type defining a whole number. (example: 2)
always returned
A numeric type defining a whole number. (example: 2)
always returned
A sequence of characters. (example: GOOG)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
GET
GET https://ondemand.websol.barchart.com/getQuoteEod.json?apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuoteEod.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "SPY",
"name": "S&P 500 SPDR",
"date": "2025-03-27",
"open": 567.18,
"high": 570.9,
"low": 564.94,
"close": 567.08,
"volume": 42164200,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 568.59
},
{
"symbol": "IBM",
"name": "International Business Machines",
"date": "2025-03-27",
"open": 249.71,
"high": 250.3,
"low": 245.73,
"close": 246.21,
"volume": 2889300,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 250.34
}
]
}
GET
GET https://ondemand.websol.barchart.com/getQuoteEod.xml?apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuoteEod.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Response
<?xml version="1.0" encoding="utf-8"?>
<getQuoteEod>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>SPY</symbol>
<name>S&P 500 SPDR</name>
<date>2025-03-27</date>
<open>567.18</open>
<high>570.9</high>
<low>564.94</low>
<close>567.08</close>
<volume>42164200</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>568.59</previousClose>
</item>
<item>
<symbol>IBM</symbol>
<name>International Business Machines</name>
<date>2025-03-27</date>
<open>249.71</open>
<high>250.3</high>
<low>245.73</low>
<close>246.21</close>
<volume>2889300</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>250.34</previousClose>
</item>
</getQuoteEod>
GET
GET https://ondemand.websol.barchart.com/getQuoteEod.csv?apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuoteEod.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=XASE%3ASPY%2CUS%3AIBM&fields=previousClose&exchange=NYSE%2CAMEX
Response
symbol,name,date,open,high,low,close,volume,totaltrades,datasource,previousClose
"SPY","S&P 500 SPDR","2025-03-27","567.18","570.9","564.94","567.08","42164200","","Barchart","568.59"
"IBM","International Business Machines","2025-03-27","249.71","250.3","245.73","246.21","2889300","","Barchart","250.34"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbols' => 'XASE:SPY,US:IBM',
'fields' => 'previousClose',
'exchange' => 'NYSE,AMEX',
];
$result = $ondemand->getQuoteEod($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.getQuoteEod("YOUR_API_KEY", "XASE:SPY,US:IBM", "previousClose", "NYSE,AMEX")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getQuoteEod('YOUR_API_KEY', 'XASE:SPY,US:IBM', 'previousClose', 'NYSE,AMEX');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getQuoteEod('YOUR_API_KEY', 'XASE:SPY,US:IBM', 'previousClose', 'NYSE,AMEX')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getQuoteEod,
message: {
apikey: 'YOUR_API_KEY',
symbols: 'XASE:SPY,US:IBM',
fields: 'previousClose',
exchange: 'NYSE,AMEX',
}
)
response.body