getCorporateActionsByExchange API

The getCorporateActions API from Barchart OnDemand provides splits or dividends data for US equities, mutual funds and Canadian equities by exchange.

All APIs

Contact Us to Get Access

By submitting this form you are opting in to receive email communications from Barchart for related product, service or company information, updates and announcements. You can unsubscribe at anytime. View our Privacy Policy.

Inputs

type required

Type of action for which data is being requested.

Type
enum (A type which includes a list of valid possible values.) 
Example
dividend 

Valid Values:
dividend, split

exchanges required

A valid exchange code.

Type
list-enum (A comma or semi-colon delimited string that must match a list of valid possible values.) 
Example
NYSE 

Valid Values:
NYSE, NASDAQ, AMEX, OTC-BB, LSE, TSX, TSX-V, ASX, CNSX, FUND, CADFUNDS

interval optional

Set period in days for which the event data should be returned.

Type
enum (A type which includes a list of valid possible values.) 
Example
Default

Valid Values:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30

eventDates optional

A comma separated list of dates for which event data should be returned. Dates need to be in [YYYYMMDD] format.

Type
list (A comma or semi-colon delimited string.) 
Example
20200708,20200630 

Outputs

Name / Requirement
Description
Type
symbol
always returned
A symbol or code that identifies a financial instrument.
string
A sequence of characters. (example: GOOG)
exchange
always returned
Exchange code for the marketplace where the financial instruments are listed.
string
A sequence of characters. (example: GOOG)
eventDate
always returned
The date in which the event occurred.
date
A date in the format of YYYY-MM-DD.
eventType
always returned
The type of event.
string
A sequence of characters. (example: GOOG)
value
always returned
The split ratio, dividend amount or earnings 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/getCorporateActionsByExchange.json?apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "DHF",
            "exchange": "NYSE",
            "eventDate": "2020-07-08",
            "eventType": "dividend",
            "value": 0.022
        },
        {
            "symbol": "KAI",
            "exchange": "NYSE",
            "eventDate": "2020-07-08",
            "eventType": "dividend",
            "value": 0.24
        },
        {
            "symbol": "MA",
            "exchange": "NYSE",
            "eventDate": "2020-07-08",
            "eventType": "dividend",
            "value": 0.4
        },
        {
            "symbol": "MBT",
            "exchange": "NYSE",
            "eventDate": "2020-07-08",
            "eventType": "dividend",
            "value": 0.473
        },
        {
            "symbol": "TSE",
            "exchange": "NYSE",
            "eventDate": "2020-07-08",
            "eventType": "dividend",
            "value": 0.4
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getCorporateActionsByExchange.xml?apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630

Response


<?xml version="1.0" encoding="utf-8"?>
 <getCorporateActionsByExchange>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>DHF</symbol>
   <exchange>NYSE</exchange>
   <eventDate>2020-07-08</eventDate>
   <eventType>dividend</eventType>
   <value>0.022</value>
  </item>
  <item>
   <symbol>KAI</symbol>
   <exchange>NYSE</exchange>
   <eventDate>2020-07-08</eventDate>
   <eventType>dividend</eventType>
   <value>0.24</value>
  </item>
  <item>
   <symbol>MA</symbol>
   <exchange>NYSE</exchange>
   <eventDate>2020-07-08</eventDate>
   <eventType>dividend</eventType>
   <value>0.4</value>
  </item>
  <item>
   <symbol>MBT</symbol>
   <exchange>NYSE</exchange>
   <eventDate>2020-07-08</eventDate>
   <eventType>dividend</eventType>
   <value>0.473</value>
  </item>
  <item>
   <symbol>TSE</symbol>
   <exchange>NYSE</exchange>
   <eventDate>2020-07-08</eventDate>
   <eventType>dividend</eventType>
   <value>0.4</value>
  </item>
 </getCorporateActionsByExchange>

CSV

GET

GET https://ondemand.websol.barchart.com/getCorporateActionsByExchange.csv?apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY&type=dividend&exchanges=NYSE&interval=7&eventDates=20200708%2C20200630

Response

symbol,exchange,eventDate,eventType,value
"DHF","NYSE","2020-07-08","dividend","0.022"
"KAI","NYSE","2020-07-08","dividend","0.24"
"MA","NYSE","2020-07-08","dividend","0.4"
"MBT","NYSE","2020-07-08","dividend","0.473"
"TSE","NYSE","2020-07-08","dividend","0.4"


PHP

<?php

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

$params = [
    'apikey' => 'YOUR_API_KEY',
    'type' => 'dividend',
    'exchanges' => 'NYSE',
    'interval' => '7',
    'eventDates' => '20200708,20200630',
];

$result = $ondemand->getCorporateActionsByExchange($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.getCorporateActionsByExchange("YOUR_API_KEY", "dividend", "NYSE", "7", "20200708,20200630")

Perl

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

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

my $result = $ondemand->getCorporateActionsByExchange('YOUR_API_KEY', 'dividend', 'NYSE', '7', '20200708,20200630');

print $result;

Python

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

result = client.service.getCorporateActionsByExchange('YOUR_API_KEY', 'dividend', 'NYSE', '7', '20200708,20200630')

print result

Ruby

require 'savon'

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

response = ondemand.call(
    :getCorporateActionsByExchange,
    message: {
        apikey: 'YOUR_API_KEY',
        type: 'dividend',
        exchanges: 'NYSE',
        interval: '7',
        eventDates: '20200708,20200630',
    }
)

response.body