getQuote API
getQuote
The getQuote API is used to request price data, either real-time, delayed or end-of-day, by symbol on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies.
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
shareClassFigioptional
The unique share class code identifying an instrument globally.
BBG001S5S399
figioptional
The unique code identifying an instrument across all exchanges in a country.
BBG000BLNQ16
compositeFigioptional
BBG000BLNNH6
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 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 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)
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 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 number with fractional parts. (example: 2.14)
as requested
A numeric type defining a whole number. (example: 2)
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.
GET
GET https://marketdata.websol.barchart.com/getQuote.json?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
Host: marketdata.websol.barchart.com
POST
POST https://marketdata.websol.barchart.com/getQuote.json
Host: marketdata.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&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "AAPL",
"name": "Apple Inc",
"dayCode": "P",
"serverTimestamp": "2024-04-27T11:35:00-05:00",
"mode": "i",
"lastPrice": 169.3,
"tradeTimestamp": "2024-04-26T16:00:00-05:00",
"netChange": -0.59,
"percentChange": -0.35,
"unitCode": "2",
"open": 169.88,
"high": 171.34,
"low": 169.18,
"close": 169.3,
"numTrades": 563912,
"dollarVolume": 8210567607.7878,
"flag": "s",
"volume": 44838300,
"previousVolume": 50558301,
"fiftyTwoWkHigh": 199.62,
"fiftyTwoWkHighDate": "2023-12-14",
"fiftyTwoWkLow": 164.07,
"fiftyTwoWkLowDate": "2024-04-19"
},
{
"symbol": "GOOG",
"name": "Alphabet Cl C",
"dayCode": "P",
"serverTimestamp": "2024-04-27T11:35:00-05:00",
"mode": "i",
"lastPrice": 173.69,
"tradeTimestamp": "2024-04-26T16:00:00-05:00",
"netChange": 15.74,
"percentChange": 9.97,
"unitCode": "2",
"open": 175.99,
"high": 176.42,
"low": 171.4,
"close": 173.69,
"numTrades": 658868,
"dollarVolume": 9804492451.8641,
"flag": "s",
"volume": 56500700,
"previousVolume": 36197699,
"fiftyTwoWkHigh": 176.42,
"fiftyTwoWkHighDate": "2024-04-26",
"fiftyTwoWkLow": 104.42,
"fiftyTwoWkLowDate": "2023-04-27"
}
]
}
GET
GET https://marketdata.websol.barchart.com/getQuote.xml?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
Host: marketdata.websol.barchart.com
POST
POST https://marketdata.websol.barchart.com/getQuote.xml
Host: marketdata.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&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
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>P</dayCode>
<serverTimestamp>2024-04-27T11:35:00-05:00</serverTimestamp>
<mode>i</mode>
<lastPrice>169.3</lastPrice>
<tradeTimestamp>2024-04-26T16:00:00-05:00</tradeTimestamp>
<netChange>-0.59</netChange>
<percentChange>-0.35</percentChange>
<unitCode>2</unitCode>
<open>169.88</open>
<high>171.34</high>
<low>169.18</low>
<close>169.3</close>
<numTrades>563912</numTrades>
<dollarVolume>8210567607.7878</dollarVolume>
<flag>s</flag>
<volume>44838300</volume>
<previousVolume>50558301</previousVolume>
<fiftyTwoWkHigh>199.62</fiftyTwoWkHigh>
<fiftyTwoWkHighDate>2023-12-14</fiftyTwoWkHighDate>
<fiftyTwoWkLow>164.07</fiftyTwoWkLow>
<fiftyTwoWkLowDate>2024-04-19</fiftyTwoWkLowDate>
</item>
<item>
<symbol>GOOG</symbol>
<name>Alphabet Cl C</name>
<dayCode>P</dayCode>
<serverTimestamp>2024-04-27T11:35:00-05:00</serverTimestamp>
<mode>i</mode>
<lastPrice>173.69</lastPrice>
<tradeTimestamp>2024-04-26T16:00:00-05:00</tradeTimestamp>
<netChange>15.74</netChange>
<percentChange>9.97</percentChange>
<unitCode>2</unitCode>
<open>175.99</open>
<high>176.42</high>
<low>171.4</low>
<close>173.69</close>
<numTrades>658868</numTrades>
<dollarVolume>9804492451.8641</dollarVolume>
<flag>s</flag>
<volume>56500700</volume>
<previousVolume>36197699</previousVolume>
<fiftyTwoWkHigh>176.42</fiftyTwoWkHigh>
<fiftyTwoWkHighDate>2024-04-26</fiftyTwoWkHighDate>
<fiftyTwoWkLow>104.42</fiftyTwoWkLow>
<fiftyTwoWkLowDate>2023-04-27</fiftyTwoWkLowDate>
</item>
</getQuote>
GET
GET https://marketdata.websol.barchart.com/getQuote.csv?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=fiftyTwoWkHigh%2CfiftyTwoWkHighDate%2CfiftyTwoWkLow%2CfiftyTwoWkLowDate&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
Host: marketdata.websol.barchart.com
POST
POST https://marketdata.websol.barchart.com/getQuote.csv
Host: marketdata.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&shareClassFigi=BBG001S5S399&figi=BBG000BLNQ16&compositeFigi=BBG000BLNNH6
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","P","2024-04-27T11:35:00-05:00","i","169.3","2024-04-26T16:00:00-05:00","-0.59","-0.35","2","169.88","171.34","169.18","169.3","563912","8210567607.7878","s","44838300","50558301","199.62","2023-12-14","164.07","2024-04-19"
"GOOG","Alphabet Cl C","P","2024-04-27T11:35:00-05:00","i","173.69","2024-04-26T16:00:00-05:00","15.74","9.97","2","175.99","176.42","171.4","173.69","658868","9804492451.8641","s","56500700","36197699","176.42","2024-04-26","104.42","2023-04-27"
<?php
$ondemand = new SoapClient('https://marketdata.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbols' => 'AAPL,GOOG',
'fields' => 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate',
'shareClassFigi' => 'BBG001S5S399',
'figi' => 'BBG000BLNQ16',
'compositeFigi' => 'BBG000BLNNH6',
];
$result = $ondemand->getQuote($params);
var_dump($result);
Dim ondemand
Dim result
Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://marketdata.websol.barchart.com/service?wsdl")
Set result = ondemand.getQuote("YOUR_API_KEY", "AAPL,GOOG", "fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate", "BBG001S5S399", "BBG000BLNQ16", "BBG000BLNNH6")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://marketdata.websol.barchart.com/service?wsdl');
my $result = $ondemand->getQuote('YOUR_API_KEY', 'AAPL,GOOG', 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate', 'BBG001S5S399', 'BBG000BLNQ16', 'BBG000BLNNH6');
print $result;
from suds.client import Client
ondemand = Client('https://marketdata.websol.barchart.com/service?wsdl')
result = ondemand.service.getQuote('YOUR_API_KEY', 'AAPL,GOOG', 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate', 'BBG001S5S399', 'BBG000BLNQ16', 'BBG000BLNNH6')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://marketdata.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getQuote,
message: {
apikey: 'YOUR_API_KEY',
symbols: 'AAPL,GOOG',
fields: 'fiftyTwoWkHigh,fiftyTwoWkHighDate,fiftyTwoWkLow,fiftyTwoWkLowDate',
shareClassFigi: 'BBG001S5S399',
figi: 'BBG000BLNQ16',
compositeFigi: 'BBG000BLNNH6',
}
)
response.body