Create baskets
A Basket is linked to a given Unit , Auction Session , Service Type , and Service Window . You first need to retrieve those objects to create a Basket.
Fetch auction sessions
#
First you need to retrieve the Auction Session for which you want to create a basket. Use the auctionSessions query to retrieve the list of all auction sessions you have access to. In particular, we are interested in retrieving the ids of the service windows that we will use for creating baskets. Note that the service windows have unique ids, changing every day.
Refer to the Retrieve auction sessions section for an example.
Fetch your units
#
You will also need to retrieve the list of your Units registered into the SMP (Single Market Platform). Use for example the following query.
Fetch available services
#
With the Auction Session retrieved previously, you have access to the list of Service Windows of the auction. Each service window belongs to a specific Service Type . To create a Basket , you will also need the list of Services belonging to each service type. To retrieve all Services, you can use the following query.
For readability, only 2 services are returned in this example, more will be available in practice.
Submit your baskets
#
Use the enterBaskets mutation to create one or multiple baskets at once. If the validation of one of the basket fails, none of them will be created. For each basket, some information will be required, let us go through it step by step.
General information
#
First you need to define a name for your Basket and select a Unit and a Service Window.
Note that a Service Window is linked to a given Service Type and a given Auction Session. All orders of a Basket must exclusively use Services with the same Service Type and that are available for the selected Unit.
Parent order
#
Then you need to provide a parent order. Give it a price and positive volumes for the services of the Basket’s service type for which you want to bid. The list of volumes may be empty, but you can have at most one item per service.
Child orders
#
Optionally, you can also provide some child orders. As for the parent order, give them a price and positive volumes for the services of the Basket’s service type for which you want to bid. Each child order must have at least one non-zero volume and at most one item per service. Up to 10 substitutable and up to 10 non-substitutable child orders are allowed.
Complete example
#
All together it gives us the following query
Validations
#
The EAC is performing some validations to ensure the baskets respect the market rules.
Most of the validation rules are directly explained field by field in the GraphQL reference, see BasketInput for the specifics on baskets creation.
Unit capacity validation
#
The validation rule on the unit capacity is a bit more complex and deserve to be explained in more details.
When creating or updating a basket, the EAC checks if accepting the basket at its maximum volume would exceed the unit capacity and rejects the baskets when it's the case. Due to the multi-services setup and the fact that unit capacity is not a simple linear function when split between multiple service, this validation is a best effort rule to prevent encoding errors. Market participants remain responsible to ensure their baskets are compliant with what their units can deliver.
The capacity check is done at multiple levels. It is performed for each service individually, but also considering all low services together and all high services together. So for a basket with DCL, DCH and DML, there is 5 different capacity validations, one per service plus one for high and one for low services.
First the EAC computes the basket maximum volume. It first computes the maximum volume of each order (parent, child and substitutable child orders) by summing the volumes of all concerned services. The basket maximum volume is then computed as the sum of:
- the maximum volume of the parent order
- the maximum volumes of all the child orders
- the maximum volume of the substitutable child order having the higher maximum volume
Then the EAC computes the unit capacity. A unit is prequalified for a given capacity for each service. This capacity may change slightly between services. As a basket covers multiple services, a single capacity must be computed. As a best effort the maximum capacity allocated to concerned services is used. Note that services for which there is no orders in the basket are ignored.
If the basket maximum volume exceeds the unit capacity, the basket is rejected.
For example, if we have a basket with:
If the unit has a capacity of 25 MW for DCL, 20 MW for DML, 20 for DCH and 26 for DRL, the basket is valid because
- DCL only:
10 + 3 + 0 + max(5, 2) = 18
<=25
- DCH only:
11 + 0 + 4 + max(0, 0) = 15
<=20
- DML only:
2 + 2 + 0 + max(1, 3) = 7
<=20
- high services:
(11) + (0) + (4) + max((0), (0)) = 15
<=20
- low services:
(10 + 2) + (3 + 2) + (0) + max((5 + 1), (2 + 3)) = 23
<=25 = max(25, 20)
Basket structure
Retrieve baskets