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.
Indicator Data Point¶
The Indicator Data Point Endpoint is used to obtain a single date-value pair of data from one or more indicators. It takes an optional date parameter and will return the latest value before the requested date.
Note
Full list of calcs can be found in the Reference Guide
Request Info¶
Request Method |
GET |
URL |
https://api.ycharts.com/v3/indicators/ |
Request Parameters¶
Parameter |
Required |
Description |
---|---|---|
code[s] |
Y |
Unique code for an indicator, or a comma separated list of codes |
date |
N |
Date of the desired data point, defaults to the latest data point |
Note
There is a maximum of 100 indicators per request
Response Info¶
The response will contain one or more indicator objects. The key for each indicator object is the unique code passed in the request.
Field |
Type |
Description |
---|---|---|
meta |
Meta |
This object contains information about the query for the indicator object |
results |
Results |
This object contains the results of the query |
Field |
Type |
Description |
---|---|---|
data |
Array |
An array containing a date-value pair |
meta |
Meta |
This object contains information about the query for the data |
Examples¶
The following is an example successful response
Request URL
https://api.ycharts.com/v3/indicators/I:USICUI/points
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/indicators/I:USICUI/points"
},
"response": {
"I:USICUI": {
"meta": {
"status": "ok"
},
"results": {
"data": [
"2014-04-26",
344000.0
],
"meta": {
"status": "ok"
}
}
}
}
}
The following is an example incorrect request, which requests a data point that does not exist
Request URL
https://api.ycharts.com/v3/indicators/I:USICUI/points?date=1800-01-01
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/indicators/I:USICUI/points?date=1800-01-01"
},
"response": {
"I:USICUI": {
"meta": {
"status": "ok"
},
"results": {
"meta": {
"error_code": 404,
"error_message": "Data Not Found.",
"status": "error"
}
}
}
}
}