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.

Data Types

YCharts data is returned using one of the data types below

Data Type

Description

Array

A regular JSON array

Boolean

A regular JSON boolean

String

A regular JSON string

Number

A regular JSON float or integer

Meta

A JSON object containing meta information about the object in which it is contained

Date

A JSON string with the format “mm/dd/yyyy”

Datetime

A JSON string with the format “mm/dd/yyyyThh:mm”

Date Types

Request

When entering a date in the query string of a request, several formats can be used.

Absolute

To enter an absolute date, enter it using the format YYYY-MM-DD

Relative

To enter a relative date, enter simply a number to specify a relative number of periods. Enter a negative number for periods back in time.

Latest

If no date is passed in the query string, the most recent data point will be returned for point queries, and a start date of yesterday and an end date of today will be set for series queries.

Note

For calculations and data that has intra-day data available, querying with the Latest date type will return the most recent data point for the current day.

Request Date Examples

Format

Examples

Absolute

2014-01-01

2000-10-24

Relative

-30

15

Response

A date or datetime returned in the response will be a string formatted as mentioned above. All times are in UTC.

Response Date Examples

Format

Examples

Date

01/01/2014

10/24/2000

Datetime

01/01/2014T10:00

10/24/2000T15:00