Skip to content

electricity_trading_pb2

frequenz.api.electricity_trading.v1.electricity_trading_pb2 ¤

Generated protocol buffer code.

Attributes¤

frequenz.api.electricity_trading.v1.electricity_trading_pb2.MARKET_SIDE_BUY module-attribute ¤

MARKET_SIDE_BUY: ValueType

BUY: Order to purchase electricity. This is referred to as a 'bid' in the order book.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.MARKET_SIDE_SELL module-attribute ¤

MARKET_SIDE_SELL: ValueType

SELL: Order to sell electricity. This is referred to as an 'ask' or 'offer' in the order book.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.MARKET_SIDE_UNSPECIFIED module-attribute ¤

MARKET_SIDE_UNSPECIFIED: ValueType

UNSPECIFIED: The side of the market has not been set.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_EXECUTION_OPTION_AON module-attribute ¤

ORDER_EXECUTION_OPTION_AON: ValueType

All or None: Order must be executed in its entirety, or not executed at all.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_EXECUTION_OPTION_FOK module-attribute ¤

ORDER_EXECUTION_OPTION_FOK: ValueType

Fill or Kill: Order must be executed immediately in its entirety, or not at all.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_EXECUTION_OPTION_IOC module-attribute ¤

ORDER_EXECUTION_OPTION_IOC: ValueType

Immediate or Cancel: Any portion of an order that cannot be filled immediately will be cancelled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_EXECUTION_OPTION_UNSPECIFIED module-attribute ¤

ORDER_EXECUTION_OPTION_UNSPECIFIED: ValueType

UNSPECIFIED: The order execution option has not been set.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_ACTIVE module-attribute ¤

ORDER_STATE_ACTIVE: ValueType

ACTIVE: The order has been confirmed and is open in the market. It may be unfilled or partially filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_CANCELED module-attribute ¤

ORDER_STATE_CANCELED: ValueType

CANCELED: The order has been cancelled. This can occur due to a cancellation request by the market participant, system, or market operator. The order may be unfilled or partially filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_EXPIRED module-attribute ¤

ORDER_STATE_EXPIRED: ValueType

EXPIRED: The order has not been filled within the defined duration and has expired. It may be unfilled or partially filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_FAILED module-attribute ¤

ORDER_STATE_FAILED: ValueType

FAILED: The order submission failed and was unable to be placed on the order book, usually due to a validation error or system issue.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_FILLED module-attribute ¤

ORDER_STATE_FILLED: ValueType

FILLED: The order has been completely filled and there are no remaining quantities on the order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_HIBERNATE module-attribute ¤

ORDER_STATE_HIBERNATE: ValueType

HIBERNATE: The order has been entered into the system but is not currently exposed to the market. This could be due to certain conditions not yet being met. The order may be unfilled or partially filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_PENDING module-attribute ¤

ORDER_STATE_PENDING: ValueType

PENDING: The order has been sent to the marketplace but has not yet been confirmed. This can be due to awaiting validation or system processing.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_STATE_UNSPECIFIED module-attribute ¤

ORDER_STATE_UNSPECIFIED: ValueType

UNSPECIFIED: The order state is not known. This is usually the default state of a newly created order object before any operations have been applied. The order may be unfilled or partially filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_BALANCE module-attribute ¤

ORDER_TYPE_BALANCE: ValueType

BALANCE: (Not yet supported) Balance order aims to balance supply and demand, usually at a specific location or within a system.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_BLOCK module-attribute ¤

ORDER_TYPE_BLOCK: ValueType

BLOCK: (Not yet supported) User defined block order, generally a large quantity order filled all at once.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_ICEBERG module-attribute ¤

ORDER_TYPE_ICEBERG: ValueType

ICEBERG: A large order divided into smaller lots to hide the actual order quantity. Only the visible part of the order is shown in the order book.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_LIMIT module-attribute ¤

ORDER_TYPE_LIMIT: ValueType

LIMIT: Order to buy or sell at a specific price or better. It remains active until it is filled, cancelled, or expired.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_PREARRANGED module-attribute ¤

ORDER_TYPE_PREARRANGED: ValueType

PRE: (Not yet supported) On exchange prearranged trade, a trade that has been privately negotiated and then submitted to the exchange.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_PRIVATE module-attribute ¤

ORDER_TYPE_PRIVATE: ValueType

PRIVATE: (Not yet supported) Private and confidential trade, not visible in the public order book and has no market impact.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_STOP_LIMIT module-attribute ¤

ORDER_TYPE_STOP_LIMIT: ValueType

STOP_LIMIT: An order that will be executed at a specified price, or better, after a given stop price has been reached.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ORDER_TYPE_UNSPECIFIED module-attribute ¤

ORDER_TYPE_UNSPECIFIED: ValueType

UNSPECIFIED: The order type has not been set.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_ACTIVE module-attribute ¤

TRADE_STATE_ACTIVE: ValueType

ACTIVE: The trade has been executed in the market.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_APPROVAL_REQUESTED module-attribute ¤

TRADE_STATE_APPROVAL_REQUESTED: ValueType

APPROVAL: An approval has been requested.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_CANCELED module-attribute ¤

TRADE_STATE_CANCELED: ValueType

CANCELED: The trade has been cancelled. This can occur due to a cancellation request by the market participant, system, or market operator.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_CANCEL_REJECTED module-attribute ¤

TRADE_STATE_CANCEL_REJECTED: ValueType

CANCEL_REJECTED: The trade cancellation request was rejected.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_CANCEL_REQUESTED module-attribute ¤

TRADE_STATE_CANCEL_REQUESTED: ValueType

CANCEL_REQUESTED: A cancellation request for the trade has been submitted.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_RECALLED module-attribute ¤

TRADE_STATE_RECALLED: ValueType

RECALL: The trade has been recalled. This could be due to a system issue or a request from the market participant or market operator.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_RECALL_REJECTED module-attribute ¤

TRADE_STATE_RECALL_REJECTED: ValueType

RECALL_REJECTED: The trade recall request was rejected.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_RECALL_REQUESTED module-attribute ¤

TRADE_STATE_RECALL_REQUESTED: ValueType

RECALL_REQUESTED: A recall request for the trade has been submitted.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TRADE_STATE_UNSPECIFIED module-attribute ¤

TRADE_STATE_UNSPECIFIED: ValueType

UNSPECIFIED: The state is not known.

Classes¤

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CancelAllGridpoolOrdersRequest ¤

Bases: Message

Request to cancel all currently open orders for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool containing the orders to be cancelled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CancelAllGridpoolOrdersResponse ¤

Bases: Message

Response to canceling all currently open orders for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool to cancel the orders for.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CancelGridpoolOrderRequest ¤

Bases: Message

Request to cancel an existing order for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool the order belongs to.

order_id instance-attribute ¤
order_id: int

ID of the order to be cancelled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CancelGridpoolOrderResponse ¤

Bases: Message

Response from canceling an existing order for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool the order belongs to.

order_detail property ¤
order_detail: global___OrderDetail

Details of the cancelled order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CreateGridpoolOrderRequest ¤

Bases: Message

Represents a request to create a new order for a specific Gridpool.

A Gridpool is a collection of microgrids that can span multiple delivery areas. It's important to note that when submitting an order for a Gridpool, you must group microgrids by their respective delivery areas. This means you should submit separate orders for each delivery area within the Gridpool. Failing to do so could lead to inaccuracies in the bidding process and may not fully represent the capabilities or constraints of the microgrids in different delivery areas. However, in most countries only one delivery area exists, exceptions are countries like e.g. Australia, Germany and the US.

Caution

If a Gridpool contains microgrids in both Delivery Area A and Delivery Area B, you should submit one order for Delivery Area A and another for Delivery Area B, specifying the details for each.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

Unique identifier for the Gridpool to which the bid belongs.

order property ¤
order: global___Order

The details of the order being placed.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.CreateGridpoolOrderResponse ¤

Bases: Message

Represents the server's response after a new order has been successfully created for a specific Gridpool.

This response provides essential details about the newly created order, such as the unique order ID and the state of the order. By receiving this response, users can be sure that their order has been placed successfully for the designated Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool the order belongs to.

order_detail property ¤
order_detail: global___OrderDetail

Details of the newly created order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.GetGridpoolOrderRequest ¤

Bases: Message

Request to retrieve a single order for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool containing the order to be retrieved.

order_id instance-attribute ¤
order_id: int

ID of the order to be retrieved.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.GetGridpoolOrderResponse ¤

Bases: Message

Response from requesting order details for a specific order.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the gridpool containing the retrieved order.

order_detail property ¤
order_detail: global___OrderDetail

Details of the retrieved order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.GridpoolOrderFilter ¤

Bases: Message

Parameters for filtering Gridpool orders.

Note

Multiple filters can be used in combination to narrow down the returned results. For example, you can apply both state and side filters simultaneously to list only the open orders on the buy side of the market.

Attributes¤
delivery_area property ¤
delivery_area: DeliveryArea

Optional filter for delivery area.

delivery_period property ¤
delivery_period: DeliveryPeriod

Optional filter for delivery period.

side instance-attribute ¤
side: ValueType

Optional filter for order side.

states property ¤
states: RepeatedScalarFieldContainer[ValueType]

Optional filter for order state.

tag instance-attribute ¤
tag: str

Optional filters the listed orders by their associated tag.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.GridpoolTradeFilter ¤

Bases: Message

Parameters for filtering Gridpool trades.

Note

Multiple filters can be used in combination to narrow down the returned results. For example, you can apply both state and side filters simultaneously to list only the trades on the buy side of the market.

Attributes¤
delivery_area property ¤
delivery_area: DeliveryArea

Optional filter for delivery area.

delivery_period property ¤
delivery_period: DeliveryPeriod

Optional filter for delivery period.

side instance-attribute ¤
side: ValueType

Optional filter for the trades order side.

states property ¤
states: RepeatedScalarFieldContainer[ValueType]

Optional filter for the trade state.

trade_ids property ¤
trade_ids: RepeatedScalarFieldContainer[int]

Optional filter for the given order id´s.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListGridpoolOrdersRequest ¤

Bases: Message

Request to retrieve a list of orders for a specific Gridpool.

Attributes¤
filter property ¤
filter: global___GridpoolOrderFilter

Optional Gridpool orders filter.

gridpool_id instance-attribute ¤
gridpool_id: int

The Gridpool to retrieve the orders for.

pagination_params property ¤
pagination_params: PaginationParams

Pagination parameters.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListGridpoolOrdersResponse ¤

Bases: Message

Response from listing orders for a given Gridpool.

Attributes¤
order_details property ¤
order_details: RepeatedCompositeFieldContainer[
    global___OrderDetail
]

List of all listed orders with their details.

pagination_info property ¤
pagination_info: PaginationInfo

Metadata for pagination, including token for next page to retrieve.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListGridpoolTradesRequest ¤

Bases: Message

Request to retrieve a list of trades for a specific Gridpool.

Attributes¤
filter property ¤
filter: global___GridpoolTradeFilter

Optional Gridpool trades filter.

gridpool_id instance-attribute ¤
gridpool_id: int

The Gridpool to retrieve the trades for.

pagination_params property ¤
pagination_params: PaginationParams

Pagination parameters.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListGridpoolTradesResponse ¤

Bases: Message

Response from listing trades for a given Gridpool.

Attributes¤
pagination_info property ¤
pagination_info: PaginationInfo

Metadata for pagination, including token for next page to retrieve.

trades property ¤
trades: RepeatedCompositeFieldContainer[global___Trade]

List of all listed trades with their details.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListPublicTradesRequest ¤

Bases: Message

Request to list all historic public trades with optional filters. This method allows for querying historical data, useful for various analytics tasks.

Attributes¤
filter property ¤
filter: global___PublicTradeFilter

Optional filter to narrow down the list of trades.

pagination_params property ¤
pagination_params: PaginationParams

Pagination parameters.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ListPublicTradesResponse ¤

Bases: Message

ListPublicTradesResponse is a message that contains a list of historic public trades. This dataset is vital for tasks such as training machine learning models, backtesting trading strategies, and conducting market analysis.

Attributes¤
pagination_info property ¤
pagination_info: PaginationInfo

Metadata for pagination, including token for next page to retrieve.

public_trades property ¤
public_trades: RepeatedCompositeFieldContainer[
    global___PublicTrade
]

List of all public trades that met the specified filtering criteria.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.MarketSide ¤

Bases: _MarketSide

Enum for the side of the market that the order is on.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.Order ¤

Bases: Message

Represents an order in the electricity market.

Attributes¤
delivery_area property ¤
delivery_area: DeliveryArea

The delivery area where the contract is to be delivered. The representation of the delivery area may vary by jurisdiction.

delivery_period property ¤
delivery_period: DeliveryPeriod

The delivery period for the contract, specified as a start and end timestamp in UTC. It represents the period during which the contract is expected to be fulfilled.

display_quantity property ¤
display_quantity: Power

Optional; Applicable for ICEBERG orders. This is the quantity of the order to be displayed in the order book.

execution_option instance-attribute ¤
execution_option: ValueType

Optional execution options such as All or None, Fill or Kill, etc.

payload property ¤
payload: Struct

Optional user-defined payload individual to a specific order. This can be any data that needs to be associated with the order.

The field can store e.g. JSON objects containing details involved in the order. This feature can simplify application development by eliminating the need for complicated state management to remember the specifics of each order.

By embedding this "state" within the order itself, you can include specifics like which microgrids consume or provide how much power. This makes it easier to manage complex orders and can simplify the logic required in applications.

Example JSON payload: { "microgrids": [ { "microgrid_id": "1", "mw": 1.0 }, { "microgrid_id": "2", "mw": 0.5 } ] }

In this example, if the order is exectuted, these microgrids might consume the electricity mentioned in the example JSON payload.

peak_price_delta property ¤
peak_price_delta: Price

Optional; Applicable for ICEBERG orders. This is the price difference between the peak price and the limit price.

price property ¤
price: Price

The limit price at which the contract is to be traded. This is the maximum price for a BUY order or the minimum price for a SELL order.

quantity property ¤
quantity: Power

The quantity of the contract being traded, specified in MW.

side instance-attribute ¤
side: ValueType

Indicates if the order is on the Buy or Sell side of the market.

stop_price property ¤
stop_price: Price

Optional; Applicable for STOP_LIMIT orders. This is the stop price that triggers the limit order.

tag instance-attribute ¤
tag: str

Optional user-defined tag to group related orders.

type instance-attribute ¤
type: ValueType

The type of order, such as LIMIT, STOP_LIMIT, ICEBERG etc. This determines how the order is to be executed in the market.

valid_until property ¤
valid_until: Timestamp

Optional; Do not use if ExecutionOption is set to FOK or IOC. This is an optional UTC timestamp defining the time after which the order should be cancelled if not filled.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.OrderDetail ¤

Bases: Message

Represents an order with full details, including its ID, state and associated UTC timestamps.

Attributes¤
create_time property ¤
create_time: Timestamp

UTC Timestamp when the order was created.

filled_quantity property ¤
filled_quantity: Power

Filled quantity for this order.

modification_time property ¤
modification_time: Timestamp

UTC Timestamp of the last update to the order.

open_quantity property ¤
open_quantity: Power

Remaining open quantity for this order.

order property ¤
order: global___Order

The details of the order.

order_id instance-attribute ¤
order_id: int

Unique identifier of the order.

state_detail property ¤
state_detail: StateDetail

Details of the order's current state.

Classes¤
StateDetail ¤

Bases: Message

Inner message providing details about the current state of the order.

Attributes¤
MARKET_ACTOR_MARKET_OPERATOR instance-attribute ¤
MARKET_ACTOR_MARKET_OPERATOR: ValueType

The market operator was the actor.

MARKET_ACTOR_SYSTEM instance-attribute ¤
MARKET_ACTOR_SYSTEM: ValueType

The system was the actor.

MARKET_ACTOR_USER instance-attribute ¤
MARKET_ACTOR_USER: ValueType

The user was the actor.

STATE_REASON_ADD instance-attribute ¤
STATE_REASON_ADD: ValueType

The order was added.

STATE_REASON_DEACTIVATE instance-attribute ¤
STATE_REASON_DEACTIVATE: ValueType

The order was deactivated.

STATE_REASON_DELETE instance-attribute ¤
STATE_REASON_DELETE: ValueType

The order was deleted.

STATE_REASON_FULL_EXECUTION instance-attribute ¤
STATE_REASON_FULL_EXECUTION: ValueType

The order was fully executed.

STATE_REASON_ICEBERG_SLICE_ADD instance-attribute ¤
STATE_REASON_ICEBERG_SLICE_ADD: ValueType

An iceberg slice was added.

STATE_REASON_MODIFY instance-attribute ¤
STATE_REASON_MODIFY: ValueType

The order was modified.

STATE_REASON_PARTIAL_EXECUTION instance-attribute ¤
STATE_REASON_PARTIAL_EXECUTION: ValueType

The order was partially executed.

STATE_REASON_QUOTE_ADD instance-attribute ¤
STATE_REASON_QUOTE_ADD: ValueType

A quote was added.

STATE_REASON_QUOTE_FULL_EXECUTION instance-attribute ¤
STATE_REASON_QUOTE_FULL_EXECUTION: ValueType

A quote was fully executed.

STATE_REASON_QUOTE_PARTIAL_EXECUTION instance-attribute ¤
STATE_REASON_QUOTE_PARTIAL_EXECUTION: ValueType

A quote was partially executed.

STATE_REASON_REJECT instance-attribute ¤
STATE_REASON_REJECT: ValueType

The order was rejected.

STATE_REASON_UNKNOWN_STATE instance-attribute ¤
STATE_REASON_UNKNOWN_STATE: ValueType

The state of the order is unknown.

STATE_REASON_VALIDATION_FAIL instance-attribute ¤
STATE_REASON_VALIDATION_FAIL: ValueType

The order failed validation.

market_actor instance-attribute ¤
market_actor: ValueType

Actor responsible for the current state.

state instance-attribute ¤
state: ValueType

Current state of the order.

state_reason instance-attribute ¤
state_reason: ValueType

Reason for the current state.

Classes¤
MarketActor ¤

Bases: _MarketActor

Enum describing the actor responsible for an order state change.

StateReason ¤

Bases: _StateReason

Enum describing the action that led to the state change.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.OrderExecutionOption ¤

Bases: _OrderExecutionOption

OrderExecutionOption defines specific restriction behavior for the execution of an order. These options provide control on how an order is handled in the market. If no OrderExecutionOption is set, the order remains open until it's fully fulfilled, cancelled by the client, valid_until timestamp is reached, or the end of the trading session.

Source code in frequenz/api/electricity_trading/v1/electricity_trading_pb2.py
_globals['_ORDERDETAIL_STATEDETAIL_MARKETACTOR']._serialized_start=2606
_globals['_ORDERDETAIL_STATEDETAIL_MARKETACTOR']._serialized_end=2731
_globals['_TRADE']._serialized_start=2734
_globals['_TRADE']._serialized_end=3235
_globals['_PUBLICTRADE']._serialized_start=3238
_globals['_PUBLICTRADE']._serialized_end=3719
_globals['_GRIDPOOLORDERFILTER']._serialized_start=3722
_globals['_GRIDPOOLORDERFILTER']._serialized_end=4087

frequenz.api.electricity_trading.v1.electricity_trading_pb2.OrderState ¤

Bases: _OrderState

Enum for the state of an order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.OrderType ¤

Bases: _OrderType

Enum for the order types that can be specified for an order.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.PublicTrade ¤

Bases: Message

Represents a public trade in the market.

Each trade within this response message represents two orders that were previously active in the public order book and matched, along with its key attributes and final state.

Note

A trade refers to the event where a buy order and a sell order are matched and executed, representing the final state of those orders. While "executed" or "filled" orders pertain to the completion of individual buy or sell orders, a "trade" signifies the actual transaction where both types of orders (buy and sell) are successfully matched and carried out. This distinction is crucial, as a trade is the broader occurrence resulting from the execution of both sides of the transaction, although post-trade processes like settlement may still follow. The term 'trade' is sometimes used interchangeably with 'executed order' in trading platforms, but it technically encompasses the completion of both a buy and a sell order.

Attributes¤
buy_delivery_area property ¤
buy_delivery_area: DeliveryArea

Delivery area code of the buy side.

delivery_period property ¤
delivery_period: DeliveryPeriod

The delivery period for the contract.

execution_time property ¤
execution_time: Timestamp

UTC Timestamp of the trades execution time.

id instance-attribute ¤
id: int

ID of the trade from the public order book.

price property ¤
price: Price

The price at which the trade was executed.

quantity property ¤
quantity: Power

The executed quantity of the contract traded.

sell_delivery_area property ¤
sell_delivery_area: DeliveryArea

Delivery area code of the sell side.

state instance-attribute ¤
state: ValueType

Final state of the trade.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.PublicTradeFilter ¤

Bases: Message

Parameters for filtering historic public trades.

Note

In some countries or regions the buy and sell delivery area can be different. This is usually referred to as cross bid.

Note

Multiple filters can be used in combination to narrow down the returned results. For example, you can apply both state and delivery area filters simultaneously to list only the trades that occurred at a certain time in a specific delivery area.

Attributes¤
buy_delivery_area property ¤
buy_delivery_area: DeliveryArea

Optional; If set, only trades in this buy delivery area are returned.

delivery_period property ¤
delivery_period: DeliveryPeriod

Optional; If set, only trades with this delivery period are returned.

sell_delivery_area property ¤
sell_delivery_area: DeliveryArea

Optional; If set, only trades in this sell delivery area are returned.

states property ¤
states: RepeatedScalarFieldContainer[ValueType]

If set, only trades in this state are returned.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceiveGridpoolOrdersStreamRequest ¤

Bases: Message

Subscribe to Gridpool order stream. This method provides real-time updates on Gridpool orders, making it useful for dynamic analytics and real-time decision-making.

Attributes¤
filter property ¤
filter: global___GridpoolOrderFilter

Optional public orders filter.

DeliveryPeriod Filter

Ensure that the specified DeliveryPeriod is set for a future timeframe. If a past or present period is selected, the stream will automatically close and return no entries.

gridpool_id instance-attribute ¤
gridpool_id: int

The gridpool to retrieve the orders for.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceiveGridpoolOrdersStreamResponse ¤

Bases: Message

Response to a subscription request for a stream of Gridpool orders. Real-time information on gridpool orders is pushed through this response.

Attributes¤
order_detail property ¤
order_detail: global___OrderDetail

Order detail response.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceiveGridpoolTradesStreamRequest ¤

Bases: Message

Subscribe to the stream of gridpool trades. This method provides real-time updates on newly executed gridpool trades, making it useful dynamic analytics and real-time decision-making.

Attributes¤
filter property ¤
filter: global___GridpoolTradeFilter

Optional filter to specify which trades should be included in the stream.

gridpool_id instance-attribute ¤
gridpool_id: int

The Gridpool to retrieve the trades for.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceiveGridpoolTradesStreamResponse ¤

Bases: Message

Response to a subscription request for a stream of Gridpool trades. Real-time information on trades is pushed through this response.

Attributes¤
trade property ¤
trade: global___Trade

The trade that has been executed and is being broadcasted in real-time.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceivePublicTradesStreamRequest ¤

Bases: Message

Subscribe to the stream of public trades. This method provides real-time updates on newly executed public trades, making it useful dynamic analytics and real-time decision-making.

Attributes¤
filter property ¤
filter: global___PublicTradeFilter

Optional filter to specify which trades should be included in the stream.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.ReceivePublicTradesStreamResponse ¤

Bases: Message

Response to a subscription request for a stream of public trades. Real-time information on public trades is pushed through this response.

Attributes¤
public_trade property ¤
public_trade: global___PublicTrade

The public trade that has been executed and is being broadcasted in real-time.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.Trade ¤

Bases: Message

Represents a private trade in the electricity market.

Note

This represents either the buy or sell side of a trade which is different to public trade information which always represents both sides of a market.

Attributes¤
delivery_area property ¤
delivery_area: DeliveryArea

Delivery area of the trade.

delivery_period property ¤
delivery_period: DeliveryPeriod

The delivery period for the contract.

execution_time property ¤
execution_time: Timestamp

UTC Timestamp of the trades execution time.

id instance-attribute ¤
id: int

ID of the trade.

order_id instance-attribute ¤
order_id: int

ID of the order.

price property ¤
price: Price

The price at which the trade was executed.

quantity property ¤
quantity: Power

The executed quantity of the trade.

side instance-attribute ¤
side: ValueType

Indicates if the trades order was on the Buy or Sell side of the market.

state instance-attribute ¤
state: ValueType

Current state of the trade.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.TradeState ¤

Bases: _TradeState

Enum for the state of a trade.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.UpdateGridpoolOrderRequest ¤

Bases: Message

Request to update an existing order for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the Gridpool the order belongs to.

order_id instance-attribute ¤
order_id: int

The order identifier

update_mask property ¤
update_mask: FieldMask

Field mask specifying which fields should be updated

update_order_fields property ¤
update_order_fields: UpdateOrder

The fields that can be updated

Classes¤
UpdateOrder ¤

Bases: Message

Represents the order properties that can be updated after an order has been placed. At least one of the optional fields must be set for an update to take place.

Attributes¤
display_quantity property ¤
display_quantity: Power

Optional; Applicable for ICEBERG orders. This is the updated quantity of the order to be displayed in the order book.

execution_option instance-attribute ¤
execution_option: ValueType

Optional; Updated execution options such as All or None, Fill or Kill, etc.

payload property ¤
payload: Struct

Optional; Updated user-defined payload individual to a specific order. This can be any data that the user wants to associate with the order.

peak_price_delta property ¤
peak_price_delta: Price

Optional; Applicable for ICEBERG orders. This is the updated price difference between the peak price and the limit price.

price property ¤
price: Price

Optional; The updated limit price at which the contract is to be traded. This is the maximum price for a BUY order or the minimum price for a SELL order.

quantity property ¤
quantity: Power

Optional; The updated quantity of the contract being traded, specified in MW.

stop_price property ¤
stop_price: Price

Optional; Applicable for STOP_LIMIT orders. This is the updated stop price that triggers the limit order.

tag instance-attribute ¤
tag: str

Optional; Updated user-defined tag to group related orders.

valid_until property ¤
valid_until: Timestamp

Optional; This is an updated timestamp defining the time after which the order should be cancelled if not filled. The timestamp is in UTC.

frequenz.api.electricity_trading.v1.electricity_trading_pb2.UpdateGridpoolOrderResponse ¤

Bases: Message

Response from updating an existing order for a given Gridpool.

Attributes¤
gridpool_id instance-attribute ¤
gridpool_id: int

ID of the Gridpool the order belongs to.

order_detail property ¤
order_detail: global___OrderDetail

Details of the updated order.