Stock data adjustments

The adjustments request returns splits and dividends data for a specified symbol. You can also request splits and dividends data for all symbols. You can use the adjustments command to get the last adjustment date for a symbol and decide whether to download all back-adjusted data or only data that is missing.

Request URL

http://api.kibot.com?action=adjustments&symbol=[symbol]&startdate=[startdate]&enddate=[enddate]

Response

The server returns TAB separated values with the first line defining the fields and their order. Here is an example:

Date

Symbol

Company

Action

Description

2/16/2010

MSFT

Microsoft Corp.

0.1300

Dividend

5/18/2010

MSFT

Microsoft Corp.

0.1300

Dividend

Parameters

The table below describes all the parameters that are accepted:

PARAMETER

DESCRIPTION

REQUIRED

POSSIBLE VALUES

action

Specifies the action to perform on the server

YES

adjustments

symbol

Specifies the symbol to process

NO

  1. Any ticker symbol available on our servers
  2. allsymbols - to return data for all available symbols
  3. If not specified, returns data for all available symbols.

startdate

The start date of the data being requested (Inclusive)

NO

Date (MM/DD/YYYY)

If not specified, then all data for a particular symbol is returned. If data for all symbols is requested, then the last 4 months are processed.

enddate

The end date of the data being requested (Inclusive)

NO

Date (MM/DD/YYYY)

If not specified, then the default value is the previous business day

Remarks

After every split or a dividend, the data needs to be back-adjusted in order to match the new prices that are coming from the exchange. In order to update the existing data, use the adjustments command to get the last adjustment date for a symbol you are downloading.

If you need to update multiple symbols, the fastest and most efficient way to obtain the required adjustment data is to use symbol=allsymbols parameter to return data using a single HTTP request. The same result is obtained if you leave out the symbol parameter.

For example, if your existing data has "5/1/2011" as the last date for IBM, then before downloading the missing data first determine whether the data had been adjusted after that date by calling this URL:

http://api.kibot.com?action=adjustments&symbol=IBM&startdate=5/1/2011

1. If the response is "404 Not Found" then you can download historical data that is missing using "5/1/2011" as the start date.

2. If the server returns splits or dividends after "5/1/2011", then download the entire file.

Examples

Request splits and dividends for MSFT (Microsoft) since 2/16/2010

URL:

http://api.kibot.com?action=adjustments&symbol=MSFT&startdate=2/16/2010

Response:

Date

Symbol

Company

Action

Description

2/16/2010

MSFT

Microsoft Corp.

0.1300

Dividend

5/18/2010

MSFT

Microsoft Corp.

0.1300

Dividend

8/17/2010

MSFT

Microsoft Corp.

0.1300

Dividend

11/16/2010

MSFT

Microsoft Corp.

0.1600

Dividend

2/15/2011

MSFT

Microsoft Corp.

0.1600

Dividend

Request all available data for WMT (Wal-Mart Stores)

URL:

http://api.kibot.com?action=adjustments&symbol=WMT

Response:

Date

Symbol

Company

Action

Description

3/10/2010

WMT

Wal-Mart Stores, Inc.

0.3025

Dividend

5/12/2010

WMT

Wal-Mart Stores, Inc.

0.3025

Dividend

8/11/2010

WMT

Wal-Mart Stores, Inc.

0.3025

Dividend

3/9/2011

WMT

Wal-Mart Stores, Inc.

0.3650

Dividend

Request data for all symbols since 5/1/2011

URL:

http://api.kibot.com?action=adjustments&symbol=allsymbols&startdate=5/1/2011




Historical Data API - Table of Contents

Introduction
    Historical data API  
    Overview
    How to get access
Commands
    Login request
    Download historical data
    Stock data adjustments
    Logout request
    Status
Examples
    Sample source code
    Sample client application
Other
    Data compression
    Server responses