Skip to main content

Event Service

Event REST API​

The Event REST API gives to access to Events.

It is accessed through the following URL:

https://api.opendatadsl.com/api/event
MethodPathExampleDescription
GETGet the build information for this service
GET{release}v1List the sources you can read
GET{release}/{source}v1/privateGet a list of the event lists, or of events when you pass a _filter or _aggregate
GET{release}/{source}/{id}v1/private/EXAMPLE:EVENTSGet events for an event list (an id of objectid:eventlist), or a single event
POST{release}/{source}/{id}v1/private/EXAMPLE:EVENTSAdd or update events in an event list from a DataFrame, see Updating events with a DataFrame
POST{release}/{source}v1/privateAdd or update events from a DataFrame with an event column holding objectid:eventlist for each row
PUT{release}/{source}/{id}/{version}/{tag}v1/private/EXAMPLE:EVENTS:ID_2024-05-30_M03/1/PRODTag a version with a name (which can be used instead of the version number when retrieving it)
DELETE{release}/{source}/{id}v1/private/EXAMPLE:EVENTS:ID_2024-05-30_M03Rollback an event to the previous version, if there are no other previous versions, the event will be deleted
DELETE{release}/{source}/{id}/{version}v1/private/EXAMPLE:EVENTS:ID_2024-05-30_M03/*Delete a specific version or use * to delete all versions
info

Events are stored on master data, so you can add and update them by saving the master data record with the events in an event list property (see Examples), or by posting a DataFrame to the event service, which does the same for you.

Query parameters​

ParameterExampleDescription
_objfilter_objfilter={"region":"NW"}Only returns events whose master data matches the filter
_search_search=TTFSearches the events of an event list
_count_count=trueEvent lists are not counted by default, which keeps paging fast on large lists: the response has x-odsl-moredata set to true while there are more pages. Pass _count=true to get the exact total
_history_history=trueWith a DataFrame POST, writes the events as a history load: faster, and no automations are triggered
_fast_fast=trueWith a DataFrame POST, writes the events in fast mode

Updating events with a DataFrame​

The body is a DataFrame: a list of columns, and data with one list of values per row. Each row becomes an event with a property for each column. Post it to the event list id, or to the source with an event column holding the objectid:eventlist of each row. The master data must already exist.

POST https://api.opendatadsl.com/api/event/v1/private/NGE.TRADES:FILLS
Authorization: Bearer {{token}}
Content-Type: application/json

{
"columns": ["_id", "eventtime", "price", "volume"],
"data": [
["T1001", "2026-10-23T09:15:00", 42.15, 10],
["T1002", "2026-10-23T09:32:00", 42.40, 5]
]
}

Functions​

FunctionExampleDescription
timeseriesv1/private/EXAMPLE:EVENTS?_function=timeseries&_tsprop=priceBuilds a timeseries from the events, using the _tsprop property as the value. Optional: _calendar for the timeseries calendar, _range and a _filter on the events
curvev1/private/EXAMPLE:EVENTS:2026-10-23?_function=curve&_vprop=price&_tprop=relative&_calendar=%23ICE.NBPBuilds a curve for the ondate in the id from the events, using _vprop as the value, _tprop as the tenor and _calendar as the expiry calendar (all required). An optional _filter selects the events

Event Object​

An event is freeform apart from some fixed properties as shown below:

NameDescriptionType
_typeAlways 'VarEvent'String
_idA unique id for this event, it must be unique within the event listString
eventtimeDate when the event is recordedString Date
eventstartDate the event starts, defaults to eventtimeString date
eventendDate the event ends, defailts to eventtimeString date

If the event is used to create a curve, the following properties are also required:

NameDescriptionType
absoluteThe absolute tenor period codeString
relativeThe relative tenor period codeString

Using events​

The power of events if to use them to dynamically create timeseries and curves. These are created using VarEventTimeseries and VarEventCurve

Event Timeseries​

An event timeseries is dynamically created using events, the configuration of an event timeseries is shown below:

NameDescriptionType
_idA unique id for the timeseriesString
_typeAlways 'VarEventTimeseries'String
eventThe name of the eventlistString
propertyThe property name to use for the value of the observationsString
filterAn optional filter to use on the eventsString
calendarAn optional calendar to align the indexes, defaults to SPARSEString
indexOptional date field to use for the index used to build this TimeSeries, defaults to startString

Event Curve​

The configuration of an event curve is shown below:

NameDescriptionType
_idA unique id for the curveString
_typeAlways 'VarEventCurve'String
eventThe name of the eventlistString
propertyThe property name to use for the value of the contractsString
filterAn optional filter to use on the eventsString
tenorThe name of the property in the event that this Curve uses as the tenor/maturity codeString
calendarThe expiry calendar for this CurveString
holidayCalendarThe holiday calendar for this Curve - this is used to determine what dates this curve should be published onString
sourceOptional source of the events used to build this CurveString
valueTransformationOptional value transformation expression to change all values in the curveString

Additional properties in curve contracts​

If you want to add more properties to a curve contract such as a vendor provided identifier you can an include property containing either a string or array of strings, e.g.

{
"_id": "#ECB_IR.ESTR.EURO_SHORT_TERM_RATE:RATE",
"_type": "VarEventCurve",
"currency": "EUR",
"units": "PCT",
"name": "Euro short-term rate Curve",
"description": "",
"timezone": "UTC",
"event": "#ECB_IR.ESTR:CURVE",
"property": "obs_value",
"tenor": "relative",
"calendar": "#FEXPESTR",
"properties": {
"include": "key"
}
}

Examples​

Example updating events​

POST {{url}}/object
Authorization: Bearer {{token}}

{
"_id":"EXAMPLE",
"_type":"#Object",
"EVENTS":[
{
"_type": "VarEvent",
"_id": "ID_2024-05-30_M01",
"_dsid": "ODSL.TRADER1.NBP",
"eventtype": "TestEventType",
"eventtime": "2024-05-30",
"eventstart": "2024-06-01",
"eventend": "2024-06-30",
"absolute": "2024M06",
"relative": "M01",
"PRICE": 35.025
},
{
"_type": "VarEvent",
"_id": "ID_2024-05-30_M02",
"_dsid": "ODSL.TRADER1.NBP",
"eventtype": "TestEventType",
"eventtime": "2024-05-30",
"eventstart": "2024-07-01",
"eventend": "2024-07-31",
"absolute": "2024M07",
"relative": "M02",
"PRICE": 35.135
},
{
"_type": "VarEvent",
"_id": "ID_2024-05-30_M03",
"_dsid": "ODSL.TRADER1.NBP",
"eventtype": "TestEventType",
"eventtime": "2024-05-30",
"eventstart": "2024-08-01",
"eventend": "2024-08-31",
"absolute": "2024M08",
"relative": "M03",
"PRICE": 35.155
}
]
}

General examples​

### Get example events
GET {{url}}/event/v1/private/EXAMPLE:EVENTS
Authorization: Bearer {{token}}

### Get some events with projection
GET {{url}}/event/v1/private
?event=EVENT_TEST:ORDERS
&_sort=eventtime
&_project=eventtime,price
Authorization: Bearer {{token}}

### Get an event
GET {{url}}/event/v1/private/EVENT_TEST:ORDERS:ORDER1
Authorization: Bearer {{token}}

### Rollback an event to the previous version
DELETE {{url}}/event/v1/private/EXAMPLE:EVENTS:ID_2024-05-30_M03
Authorization: Bearer {{token}}

### Delete an event
DELETE {{url}}/event/v1/private/EXAMPLE:EVENTS:ID_2024-05-30_M03/*
Authorization: Bearer {{token}}

### Get a list of versions of an event
GET {{url}}/event/v1/private/EVENT_TEST:ORDERS:ORDER1/*
Authorization: Bearer {{token}}

### Get a version of an event
GET {{url}}/event/v1/private/EVENT_TEST:ORDERS:ORDER1/1
Authorization: Bearer {{token}}

### Tag a version of an event
PUT {{url}}/event/v1/private/EVENT_TEST:ORDERS:ORDER1/3/TEST
Authorization: Bearer {{token}}

### Get a tagged version of an event
GET {{url}}/event/v1/private/EVENT_TEST:ORDERS:ORDER1/TEST
Authorization: Bearer {{token}}

Event timeseries and curves​

### Create an event timeseries
POST {{url}}/object
Authorization: Bearer {{token}}

{
"_id": "EVENT_TEST",
"_type": "#Object",
"_links": {},
"ASK_TS": {
"_id": "ASK_TS",
"_type": "VarEventTimeSeries",
"event": "EVENT_TEST:ORDERS",
"property": "price",
"filter": "{'side': 'ASK'}"
}
}

### Create an event curve
POST {{url}}/object
Authorization: Bearer {{token}}

{
"_id": "PZEM.ZTP.TEST",
"_type": "#Object",
"SETTLE": {
"_id": "SETTLE",
"_type": "VarEventCurve",
"event": "PZEM.ZTP.TEST:EVENTS",
"property": "SETTLEMENT_PRICE",
"tenor": "absolute",
"calendar": "#REOD",
"timezone": "Europe/Amsterdam"
}
}

### Create an event curve with value transformation
POST {{url}}/object
Authorization: Bearer {{token}}

{
"_id": "AAA",
"_type": "#Object",
"_links": {},
"VTEC": {
"_id": "VTEC",
"_type": "VarEventCurve",
"name": "test",
"event": "AAA:ECE",
"property": "price",
"valueTransformation": "value * 1.1",
"tenor": "absolute",
"calendar": "#REOMB"
}
}