Skip to main content

Data Service

The data resource contains all the complex data types like TimeSeries and Curve

Data REST API

The Data REST API is a read-only API allowing you to search and filter the complex data types and is accessed through the following URL:

https://api.opendatadsl.com/api/data
note

The API is read-only because you must relate the data entity to an object entity - so saving and deleting object entities with data properties will save and delete those related data entities

REST Methods

The API consists of the following calls:

MethodPathExampleDescription
GETGet the build information for this service
GET{release}/{source}'v1/public' 'v1/private'List public or private data items
GET{release}/{source}/{key}v1/private/TEST:SPOTRetrieve a single data item using its id

Query Parameters

Below is a table of the query parameters that are usable with the data REST API

ParameterUsable OnExampleDescription
tenorCurvetenor=M01Retrieves an historic TimeSeries of a specific tenor of a curve
listTenorsCurvelistTenorsLists all the relative tenors available in this curve
_range lastTimeSeries_range=last(3)Returns the last n observations
_range fromTimeSeries_range=from(2021-03-01)Returns all observations from the specified date
_range fromTimeSeries_range=from(2021-03-01,Europe/Paris)Returns all observations from the specified date converted to the specified timezone
_range betweenTimeSeries_range=between(2021-03-01,2021-03-31)Returns only the observation within the specified range
_range betweenTimeSeries_range=between(2021-03-01,2021-03-31,Europe/Paris)Returns only the observation within the specified range in the specified timezone
_idAny_id=MYCURVE:2021-03-01Used when retrieving multiple data entities from anywhere (use all as source)
currencyAnycurrency=USDConverts the TimeSeries or Curve to the supplied currency
unitsAnyunits=MTConverts the TimeSeries or Curve to the supplied units
__densityAny__density=980When used in conjunction with unit conversion, this overrides the default density of the product being converted

Entities

There are currently 2 types of data entities (and their sub-entities):

  • TimeSeries
    • TimeValue
      • Status
  • Curve
    • Contract
      • Status

TimeSeries Entity

Here are the properties of a TimeSeries

NameDescriptionType
_idUnique id for the TimeSeries (or object id if this is not the latest version)String
_typeThe type of the entity - always VarTimeSeriesString
descriptionA description of the TimeSeriesString
startThe start timestamp of the TimeSeriesString(DateTime)
calendarThe code for the calendar that this TimeSeries maps toString
timezoneThe timezone of the observationsString
currencyThe currency codeString
unitsThe units codeString
propertiesAn object containing custom dynamic propertiesObject
_objidThe id of the object that this belongs toString
_dataidThe name of the data id in the objectString
_accessThe data access role that this data belongs toString
_objtypeThe object type of the object that this belongs toString
_oidThe id of the calendar - will match _id if this is the latest version of the calendarString
_timestampTimestamp of when this calendar version was createdString(DateTime)
_userThe user id (email) of the user that created this calendar verisionString
_tagA list of version tag names for this calendar versionString[]
_versionThe version number of this calendar versionint
dataThe time series observationsTimeValue[]

TimeValue Entity

The TimeValue entity represents a single observation on a TimeSeries

NameDescriptionType
timeThe time point for this observationString(DateTime)
valueThe value of this observationString or Numeric
statusA status objectStatus

Status Entity

The Status entity represents the quality, source and reliability status of a TimeValue or Contract entity

NameDescriptionType
qualityThe data quality 'UNCHECKED' 'VALID' 'FAILED'String
sourceThe data source 'NEW' 'CHANGED' 'IMPLIED' 'FILLED' 'CONVERTED' 'CALCULATED'String
reliabilityThe reliability status 'UNKNOWN' 'QUOTED' 'OBSERVED' 'UNOBSERVED'String
note

Each status value can optionally be suffixed with a ':' and some information about the status, e.g. quality=FAILED:Failed Spike Check of 5%

Curve Entity

Here are the properties of a curve

NameDescriptionType
_idUnique id for the curve (or object id if this is not the latest version)String
_typeThe type of the entity - always VarCurveString
ondateAn object representing a CurveDateCurveDate
currencyThe currency codeString
unitsThe units codeString
propertiesAn object containing custom dynamic propertiesObject
_objidThe id of the object that this belongs toString
_dataidThe name of the data id in the objectString
_accessThe data access role that this data belongs toString
_objtypeThe object type of the object that this belongs toString
_oidThe id of the calendar - will match _id if this is the latest version of the calendarString
_timestampTimestamp of when this calendar version was createdString(DateTime)
_userThe user id (email) of the user that created this calendar verisionString
_tagA list of version tag names for this calendar versionString[]
_versionThe version number of this calendar versionint
contractsAn array of Contract entitiesContract[]

Contract Entity

The contract entity represents a single tenor or contract on a forward curve

NameDescriptionType
tenorThe tenor period codeString
valueThe value of this tenorNumeric
statusThe status objectStatus
ondateAn object representing a CurveDateCurveDate
propertiesAn object containing some standard properties and any custom dynamic propertiesObject

The standard properties on a Contract are:

  • absolute - The absolute period code of the tenor
  • relative - The relative period code of the tenor
  • expiry - The expiry or last trading date of the tenor
  • start - The start of delivery if it is a delivered commodity
  • end - The end of delivery if it is a delivered commodity

Examples

### Get build info
GET https://api.opendatadsl.com/api/data
Authorization: Bearer {{token}}

### Get all public data types
GET https://api.opendatadsl.com/api/data/v1/public?_distinct=_objtype
Authorization: Bearer {{token}}

### Get a public data
GET https://api.opendatadsl.com/api/data/v1/public/%23ECB_FX.EURGBP:SPOT
Authorization: Bearer {{token}}

### Get a time-series range using last(n)
GET https://api.opendatadsl.com/api/data/v1/public/%23ECB_FX.EURGBP:SPOT?_range=last(3)
Authorization: Bearer {{token}}

### Get a time-series range using from(d)
GET https://api.opendatadsl.com/api/data/v1/public/%23ECB_FX.EURGBP:SPOT?_range=from(2021-03-08)
Authorization: Bearer {{token}}

### Get a time-series range using between(d,d)
GET https://api.opendatadsl.com/api/data/v1/public/%23ECB_FX.EURGBP:SPOT?_range=between(2021-02-26,2021-03-01)
Authorization: Bearer {{token}}

### Get a time-series range for a list of data
GET https://api.opendatadsl.com/api/data/v1/public
?_filter={"_objtype":"%23ForeignExchange"}
&_range=last(1)
Authorization: Bearer {{token}}

### Get a time-series range for a list of data using object filtering
GET https://api.opendatadsl.com/api/object/v1/public
?_filter={"_type":"%23ForeignExchange"}
&_profile=SPOT
&_range=last(1)
Authorization: Bearer {{token}}

### Get a time-series range using from(n) with a rule date
GET https://api.opendatadsl.com/api/data/v1/public/%23ECB_FX.EURGBP:SPOT?_range=from(t-D1h0m0s0)
Authorization: Bearer {{token}}

### Get a curve
GET https://api.opendatadsl.com/api/data/v1/private/TUTORIAL_ODSL_CURVE:PREMIUM:2021-07-06
Authorization: Bearer {{token}}

### Get ALL
GET https://api.opendatadsl.com/api/data/v1/public
?_project={"_type":1}
&_sort={"_id":1}
&_limit=-1
Authorization: Bearer {{token}}

### Get data for multiple ids both private and public
GET https://api.opendatadsl.com/api/data/v1/all
?_id=%23ECB_FX.EURGBP:SPOT
&_id=tsobj:SPOT
Authorization: Bearer {{token}}

### Get data for multiple ids both private and public
GET https://api.opendatadsl.com/api/data/v1/all
?_id=%23DCE.AG.CN.A.NO1_SOYBEAN.FUT:OI:2021-11-30
&_id=TUTORIAL_ODSL_CURVE:PREMIUM:2021-07-06
Authorization: Bearer {{token}}

### Get Curve TimeSeries
GET https://api.opendatadsl.com/api/data/v1/public/%23DCE.AG.CN.A.NO1_SOYBEAN.FUT:OI?tenor=M02
Authorization: Bearer {{token}}

### List curve tenors
GET https://api.opendatadsl.com/api/data/v1/public/%23DCE.AG.CN.A.NO1_SOYBEAN.FUT:SETTLE?listTenors
Authorization: Bearer {{token}}