Warning
The YCharts API is available to our API customers for their internal use only. Any redistribution or commercial use of data from the API is strictly prohibited without prior written consent from YCharts. For more details on our API’s capabilities and pricing please contact sales@ycharts.com or call (866) 965-7552.
Company Stock Splits¶
The Company Stock Splits Endpoint is used to return a list of stock split objects that within the date range specified by the optional start and end date parameters.
Request Info¶
Request Method |
GET |
URL |
https://api.ycharts.com/v3/companies/ |
Request Parameters¶
Parameter |
Required |
Description |
---|---|---|
symbol[s] |
Y |
The exchange symbol for a company, or a comma separated list of exchange symbols. |
start_date |
N |
The first split date of the desired date range. |
end_date |
N |
The last split date of the desired data range. |
Note
There is a maximum of 100 symbols per request.
Response Info¶
The response will contain one or more company objects. The key for each company object is the exchange symbol passed in the request.
Field |
Type |
Description |
---|---|---|
meta |
Meta |
This object contains information about the query for the company object |
results |
Results |
This object contains one or more stock split objects. |
Field |
Type |
Description |
---|---|---|
is_stock_dividend |
bool |
Is Stock Dividend |
day |
date |
Day |
ratio |
decimal |
Ratio |
status |
string |
Status |
Examples¶
The following is an example successful request for 1 company.
Request URL
https://api.ycharts.com/v3/companies/AAPL/splits?start_date=2004-10-10&end_date=2015-01-12
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/companies/AAPL/splits?start_date=2004-10-10&end_date=2015-01-12"
},
"response": {
"AAPL": {
"meta": {
"status": "ok"
},
"results": [
{
"day": "2005-02-28",
"is_stock_dividend": false,
"ratio": 2.0,
"status": "executed"
},
{
"day": "2014-06-09",
"is_stock_dividend": false,
"ratio": 7.0,
"status": "executed"
}
]
}
}
}
The following is an example successful request for multiple companies.
Request URL
https://api.ycharts.com/v3/companies/AAPL,DDR/splits?start_date=2004-10-10&end_date=2015-01-12
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/companies/AAPL,DDR/splits?start_date=2004-10-10&end_date=2015-01-12"
},
"response": {
"AAPL": {
"meta": {
"status": "ok"
},
"results": [
{
"day": "2005-02-28",
"is_stock_dividend": false,
"ratio": 2.0,
"status": "executed"
},
{
"day": "2014-06-09",
"is_stock_dividend": false,
"ratio": 7.0,
"status": "executed"
}
]
},
"DDR": {
"meta": {
"status": "ok"
},
"results": [
{
"day": "2009-03-10",
"is_stock_dividend": true,
"ratio": 1.06656,
"status": "executed"
},
{
"day": "2009-06-09",
"is_stock_dividend": true,
"ratio": 1.04016,
"status": "executed"
}
]
}
}
}
The following is an example incorrect request with an invalid date parameter.
Request URL
https://api.ycharts.com/v3/companies/AAPL/splits?start_date=-2015-01-01&end_date=bad-date
Response
{
"meta": {
"error_code": 400,
"error_message": "Invalid end_date format.",
"status": "error",
"url": "https://api.ycharts.com/v3/companies/AAPL/splits?start_date=-2015-01-01&end_date=bad-date"
},
"response": {}
}