getDividendsCalendar API
getDividendsCalendar
The getDividendsCalendar API provides the total number of upcoming dividends by date. And will also return the dividends data for the requested date. Please note that the output of this API will change based on the type of data requested. When requesting 'totals' (default type), it will return the date and total dividends for that date. And when requesting 'dividends' it will return dividend data for all symbols for the requested start date.
View All APIsexchangerequired
The exchange(s) for which the data is requested. US-ALL and CA-ALL will query for all permitted US and Canadian exchanges for your account.
typerequired
A boolean parameter that when set to true, will return all dividends data for the requested start date. If no start date is passed, it will return the data for the current date.
startDateoptional
The start date for dividends total and the date for which the dividends information will be returned.
endDateoptional
The end date for dividends total. This input parameter is ignored when requesting the actual dividends information.
always returned
A date in the format of YYYY-MM-DD.
always returned
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 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 date in the format of YYYY-MM-DD.
as requested
A date in the format of YYYY-MM-DD.
GET
GET https://ondemand.websol.barchart.com/getDividendsCalendar.json?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getDividendsCalendar.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"date": "2024-11-21",
"totalDividends": 40
},
{
"date": "2024-11-22",
"totalDividends": 43
},
{
"date": "2024-11-25",
"totalDividends": 31
},
{
"date": "2024-11-26",
"totalDividends": 18
},
{
"date": "2024-11-27",
"totalDividends": 27
},
{
"date": "2024-11-29",
"totalDividends": 130
},
{
"date": "2024-12-02",
"totalDividends": 74
}
]
}
GET
GET https://ondemand.websol.barchart.com/getDividendsCalendar.xml?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getDividendsCalendar.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY
Response
<?xml version="1.0" encoding="utf-8"?>
<getDividendsCalendar>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<date>2024-11-21</date>
<totalDividends>40</totalDividends>
</item>
<item>
<date>2024-11-22</date>
<totalDividends>43</totalDividends>
</item>
<item>
<date>2024-11-25</date>
<totalDividends>31</totalDividends>
</item>
<item>
<date>2024-11-26</date>
<totalDividends>18</totalDividends>
</item>
<item>
<date>2024-11-27</date>
<totalDividends>27</totalDividends>
</item>
<item>
<date>2024-11-29</date>
<totalDividends>130</totalDividends>
</item>
<item>
<date>2024-12-02</date>
<totalDividends>74</totalDividends>
</item>
</getDividendsCalendar>
GET
GET https://ondemand.websol.barchart.com/getDividendsCalendar.csv?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getDividendsCalendar.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY
Response
date,totalDividends
"2024-11-21","40"
"2024-11-22","43"
"2024-11-25","31"
"2024-11-26","18"
"2024-11-27","27"
"2024-11-29","130"
"2024-12-02","74"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
];
$result = $ondemand->getDividendsCalendar($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.getDividendsCalendar("YOUR_API_KEY")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getDividendsCalendar('YOUR_API_KEY');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getDividendsCalendar('YOUR_API_KEY')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getDividendsCalendar,
message: {
apikey: 'YOUR_API_KEY',
}
)
response.body