Client API Reference

You can use any of the four prepared clients to communicate to services of the other parties.

class shapeshifter_uftp.client.ShapeshifterAgrCroClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the Aggregator to connect to the CRO.

send_agr_portfolio_update(message: AgrPortfolioUpdate) PayloadMessageResponse[source]

The AGRPortfolioUpdate is used by the AGR to indicate on which Connections it represents prosumers.

send_agr_portfolio_query(message: AgrPortfolioQuery) PayloadMessageResponse[source]

The AGRPortfolioQuery is used by the AGR to retrieve additional information on the connections.

class shapeshifter_uftp.client.ShapeshifterAgrDsoClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the Aggregator to connect to the DSO.

send_d_prognosis(message: DPrognosis) PayloadMessageResponse[source]

D-Prognosis messages are used to communicate D-prognoses between AGRs and DSOs. D-Prognosis messages always contain data for all ISPs for the period they apply to, even if a prognosis is sent after the start of the period, when one or more ISPs are already in the operate or settlement phase. Receiving implementations should ignore the information supplied for those ISPs.

send_flex_request_response(message: FlexRequestResponse) PayloadMessageResponse[source]

Upon receiving and processing a FlexRequest message, the receiving implementation must reply with a FlexRequestResponse, indicating whether the flexibility request was processed successfully.

send_flex_offer(message: FlexOffer) PayloadMessageResponse[source]

FlexOffer messages are used by AGRs to make DSOs an offer for provision of flexibility. A FlexOffer message contains a list of ISPs and, for each ISP, the change in consumption or production offered and the price for the total amount of flexibility offered. FlexOffer messages can be sent once a FlexRequest message has been received but can also be sent unsolicited. Note that multiple FlexOffer messages may be sent based on a single FlexRequest, e.g. to increase the chance that the DSO will order at least part of its available flexibility. The AGR must make sure that it can actually provide the flexibility offered across all of its FlexOffers.

send_flex_offer_revocation(message: FlexOfferRevocation) PayloadMessageResponse[source]

The FlexOfferRevocation message is used by the AGR to revoke a FlexOffer previously sent to a DSO. It voids the FlexOffer, even if its validity time has not yet expired. Revocation is not allowed for FlexOffers that already have associated accepted FlexOrders.

send_flex_order_response(message: FlexOrderResponse) PayloadMessageResponse[source]

Confirm the flex order.

send_flex_settlement_response(message: FlexSettlementResponse) PayloadMessageResponse[source]

Upon receiving and processing a FlexSettlement message, the AGR must reply with a FlexSettlementResponse, indicating whether the initial message was handled successfully. When a FlexSettlement message is rejected, the DSO should consider all FlexOrderSettlement elements of that message related to potential dispute.

send_flex_reservation_update_response(message: FlexReservationUpdateResponse) PayloadMessageResponse[source]

Confirm the flex reservation update.

send_metering(message: Metering) PayloadMessageResponse[source]

Send metering data to the DSO.

class shapeshifter_uftp.client.ShapeshifterCroAgrClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the CRO to connect to the Aggregator.

send_agr_portfolio_update_response(message: AgrPortfolioUpdateResponse)[source]

The DSOPortfolioUpdate is used by the DSO to indicate on which congestion points it wants to engage in flexibility trading.

send_agr_portfolio_query_response(message: AgrPortfolioQueryResponse)[source]

DSOPortfolioQuery is used by DSOs to discover which AGRs represent connections on its registered congestion point(s).

class shapeshifter_uftp.client.ShapeshifterCroDsoClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the CRO to connect to the DSO.

There are only two types of messages that the CRO can send to the DSO:

  • DsoPortfolioUpdateResponse

  • DsoPortfolioQueryResponse

Each of these comes after the DSO sends a DsoPortfolioUpdate or DsoPortfolioQuery, respectively.

send_dso_portfolio_update_response(message: DsoPortfolioUpdateResponse)[source]

The DSOPortfolioUpdate is used by the DSO to indicate on which congestion points it wants to engage in flexibility trading.

send_dso_portfolio_query_response(message: DsoPortfolioQueryResponse)[source]

DSOPortfolioQuery is used by DSOs to discover which AGRs represent connections on its registered congestion point(s).

class shapeshifter_uftp.client.ShapeshifterDsoAgrClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the DSO to connect to the Aggregator.

send_d_prognosis_response(message: DPrognosisResponse) PayloadMessageResponse[source]

Confirm reception of the D-prognosis.

send_flex_request(message: FlexRequest) PayloadMessageResponse[source]

FlexRequest messages are used by DSOs to request flexibility from AGRs. In addition to one or more ISP elements with Disposition=Requested, indicating the actual need to reduce consumption or production, the message should also include the remaining ISPs for the current period where Disposition=Available.

send_flex_offer_response(message: FlexOfferResponse) PayloadMessageResponse[source]

Confirm reception of a flex offer.

send_flex_order(message: FlexOrder) PayloadMessageResponse[source]

FlexOrder messages are used by DSOs to purchase flexibility from an AGR based on a previous FlexOffer. A FlexOrder message contains a list of ISPs, with, for each ISP, the change in consumption or production to be realized by the AGR, and the accepted price to be paid by the DSO for this amount of flexibility. This ISP list should be copied from the FlexOffer message without modification: AGR implementations will (and must) reject FlexOrder messages where the ISP list is not exactly the same as offered.

send_flex_reservation_update(message: FlexReservationUpdate) PayloadMessageResponse[source]

For bilateral contracts, FlexReservationUpdate messages are used by DSOs to signal to an AGR which part of the contracted volume is still reserved and which part is not needed and may be used for other purposes. For each ISP, a power value is given which indicates how much power is still reserved. Zero power means that no power is reserved for that ISP and the sign of the power indicates the direction.

send_flex_settlement(message: FlexSettlement) PayloadMessageResponse[source]

The FlexSettlement message is sent by DSOs on a regular basis (typically monthly) to AGRs, in order to initiate settlement. It includes a list of all FlexOrders placed by the originating party during the settlement period.

send_flex_offer_revocation_response(message: FlexOfferRevocationResponse) PayloadMessageResponse[source]

Upon receiving and processing a FlexOfferRevocation message, the receiving implementation must reply with a FlexOfferRevocationResponse, indicating whether the revocation was handled successfully.

send_metering_response(message: MeteringResponse) PayloadMessageResponse[source]

Confirm reception of metering data.

class shapeshifter_uftp.client.ShapeshifterDsoCroClient(sender_domain: str, signing_key: str, recipient_domain: str, recipient_endpoint: str | None = None, recipient_signing_key: str | None = None)[source]

Client that allows the DSO to connect to the CRO.

send_dso_portfolio_update(message: DsoPortfolioUpdate)[source]

The DSOPortfolioUpdate is used by the DSO to indicate on which congestion points it wants to engage in flexibility trading.

send_dso_portfolio_query(message: DsoPortfolioQuery)[source]

DSOPortfolioQuery is used by DSOs to discover which AGRs represent connections on its registered congestion point(s).