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-12-20",
"open": 581.77,
"high": 595.75,
"low": 580.91,
"close": 591.15,
"volume": 125716600,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 584.13
},
{
"symbol": "IBM",
"name": "International Business Machines",
"date": "2024-12-20",
"open": 222.73,
"high": 227.68,
"low": 221.68,
"close": 223.36,
"volume": 12423100,
"totaltrades": null,
"datasource": "Barchart",
"previousClose": 223.92
}
]
}
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-12-20</date>
<open>581.77</open>
<high>595.75</high>
<low>580.91</low>
<close>591.15</close>
<volume>125716600</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>584.13</previousClose>
</item>
<item>
<symbol>IBM</symbol>
<name>International Business Machines</name>
<date>2024-12-20</date>
<open>222.73</open>
<high>227.68</high>
<low>221.68</low>
<close>223.36</close>
<volume>12423100</volume>
<totaltrades/>
<datasource>Barchart</datasource>
<previousClose>223.92</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-12-20","581.77","595.75","580.91","591.15","125716600","","Barchart","584.13"
"IBM","International Business Machines","2024-12-20","222.73","227.68","221.68","223.36","12423100","","Barchart","223.92"
<?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