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-11-20",
"open": 590.38,
"high": 590.79,
"low": 584.63,
"close": 590.5,
"volume": 50032500,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 590.3
},
{
"symbol": "IBM",
"name": "International Business Machines",
"date": "2024-11-20",
"open": 211,
"high": 214.96,
"low": 209.77,
"close": 214.6,
"volume": 4562900,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 210.25
}
]
}
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-11-20</date>
<open>590.38</open>
<high>590.79</high>
<low>584.63</low>
<close>590.5</close>
<volume>50032500</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>590.3</previousClose>
</item>
<item>
<symbol>IBM</symbol>
<name>International Business Machines</name>
<date>2024-11-20</date>
<open>211</open>
<high>214.96</high>
<low>209.77</low>
<close>214.6</close>
<volume>4562900</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>210.25</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-11-20","590.38","590.79","584.63","590.5","50032500","","Barchart","590.3"
"IBM","International Business Machines","2024-11-20","211","214.96","209.77","214.6","4562900","","Barchart","210.25"
<?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