getEarningsCalendar API
getEarningsCalendar
The getEarningsCalendar API provides the total number of upcoming earnings by date. And will also return the earnings 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 earnings for that date. And when requesting 'earnings' it will return earnings 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 earnings 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 earnings total and the date for which the earnings information will be returned.
endDateoptional
The end date for earnings total. This input parameter is ignored when requesting the actual earnings 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 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)
GET
GET https://ondemand.websol.barchart.com/getEarningsCalendar.json?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEarningsCalendar.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-10-07",
"totalEarnings": 3
},
{
"date": "2024-10-08",
"totalEarnings": 6
},
{
"date": "2024-10-09",
"totalEarnings": 14
},
{
"date": "2024-10-10",
"totalEarnings": 21
},
{
"date": "2024-10-11",
"totalEarnings": 16
},
{
"date": "2024-10-14",
"totalEarnings": 2
},
{
"date": "2024-10-15",
"totalEarnings": 38
}
]
}
GET
GET https://ondemand.websol.barchart.com/getEarningsCalendar.xml?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEarningsCalendar.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"?>
<getEarningsCalendar>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<date>2024-10-07</date>
<totalEarnings>3</totalEarnings>
</item>
<item>
<date>2024-10-08</date>
<totalEarnings>6</totalEarnings>
</item>
<item>
<date>2024-10-09</date>
<totalEarnings>14</totalEarnings>
</item>
<item>
<date>2024-10-10</date>
<totalEarnings>21</totalEarnings>
</item>
<item>
<date>2024-10-11</date>
<totalEarnings>16</totalEarnings>
</item>
<item>
<date>2024-10-14</date>
<totalEarnings>2</totalEarnings>
</item>
<item>
<date>2024-10-15</date>
<totalEarnings>38</totalEarnings>
</item>
</getEarningsCalendar>
GET
GET https://ondemand.websol.barchart.com/getEarningsCalendar.csv?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getEarningsCalendar.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY
Response
date,totalEarnings
"2024-10-07","3"
"2024-10-08","6"
"2024-10-09","14"
"2024-10-10","21"
"2024-10-11","16"
"2024-10-14","2"
"2024-10-15","38"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
];
$result = $ondemand->getEarningsCalendar($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.getEarningsCalendar("YOUR_API_KEY")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getEarningsCalendar('YOUR_API_KEY');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getEarningsCalendar('YOUR_API_KEY')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getEarningsCalendar,
message: {
apikey: 'YOUR_API_KEY',
}
)
response.body