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 Series

The Indicator Data Series Endpoint is used to obtain a series of data from one or more indicators. It takes optional start_date and end_date parameters and will return all values between the requested dates. It also accepts a number of optional parameters for series resampling and aggregation.

Note

Full list of calcs can be found in the Reference Guide

Request Info

Request Method

GET

URL

https://api.ycharts.com/v3/indicators/code[s]/series?start_date=start_date&end_date=end_date&resample_frequency=resample_frequency&resample_function=resample_function&fill_method=fill_method&aggregate_function=aggregate_function&force_date_range=force_date_range

Request Parameters

Parameter

Required

Description

code[s]

Y

Unique code for an indicator, or a comma separated list of codes

start_date

N

The first date of the desired data range, defaults to one day ago

end_date

N

The last date of the desired data range, defaults to today

resample_frequency

N

This value specfies the desired resampling frequency of each series in the response.

resample_function

N

The operation used to resample data.

fill_method

N

This value specifies the mechanism by which null values in the response are handled.

aggregate_function

N

The operation used to return a single-value statistic per calc series in the response.

force_date_range

N

A resampling parameter that pegs series response data to the supplied date range. (true or false)

Note

  • There is a maximum of 100 indicators per request

  • resample_frequency and resample_function must be specified together.

  • See our API Reference Guide for a complete list of parameter value options.

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.

Indicator Object Fields

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

Indicator Data Series Results Fields

Field

Type

Description

data

Array

An array of arrays, each 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/series?start_date=2013-11-30&end_date=2013-12-31

Response

{
    "meta": {
        "status": "ok",
        "url": "https://api.ycharts.com/v3/indicators/I:USICUI/series?start_date=2013-11-30&end_date=2013-12-31"
    },
    "response": {
        "I:USICUI": {
            "meta": {
                "status": "ok"
            },
            "results": {
                "data": [
                    ["2013-11-30", 305000.0],
                    ["2013-12-07", 369000.0],
                    ["2013-12-14", 380000.0],
                    ["2013-12-21", 341000.0],
                    ["2013-12-28", 345000.0]
                ],
                "meta": {
                    "status": "ok"
                }
            }
        }
    }
}