getEarningsEstimates API

The getEarningsEstimates API provides per share earnings estimates on public companies for quarterly and annual periods based on symbol. Multiple symbols can be used to return estimated earnings data, including average estimate, number of analysts, high estimate, low estimate and estimated growth rate.

All APIs

Contact Us to Get Access

Inputs

symbols required

A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.

Type
list (A comma or semi-colon delimited string.) 
Example
IBM,GOOG 

fields optional

Additional fields requested.

Type
list (A comma or semi-colon delimited string.) 
Example
bid,bidSize,ask,askSize 

Outputs

Name / Requirement
Description
Type
symbol
always returned
A symbol or code that identifies the futures contract.
string
A sequence of characters. (example: GOOG)
symbolName
always returned
The full name of the instrument.
string
A sequence of characters. (example: GOOG)
period
always returned
The period, either quarter or annual, that the estimate pertains to. For example, Q42013 or FY122013.
string
A sequence of characters. (example: GOOG)
averageEstimate
always returned
The average estimated earnings per share based on all analysts.
double
A numeric type defining a number with fractional parts. (example: 2.14)
numAnalysts
as requested
The number of analysts providing earnings estimates.
int
A numeric type defining a whole number. (example: 2)
highEstimate
as requested
The highest earnings per share estimate amount.
double
A numeric type defining a number with fractional parts. (example: 2.14)
lowEstimate
as requested
The lowest earnings per share estimate amount.
double
A numeric type defining a number with fractional parts. (example: 2.14)
priorYear
as requested
The average earnings per share estimated last year.
double
A numeric type defining a number with fractional parts. (example: 2.14)
growthRateEstimate
as requested
The estimated growth rate in earnings based off of the average estimate (year-over-year).
double
A numeric type defining a number with fractional parts. (example: 2.14)
currentQtrExpectedReportDate
as requested
The expected report date for the most recent quarter.
date
A date in the format of YYYY-MM-DD.
expectedEarningsStatus
as requested
Whether the expected earnings information is late or not.
string
A sequence of characters. (example: GOOG)
expectedEarningsSource
as requested
The source of the expected earnings report date.
string
A sequence of characters. (example: GOOG)
dividendType
as requested
Type of dividend payout.
string
A sequence of characters. (example: GOOG)
indicatedAnnualDvnd
as requested
The indicated annual dividend per share for given instrument.
double
A numeric type defining a number with fractional parts. (example: 2.14)
dividendStatus
as requested
Whether the dividend data is late or not.
string
A sequence of characters. (example: GOOG)
paymentDate
as requested
The dividend payment date.
date
A date in the format of YYYY-MM-DD.
recordDate
as requested
Date when dividend info was reported
date
A date in the format of YYYY-MM-DD.
declarationDate
as requested
Date when dividend info was announced.
date
A date in the format of YYYY-MM-DD.
exDividendDate
as requested
The last possible date to have owned shares of a stock and still be entitled to the associated dividend.
date
A date in the format of YYYY-MM-DD.
dividendRate
as requested
Last dividend payout amount.
double
A numeric type defining a number with fractional parts. (example: 2.14)

Status Code Responses

200
OK
Success
400
Bad Request
The request was invalid, please see the message for more information.
500
Internal Server Error
Something is not working correctly, please contact support.


JSON

GET

GET https://ondemand.websol.barchart.com/getEarningsEstimates.json?apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getEarningsEstimates.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "IBM",
            "symbolName": "International Business Machines",
            "period": "FY 2017-12-31",
            "averageEstimate": 13.8
        },
        {
            "symbol": "IBM",
            "symbolName": "International Business Machines",
            "period": "Qtr 2018-03-31",
            "averageEstimate": 2.13
        },
        {
            "symbol": "IBM",
            "symbolName": "International Business Machines",
            "period": "FY 2018-12-31",
            "averageEstimate": 13.91
        },
        {
            "symbol": "GOOG",
            "symbolName": "Alphabet Class C",
            "period": "Qtr 2017-09-30",
            "averageEstimate": null
        },
        {
            "symbol": "GOOG",
            "symbolName": "Alphabet Class C",
            "period": "FY 2017-12-31",
            "averageEstimate": 43.79
        },
        {
            "symbol": "GOOG",
            "symbolName": "Alphabet Class C",
            "period": "FY 2018-12-31",
            "averageEstimate": 50.41
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getEarningsEstimates.xml?apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getEarningsEstimates.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize

Response


<?xml version="1.0" encoding="utf-8"?>
 <getEarningsEstimates>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>IBM</symbol>
   <symbolName>International Business Machines</symbolName>
   <period>FY 2017-12-31</period>
   <averageEstimate>13.8</averageEstimate>
  </item>
  <item>
   <symbol>IBM</symbol>
   <symbolName>International Business Machines</symbolName>
   <period>Qtr 2018-03-31</period>
   <averageEstimate>2.13</averageEstimate>
  </item>
  <item>
   <symbol>IBM</symbol>
   <symbolName>International Business Machines</symbolName>
   <period>FY 2018-12-31</period>
   <averageEstimate>13.91</averageEstimate>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <symbolName>Alphabet Class C</symbolName>
   <period>Qtr 2017-09-30</period>
   <averageEstimate></averageEstimate>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <symbolName>Alphabet Class C</symbolName>
   <period>FY 2017-12-31</period>
   <averageEstimate>43.79</averageEstimate>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <symbolName>Alphabet Class C</symbolName>
   <period>FY 2018-12-31</period>
   <averageEstimate>50.41</averageEstimate>
  </item>
 </getEarningsEstimates>

CSV

GET

GET https://ondemand.websol.barchart.com/getEarningsEstimates.csv?apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getEarningsEstimates.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=IBM%2CGOOG&fields=bid%2CbidSize%2Cask%2CaskSize

Response

symbol,symbolName,period,averageEstimate
"IBM","International Business Machines","FY 2017-12-31","13.8"
"IBM","International Business Machines","Qtr 2018-03-31","2.13"
"IBM","International Business Machines","FY 2018-12-31","13.91"
"GOOG","Alphabet Class C","Qtr 2017-09-30",""
"GOOG","Alphabet Class C","FY 2017-12-31","43.79"
"GOOG","Alphabet Class C","FY 2018-12-31","50.41"


PHP

<?php

$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');

$params = [
    'symbols' => 'IBM,GOOG',
    'fields' => 'bid,bidSize,ask,askSize',
];

$result = $ondemand->getEarningsEstimates($params);
var_dump($result);

Classic ASP

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.getEarningsEstimates("IBM,GOOG", "bid,bidSize,ask,askSize")

Perl

use SOAP::Lite;
use SOAP::WSDL;

my $ondemand = SOAP::Lite
    -> service('https://ondemand.websol.barchart.com/service?wsdl');

my $result = $ondemand->getEarningsEstimates('IBM,GOOG', 'bid,bidSize,ask,askSize');

print $result;

Python

from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')

result = client.service.getEarningsEstimates('IBM,GOOG', 'bid,bidSize,ask,askSize')

print result

Ruby

require 'savon'

ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')

response = ondemand.call(
    :getEarningsEstimates,
    message: {
        symbols: 'IBM,GOOG',
        fields: 'bid,bidSize,ask,askSize',
    }
)

response.body