Time Series Data
Time Series Data
Time Series Data
Many of our Market Signal Platform Data endpoints access time series data--data that you can time-window via dates and times. These endpoints use our GET /data method with different key and subkey path parameters.
HTTP requests, like the following Dividends request, follow the GET /data request pattern.
Request Pattern:
BASE_URL/data/core/DATASET/:key/:subkey?token=YOUR_TOKEN&YOUR_QUERY_PARAMS
Example Request:
You can execute the following example request after applying a valid token in place of YOUR_TOKEN in the requests.
https://api.marketsignal.six-group.com/v1/data/CORE/SIX_1BBO/:ISIN?token=YOUR_TOKEN
Request Components:
| Component | Description |
|---|---|
BASE_URL | https://api.marketsignal.six-group.com/v1/ |
DATASET | Dataset ID as specified in the endpoint's reference page. For example, the 1BBO reference page specifies Dataset ID 1BBO. |
:key | The key is the primary index value to query on. For example, the symbol aapl is used as the key in method call /data/core/advanced_dividends/aapl. The reference page's Path Parameters section marks the key attribute. For example, the 1BBO endpoint's key attribute is symbol. |
:subkey | Optional. A subkey is a secondary index value to query on, in addition to the key. For example, the reference ID 2733643 is used as the subkey in method call. If a dataset has a secondary index, the reference page's Path Parameters section marks the subkey attribute with the label subkey. |
TOKEN | An API Token authorized with read permissions for the dataset. |
Query Parameters
You can use query parameters with time series endpoints to filter results based on supported criteria. In particular, date filtering is available through the Supported Ranges parameters.
Date Filtering
Some endpoints include a date-based index that allows you to filter data by a specific date or range of dates. The relevant date attribute is identified in the endpoint's Response Attributes section (look for the date label).
You can filter by:
| Parameter | Type | Details |
|---|---|---|
| range | string | Optional. Returns data for a given range. Supported ranges described below. |
| calendar | boolean | Optional. Boolean. Used in conjunction with range to return data in the future. |
| limit | number | Optional. Limits the number of results returned. Defaults to 1 when no date or range {subkey} is specified |
| offset | number | Optional. Provides pagination. Skip n rows (≥ 0). |
| subattribute | string | Optional. Allows you to query time series by fields in the result set. All time series data is stored by ID, then key, then subkey. If you want to query by any other field in the data, you can use subattribute. For example, news may be stored as /news/{symbol}/{newsId}, and the result data returns the keys id, symbol, date, sector, hasPaywall, langBy default you can only query by symbol or id. Maybe you want to query all news where the language is English. Your query would be: /time-series/news?subattribute=lang|en The syntax is subattribute={keyName1}|{value1},{keyName2}|{value2} Both the key name and the value are case sensitive. A pipe symbol ( |) is used to represent "equal to", and a tilde symbol (~) is used to represent "not equal to". |
| dateField | string | Optional. All time series data is stored by a single date field, and that field is used for any range or date parameters. You may want to query time series data by a different date in the result set. To change the date field used by range queries, pass the case sensitive field name with this parameter. For example, corporate buy back data may be stored by announce date, but also contains an end date which you'd rather query by. To query by end date you would use dateField=endDate&range=last-week |
| from | string | Optional. Returns data on or after the given from date. Format YYYY-MM-DD |
| to | string | Optional. Returns data on or before the given to date. Format YYYY-MM-DD |
| on | string | Optional. Returns data on the given date. Format YYYY-MM-DD |
| last | number | Optional. Returns the latest n number of records in the series |
| next | number | Optional. Returns the next n number of records in the series |
| first | number | Optional. Returns the first n number of records in the series |
| filter | string | Optional. The standard filter parameter. Filters return data to the specified comma delimited list of keys (case-sensitive) |
| format | string | Optional. The standard format parameter (json or csv). Returns data as JSON by default. |
| sort | string | Optional. Specify the order of results, either ASC or DESC. Historical queries, including queries that use last, will default to descending date order (e.g. first record returned is most recent record). Forward looking queries, including queries that use first or specify calendar, will default to ascending date order (e.g. first record returned is nearest record in the future or from the start). |
| interval | number | Optional. Return every nth record in the result |
Supported Ranges
| Parameter | Details |
|---|---|
| today | Returns data for today |
| yesterday | Returns data for yesterday |
| ytd | Returns data for the current year |
| last-week | Returns data for Sunday-Saturday last week |
| last-month | Returns data for the last month |
| last-quarter | Returns data for the last quarter |
| d | Use the short hand d to return a number of days. Example: 2d returns 2 days. If calendar=true, data is returned from today forward. |
| w | Use the short hand w to return a number of weeks. Example: 2w returns 2 weeks. If calendar=true, data is returned from today forward. |
| m | Use the short hand m to return a number of months. Example: 2m returns 2 months. If calendar=true, data is returned from today forward. |
| q | Use the short hand q to return a number of quarters. Example: 2q returns 2 quarters. If calendar=true, data is returned from today forward. |
| y | Use the short hand y to return a number of years. Example: 2y returns 2 years. If calendar=true, data is returned from today forward. |
| tomorrow | Calendar data for tomorrow. Requires calendar=true |
| this-week | Calendar data for Sunday-Saturday this week. Requires calendar=true |
| this-month | Calendar data for current month. Requires calendar=true |
| this-quarter | Calendar data for current quarter. Requires calendar=true |
| next-week | Calendar data for Sunday-Saturday next week. Requires calendar=true |
| next-month | Calendar data for next month. Requires calendar=true |
| next-quarter | Calendar data for next quarter. Requires calendar=true |
| specific quarter | Use the short hand Q[1-4]YYYY to return a specific quarter for a given year. Example: Q22020 returns from January 1, 2020 to March 31, 2020. |
| specific half | Use the short hand H[1-2]YYYY to return a specific half for a given year. Example: H12020 returns from January 1, 2020 to June 30, 2020. |
| specific year | Use the short hand YYYY to return a specific half for a given year. Example: 2020 returns from January 1, 2020 to December 31, 2020. |