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": "2024-10-04",
"open": 572.35,
"high": 573.36,
"low": 568.1,
"close": 572.98,
"volume": 43005100,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 567.82
},
{
"symbol": "IBM",
"name": "International Business Machines",
"date": "2024-10-04",
"open": 223.75,
"high": 226.08,
"low": 223.27,
"close": 226,
"volume": 3554300,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 222.72
}
]
}
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>2024-10-04</date>
<open>572.35</open>
<high>573.36</high>
<low>568.1</low>
<close>572.98</close>
<volume>43005100</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>567.82</previousClose>
</item>
<item>
<symbol>IBM</symbol>
<name>International Business Machines</name>
<date>2024-10-04</date>
<open>223.75</open>
<high>226.08</high>
<low>223.27</low>
<close>226</close>
<volume>3554300</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>222.72</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","2024-10-04","572.35","573.36","568.1","572.98","43005100","","Barchart","567.82"
"IBM","International Business Machines","2024-10-04","223.75","226.08","223.27","226","3554300","","Barchart","222.72"
<?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