Skip to content

DEV-6443 - Implement ECB ESTR support in MarketDataProviders#8

Draft
lbrame-fairmat wants to merge 15 commits intofairmat:masterfrom
lbrame-fairmat:DEV-6443-add-eonia-estr-ecb-integration
Draft

DEV-6443 - Implement ECB ESTR support in MarketDataProviders#8
lbrame-fairmat wants to merge 15 commits intofairmat:masterfrom
lbrame-fairmat:DEV-6443-add-eonia-estr-ecb-integration

Conversation

@lbrame-fairmat
Copy link

@lbrame-fairmat lbrame-fairmat commented Mar 11, 2026

This Merge Request adds support for downloading €STR (Euro short-term Rate) data from the European Central Bank REST API endpoints.

Organization

The new logic is available in the EuropeanCentralBankIntegration.Estr namespace. The choice was made not to extend the pre-existing classes because there were next to no re-usable components there, and the code had not been touched for over 10 years. The old APIs dealt with SOAP/XML APIs, while the new Estr integration consumes RESTful APIs set to directly return a CSV payload.

Classes

  • EuropeanCentralBankExchangeIntegration/Estr/EuropeanCentralBankEstrIntegration.cs is the entry point for the data ingestion process. This class implements the usual DVPLI interfaces and it should be compatible with Fairmat's existing pipeline (WIP: Needs to be confirmed still). For external users, DVPLI is not free software, so you probably don't really care about this class beyond seeing what methods of the API client it calls. Assume DVPLI just exposes some simple types you can probably quickly re-implement yourself in this case. Technically, this is a Mono plugin.
  • EuropeanCentralBankExchangeIntegration/Estr/Api/EuropeanCentralBankEstrApiClient.cs is the API client. This class is needed to request the ESTR data from the correct endpoint. It consumes the parser to parse the CSV into an intermediate representation.
  • EuropeanCentralBankExchangeIntegration/Estr/Constants/DataPortal.cs includes constants containing all the different data portals one might want to download data from using the ECB REST API. For now, only one (the main one for this data type) is implemented, but this class should make it easier to refactor and extend this development in the future, although it is a bit redundant in its current state.
  • EuropeanCentralBankExchangeIntegration/Estr/Dto/EstrQuoteDto.cs is a strongly-typed intermediate representation that corresponds to one line of the CSV requested from the API. It gets returned by the parser, and objects of this type get used as input to construct the specific Fairmat DVPLI objects for data ingestion.
  • EuropeanCentralBankExchangeIntegration/Estr/Enums/SupportedCurrencies.cs is an enumerator enumerating all supported currencies. Only EUR is supported in this state. Same rationale as the constants class above - it should be here for future extensibility.
  • EuropeanCentralBankExchangeIntegration/Estr/Exceptions/CsvParsingException.cs - Simple exception to signal that something has gone wrong with the CSV parsing process in particular.
  • EuropeanCentralBankExchangeIntegration/Estr/Parsing/EstrParser.cs - Collection of methods that are used to parse the CSV into EstrQuoteDto intermediate objects, and filter API requests by date to obtain a time series result.

Tests

Some tests have been added to help development, debugging and to help catch regressions. They are mostly integration tests, but there are some unit tests for those methods of the Integration class that should just return a static result: MarketDataProviders.Tests/EuropeanCentralBankIntegration/Estr/UnitTests/EstrIntegrationUnitTest.cs.

It should prove useful, in future developments, to add a mocking library suck as NSubstitute to the solution to allow testing the API client in a less flaky way, mocking the API response instead of relying on a value that is there in the response today but that might not be there tomorrow.

Currently available tests are:

  • MarketDataProviders.Tests/EuropeanCentralBankIntegration/Estr/IntegrationTests/EstrApiClientIntegrationTest.cs - Integration tests for the API client
  • MarketDataProviders.Tests/EuropeanCentralBankIntegration/Estr/IntegrationTests/EstrIntegrationIntegrationTest.cs - Integration tests for the DVPLI plugin
  • MarketDataProviders.Tests/EuropeanCentralBankIntegration/Estr/IntegrationTests/EstrParserFilterIntegrationTest.cs - Specifically tests the parser method to extract one or more DTOs from a parsed response within a certain time period
  • MarketDataProviders.Tests/EuropeanCentralBankIntegration/Estr/UnitTests/EstrIntegrationUnitTest.cs - Tests for the DVPLI Integration plugin class that could not reasonably be considered integration tests

Next steps

Before moving on, I still need to solve the following todos:

  • Verify if the automated ingestion pipeline indeed works in this state, or if any changes are required
  • Verify if the currently chosen name for the tickers are OK, or if they need to be changed


namespace EuropeanCentralBankIntegration.Estr
{
[Mono.Addins.Extension("/Fairmat/MarketDataProvider")]
Copy link
Author

@lbrame-fairmat lbrame-fairmat Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class might be redundant because it maps itself to the same Mono plugin as EuropeanCentralBankExchangeIntegration/EuropeanCentralBankIntegration.cs, maybe on second thought it might be a better idea to integrate this logic on the pre-exeisting one

…rs.Tests/EuropeanCentralBankIntegration/IntegrationTests/EstrApiClientIntegrationTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant