Quote Data API
getQuote
The getQuote API is used to request price data by symbol on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies. Price data is available in either real-time, delayed or end-of-day. Whether you want to power your charts, websites or apps this API will provide accurate price data that's easy to implement
View All APIssymbolsrequired
A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used. For futures, notation such as
AAPL,GOOG
fieldsoptional
The fields requested.
fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate
onlyoptional
Returns only specified fields
symbol,name
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
always returned
A sequence of characters. (example: GOOG)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
always returned
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
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 sequence of characters. (example: GOOG)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
always returned
A sequence of characters. (example: GOOG)
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)
always returned
A numeric type defining a whole number. (example: 2)
always returned
A numeric type defining a number with fractional parts. (example: 2.14)
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 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)
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)
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)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a whole number. (example: 2)
as requested
A numeric type defining a whole number. (example: 2)
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)
as requested
A date in the format of YYYY-MM-DD.
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)
as requested
A sequence of characters. (example: GOOG)
as requested
A sequence of characters. (example: GOOG)
as requested
A date in the format of YYYY-MM-DD.
as requested
A sequence of characters. (example: GOOG)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
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)
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)
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)
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 whole number. (example: 2)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A numeric type defining a whole number. (example: 2)
as requested
A sequence of characters. (example: GOOG)
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A numeric type defining a number with fractional parts. (example: 2.14)
as requested
A date in the format of YYYY-MM-DD.
as requested
A sequence of characters. (example: GOOG)
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)
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)
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)
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)
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)
as requested
A sequence of characters. (example: GOOG)
as requested
A sequence of characters. (example: GOOG)
GET
GET https://ondemand.websol.barchart.com/getQuote.json?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuote.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "AAPL",
"name": "Apple Inc",
"dayCode": "E",
"serverTimestamp": "2021-01-15T21:16:00-06:00",
"mode": "i",
"lastPrice": 127.14,
"tradeTimestamp": "2021-01-15T16:00:00-06:00",
"netChange": -1.769999999999996,
"percentChange": -1.37,
"unitCode": "2",
"open": 128.78,
"high": 130.22,
"low": 127,
"close": 127.14,
"numTrades": 294847,
"dollarVolume": 15546218167.1252,
"flag": "s",
"volume": 111598500,
"previousVolume": 90221688,
"fiftyTwoWkHigh": 138.79,
"fiftyTwoWkHighDate": "2020-12-29",
"fiftyTwoWkLow": 53.15,
"fiftyTwoWkLowDate": "2020-03-23"
},
{
"symbol": "GOOG",
"name": "Alphabet Cl C",
"dayCode": "E",
"serverTimestamp": "2021-01-15T21:16:00-06:00",
"mode": "i",
"lastPrice": 1736.19,
"tradeTimestamp": "2021-01-15T16:00:00-06:00",
"netChange": -3.990000000000009,
"percentChange": -0.23,
"unitCode": "2",
"open": 1738.19,
"high": 1756,
"low": 1721.55,
"close": 1736.19,
"numTrades": 2846,
"dollarVolume": 2589068238.7972,
"flag": "s",
"volume": 1342100,
"previousVolume": 1179400,
"fiftyTwoWkHigh": 1847.2,
"fiftyTwoWkHighDate": "2020-12-03",
"fiftyTwoWkLow": 1013.54,
"fiftyTwoWkLowDate": "2020-03-23"
}
]
}
GET
GET https://ondemand.websol.barchart.com/getQuote.xml?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuote.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Response
<?xml version="1.0" encoding="utf-8"?>
<getQuote>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>AAPL</symbol>
<name>Apple Inc</name>
<dayCode>E</dayCode>
<serverTimestamp>2021-01-15T21:16:00-06:00</serverTimestamp>
<mode>i</mode>
<lastPrice>127.14</lastPrice>
<tradeTimestamp>2021-01-15T16:00:00-06:00</tradeTimestamp>
<netChange>-1.77</netChange>
<percentChange>-1.37</percentChange>
<unitCode>2</unitCode>
<open>128.78</open>
<high>130.22</high>
<low>127</low>
<close>127.14</close>
<numTrades>294847</numTrades>
<dollarVolume>15546218167.125</dollarVolume>
<flag>s</flag>
<volume>111598500</volume>
<previousVolume>90221688</previousVolume>
<fiftyTwoWkHigh>138.79</fiftyTwoWkHigh>
<fiftyTwoWkHighDate>2020-12-29</fiftyTwoWkHighDate>
<fiftyTwoWkLow>53.15</fiftyTwoWkLow>
<fiftyTwoWkLowDate>2020-03-23</fiftyTwoWkLowDate>
</item>
<item>
<symbol>GOOG</symbol>
<name>Alphabet Cl C</name>
<dayCode>E</dayCode>
<serverTimestamp>2021-01-15T21:16:00-06:00</serverTimestamp>
<mode>i</mode>
<lastPrice>1736.19</lastPrice>
<tradeTimestamp>2021-01-15T16:00:00-06:00</tradeTimestamp>
<netChange>-3.99</netChange>
<percentChange>-0.23</percentChange>
<unitCode>2</unitCode>
<open>1738.19</open>
<high>1756</high>
<low>1721.55</low>
<close>1736.19</close>
<numTrades>2846</numTrades>
<dollarVolume>2589068238.7972</dollarVolume>
<flag>s</flag>
<volume>1342100</volume>
<previousVolume>1179400</previousVolume>
<fiftyTwoWkHigh>1847.2</fiftyTwoWkHigh>
<fiftyTwoWkHighDate>2020-12-03</fiftyTwoWkHighDate>
<fiftyTwoWkLow>1013.54</fiftyTwoWkLow>
<fiftyTwoWkLowDate>2020-03-23</fiftyTwoWkLowDate>
</item>
</getQuote>
GET
GET https://ondemand.websol.barchart.com/getQuote.csv?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getQuote.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate
Response
symbol,name,dayCode,serverTimestamp,mode,lastPrice,tradeTimestamp,netChange,percentChange,unitCode,open,high,low,close,numTrades,dollarVolume,flag,volume,previousVolume,fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate
"AAPL","Apple Inc","E","2021-01-15T21:16:00-06:00","i","127.14","2021-01-15T16:00:00-06:00","-1.77","-1.37","2","128.78","130.22","127","127.14","294847","15546218167.125","s","111598500","90221688","138.79","2020-12-29","53.15","2020-03-23"
"GOOG","Alphabet Cl C","E","2021-01-15T21:16:00-06:00","i","1736.19","2021-01-15T16:00:00-06:00","-3.99","-0.23","2","1738.19","1756","1721.55","1736.19","2846","2589068238.7972","s","1342100","1179400","1847.2","2020-12-03","1013.54","2020-03-23"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbols' => 'AAPL,GOOG',
'fields' => 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate',
];
$result = $ondemand->getQuote($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.getQuote("YOUR_API_KEY", "AAPL,GOOG", "fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getQuote('YOUR_API_KEY', 'AAPL,GOOG', 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = client.service.getQuote('YOUR_API_KEY', 'AAPL,GOOG', 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate')
print result
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getQuote,
message: {
apikey: 'YOUR_API_KEY',
symbols: 'AAPL,GOOG',
fields: 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate',
}
)
response.body