Skip to main content

Events

An event is a record of something that happened at a time: a trade, a settlement price for a contract, an outage, an order. Events belong to an event list on a master data object. You save them by saving the object with the events in a list property, or by posting a DataFrame to the Event service, and read them with the Event service.

IdWhat it is
NGE.TRADES:FILLSThe event list FILLS on the object NGE.TRADES
NGE.TRADES:FILLS:T1001The event T1001 in that list

Event​

An event has a few fixed fields. Every other field is a property of the event, written at the top level, not inside a properties object.

FieldTypeRequiredWhat it is
_typeStringYesVarEvent
_idStringYesThe id of the event, unique within the event list
eventtimeDateTimeNoWhen the event was recorded, defaults to now
eventstartDateTimeNoWhen the event starts, defaults to eventtime
eventendDateTimeNoWhen the event ends, defaults to eventtime
eventtypeStringNoThe type that defines the event's properties, defaults to #Event
timezoneStringNoThe timezone of the event times
dsidStringNoThe dataset the event belongs to. Stored as _dsid
_sourceStringNocommon to save the event in common data
(any name)AnyNoA property of the event

If events are used to build an event curve, each event also needs the tenor property the curve uses, usually relative (for example M01) or absolute (for example 2026M12). See Period codes for the tenor codes.

The platform adds these fields when the event is saved:

FieldWhat it is
_idReplaced by the full id, objectid:eventlist:eventid
eventidThe id you sent
eventlistThe name of the event list
eventThe event list id, objectid:eventlist
_dataid, _objid, _objtypeThe id within the object, the object id and the object type
statusThe quality status of the event, empty until it is checked
_created, _timestampWhen the event was created and last saved, with the version fields

Event types with _mergeEvent set merge a saved event into the existing one; otherwise the event is replaced.

Saving events in an object​

{
"_id": "NGE.GAS.ZTP",
"_type": "#Object",
"EVENTS": [
{
"_type": "VarEvent",
"_id": "2026-11-18_M01",
"dsid": "NGE.ZTP.SETTLE",
"eventtime": "2026-11-18",
"eventstart": "2026-12-01",
"eventend": "2026-12-31",
"absolute": "2026M12",
"relative": "M01",
"SETTLEMENT_PRICE": 31.425
},
{
"_type": "VarEvent",
"_id": "2026-11-18_M02",
"dsid": "NGE.ZTP.SETTLE",
"eventtime": "2026-11-18",
"eventstart": "2027-01-01",
"eventend": "2027-01-31",
"absolute": "2027M01",
"relative": "M02",
"SETTLEMENT_PRICE": 32.010
}
]
}

Reading an event​

{
"_id": "NGE.GAS.ZTP:EVENTS:2026-11-18_M01",
"_type": "VarEvent",
"eventid": "2026-11-18_M01",
"eventlist": "EVENTS",
"event": "NGE.GAS.ZTP:EVENTS",
"eventtype": "#Event",
"eventtime": "2026-11-18",
"eventstart": "2026-12-01",
"eventend": "2026-12-31",
"_dsid": "NGE.ZTP.SETTLE",
"absolute": "2026M12",
"relative": "M01",
"SETTLEMENT_PRICE": 31.425,
"status": {},
"_dataid": "EVENTS:2026-11-18_M01",
"_objid": "NGE.GAS.ZTP",
"_objtype": "#Object",
"_version": 1,
"_user": "loader@northgate-energy.com",
"_timestamp": "2026-11-18T18:31:09.004"
}

Event list​

When an object is saved with a list of events, the object keeps a reference to the event list in that property, with the event type:

"EVENTS": {
"_type": "VarReference",
"_service": "event",
"_source": "private",
"_oid": "NGE.GAS.ZTP:EVENTS",
"_otype": "VarEvent",
"eventtype": "#Event"
}

The platform also keeps a record of the list:

FieldTypeWhat it is
_idStringThe name of the event list
_typeStringVarEventList
eventtypeStringThe type of the events
_sourceStringThe source of the events
name, descriptionStringTaken from the events, if they have them

Events as a DataFrame​

The Event service also accepts events as a DataFrame: a list of columns and a list of rows in data. Each row becomes an event with a property for each column.

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

Post it to the event list id, for example event/v1/private/NGE.TRADES:FILLS. See the Event service.