Imbalance market data service on top of the Tennet Publication API.
Goals:
- convert REST API into a notification/subscription service
- store and sync historical data to avoid request limits
- improve/standardize data structure and time formatting
api.tennet.eu/publications
- Balance Delta
- Balance Delta High Res
- Merit Order List
- Settlement Prices
- Emergency Power
- Metered Injections
- Settled Imbalance Volumes
- Volume of Settled Activated Restoration and Emergency Reserve (aFRR)
- Reconcilation Prices
The service requires a config.toml file in the root folder with the following properties.
The syncing service requires an API key from the TenneT API Developer Portal, you can register an account here. Without this key the service can still operate, but only provides historical data loaded in from the /data folder.
[tennet]
api_url = "https://api.tennet.eu/publications"
api_key = ""Syncing can be turned on or off by data source. By default the entire data sources is synchronized as far back in time as it is available in the TenneT API. But in the case that service is being used just to publish the latest changes on MQTT syncing can be configured to latest to start from the current time, or alternatively a specific ISO time string can be provided as a starting point.
[tennet.balance_delta_high_res]
enabled = true
sync_from = "latest"
[tennet.settlement_prices]
enabled = true
sync_from = "2026-01-01T23:00:00+01:00"
[tennet.merit_order]
enabled = true
[tennet.balance_delta]
enabled = false[db]
user = "admin"
password = ""
name = "test_db"
host = "localhost"By default publishing updates for data sources on mqtt is disabled. You can turn this on with the following configuration:
[mqtt]
enabled = true
client_id = "tennet-rs-server"
host = "localhost"
port = 1883
username = ""
password = ""
root_topic = "/tennet"All properties are backed up by a default, as shown in the example above. And can be changed set individually, expect for username and password which are mutually exclusive to turn on/off authentication when connecting to the broker.
If the data folder is configured, the service will syncing historical data from the provided files. If turned off, the service will start syncing based on the API, which due to rate limiting can take a while, and it is therefore not recommended.
[data]
path = "./data"When turned on in the configuration the service will publish the latest updates for all sources on separate topics. The topics start with the root_topic from the configuration, which defaults to /tennet if not specified. This is followed by the source path:
- Balance Delta =>
/balance-delta - Balance Delta High Res =>
/balance-delta-high-res - Merit Order List =>
/merit-order - Settlement Prices =>
/settlement-prices
To sync historical data correctly the data folder should follow the format below:
data
└─── balance_delta_high_res
│ │─ BALANCE_DELTA_HIGH_RES_2025-01.csv
│ └─ BALANCE_DELTA_HIGH_RES_2025-02-01.csv
└─── balance_delta
│ │─ BALANCE_DELTA_2025-01.csv
│ └─ BALANCE_DELTA_2025-02-01.csv
└─── merit_order
│ └─ MERIT_ORDER_2025-01.csv
└─── settlement_prices
│─ SETTLEMENT_PRICES_2024.csv
└─ SETTLEMENT_PRICES_2025-01.csv
If you want to gather the historical data yourself you can download the individual CSV files from the TenneT Website. Alternatively, you can use the pre bundled dataset from Birch Systems, which can be downloaded here, to speed up your process. (In a future release, importing historical data will be fully automated)