A Beginner’s Guide to the M7 Application Programming Interface
energy-trading
24 Apr 2023
Gautam Kotian, Lead Software Engineer
Intraday markets are among the most liquid power markets in Europe. In 2022, the total volume of Intraday trades executed on EPEX Spot reached a new all-time high of 134,6 GWh (compared to 123,3 GWh in 2021).
As many as 83,6% of orders executed on the exchange came from all kinds of automated trading applications which are in some way directly or indirectly connected to the M7 trading architecture — a platform for continuous power trading used by EPEX Spot — through an M7 application programming interface (API).
What is the M7 API
Automation software deployed to accommodate Intraday Continuous trading at EPEX Spot communicates with the M7 system through an advanced message queueing protocol (AMQP) server that acts as an intermediary between a market participant and the exchange.
Interaction with the exchange is carried out by means of two message exchange patterns: request-response communication initiated by API users — that includes management requests and inquiry requests — and broadcast communication initiated by the system. These patterns allow M7 API users to access the basic functionality of the M7 system, such as:
Order management (i.e. order submission, modification, activation/deactivation and deletion)
Trade management (i.e. submission of recall requests, receiving push notifications on trade state changes)
Load management (i.e. monitoring of the number of orders submitted by an individual market participant within a certain period of time to prevent system overload)
Access to real-time and historical data (i.e. receiving push notifications on market or system updates and accessing different types of historical data products regulated by a participant’s subscription plan)
While order management, trade management and load management are only available to users with read-write permissions, a common practice is to develop a read-only client first and add writing capabilities later.
Follow the link to find the full API documentation: https://www.eex.com/en/market-data/eex-group-datasource/api
How to Connect a Trading Application to the M7 API
Whenever a trading company gets in touch with the EPEX Spot team to connect their trading application to the M7 system via API, exchange representatives guide market participants through the entire integration process that typically consists of the following steps:
Access to API documentation and test environment. Market participants receive full API documentation including the terms of reference, user credentials and a unique identifier to access the test environment.
API implementation. This is the longest and most complex stage in the entire process. The trading company develops a proprietary software application that is able to achieve two-way communication with the exchange using the M7 API while adhering to all requirements mentioned in the EPEX terms of reference.
Testing. To make sure the API connection works smoothly, functional testing is carried out in the M7 test environment — advanced simulation (ASIM) that is identical to the production system in terms of the format of messages.
Conformance test. Before the developed client application can be connected to the M7 system, an EPEX Spot representative has to verify if the client complies with the terms of reference to prevent any interruptions in production. Usually, conformance tests cover technical and connectivity checks together with application responses to specific market events and automated flows of orders and trades.
Certification and go-live. On thorough functional and conformance API connection testing, a market participant receives certification and login credentials necessary to access the M7 production system.
At the first login to the M7 system, the client’s trading application synchronizes with the market and can re-synchronize if a problem occurs (e.g. after a given market comes out of hibernation).
Throughout the whole API running cycle, users are free to send order management and trade management requests (if their number stays within the load thresholds) and get automatic updates broadcast by the system. Given the growing amount of data which should be continuously processed to ensure that all API requests and responses are captured correctly, it’s necessary to establish scalable and robust data processing infrastructures.