Corporate Action API
getCorporateActions
The getCorporateActions API provides reliable corporate actions data on equities. Stay up-to-date on the latest public information with instant access to splits, dividends, name or symbol changes and earnings, based on a symbol. Use this data to make better decisions, reduce risk, and accurately track changes that impact securities in your investment universe.
View All APIsContact Us to Get Access
Inputs
symbolsrequired
A symbol or code that identifies a financial instrument.
Type
list (A comma or semi-colon delimited string.)
Example
AMZN,AAPL
startDateoptional
The beginning date for the query.
Type
date (A date in the format of YYYY-MM-DD.)
Example
2013-01-01
endDateoptional
The end date for the query.
Type
date (A date in the format of YYYY-MM-DD.)
Example
2013-06-30
eventTyperequired
The type of event: "split", "dividend", "earnings".
Type
enum (A type which includes a list of valid possible values.)
Example
dividend
Valid Values
split, dividend, earnings
maxRecordsoptional
The maximum number of records to return.
Type
int (A numeric type defining a whole number. (example: 2))
Example
5
Default
20
Outputs
symbol
always returned
always returned
A symbol or code that identifies a financial instrument.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
eventDate
always returned
always returned
The date in which the event occurred.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
eventType
always returned
always returned
The type of event.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
value
always returned
always returned
The split ratio, dividend amount or earnings amount.
double
A numeric type defining a number with fractional parts. (example: 2.14)
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/getCorporateActions.json?apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCorporateActions.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "AAPL",
"eventDate": "2013-05-09",
"eventType": "Dividend",
"value": 3.05
},
{
"symbol": "AAPL",
"eventDate": "2013-02-07",
"eventType": "Dividend",
"value": 2.65
}
]
}
XML
GET
GET https://ondemand.websol.barchart.com/getCorporateActions.xml?apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCorporateActions.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Response
<?xml version="1.0" encoding="utf-8"?>
<getCorporateActions>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>AAPL</symbol>
<eventDate>2013-05-09</eventDate>
<eventType>Dividend</eventType>
<value>3.05</value>
</item>
<item>
<symbol>AAPL</symbol>
<eventDate>2013-02-07</eventDate>
<eventType>Dividend</eventType>
<value>2.65</value>
</item>
</getCorporateActions>
CSV
GET
GET https://ondemand.websol.barchart.com/getCorporateActions.csv?apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCorporateActions.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AMZN%2CAAPL&startDate=2013-01-01&endDate=2013-06-30&eventType=dividend&maxRecords=5
Response
symbol,eventDate,eventType,value
"AAPL","2013-05-09","Dividend","3.05"
"AAPL","2013-02-07","Dividend","2.65"
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbols' => 'AMZN,AAPL',
'startDate' => '2013-01-01',
'endDate' => '2013-06-30',
'eventType' => 'dividend',
'maxRecords' => '5',
];
$result = $ondemand->getCorporateActions($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.getCorporateActions("YOUR_API_KEY", "AMZN,AAPL", "2013-01-01", "2013-06-30", "dividend", "5")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getCorporateActions('YOUR_API_KEY', 'AMZN,AAPL', '2013-01-01', '2013-06-30', 'dividend', '5');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getCorporateActions('YOUR_API_KEY', 'AMZN,AAPL', '2013-01-01', '2013-06-30', 'dividend', '5')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getCorporateActions,
message: {
apikey: 'YOUR_API_KEY',
symbols: 'AMZN,AAPL',
startDate: '2013-01-01',
endDate: '2013-06-30',
eventType: 'dividend',
maxRecords: '5',
}
)
response.body