Skip to content

Commit 9e5cac3

Browse files
Add Price proto definition
Signed-off-by: camille-bouvy-frequenz <[email protected]> Signed-off-by: camille-bouvy-frequenz <[email protected]>
1 parent 7fd901f commit 9e5cac3

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Frequenz definitions of price for electricity trading.
2+
//
3+
// Copyright 2023 Frequenz Energy-as-a-Service GmbH
4+
//
5+
// Licensed under the MIT License (the "License");
6+
// you may not use this file except in compliance with the License.
7+
8+
syntax = "proto3";
9+
10+
package frequenz.api.common.v1.market;
11+
12+
import "google/type/decimal.proto";
13+
14+
// Represents a monetary price for electricity trading, including
15+
// the amount and currency. The currency used should align with the
16+
// delivery area's standard currency.
17+
//
18+
// !!! caution "Validation Required"
19+
// It's essential to ensure that the currency aligns with the
20+
// standard currency of the associated delivery area. Failure to
21+
// do so may result in the API service rejecting the request due to currency
22+
// mismatches.
23+
//
24+
// !!! info "Relation to Delivery Area"
25+
// The currency specified is intrinsically related to the delivery area
26+
// for the contract. Make sure the chosen currency is compatible with
27+
// the delivery area's currency standards.
28+
//
29+
message Price {
30+
// List of supported currencies.
31+
//
32+
// !!! info "Extensibility"
33+
// New currencies can be added to this enum to support additional markets.
34+
enum Currency {
35+
CURRENCY_UNSPECIFIED = 0;
36+
CURRENCY_USD = 1;
37+
CURRENCY_CAD = 2;
38+
CURRENCY_EUR = 3;
39+
CURRENCY_GBP = 4;
40+
CURRENCY_CHF = 5;
41+
CURRENCY_CNY = 6;
42+
CURRENCY_JPY = 7;
43+
CURRENCY_AUD = 8;
44+
CURRENCY_NZD = 9;
45+
CURRENCY_SGD = 10;
46+
}
47+
48+
// The amount of the price.
49+
google.type.Decimal amount = 1;
50+
51+
// The currency in which the price is denominated.
52+
Currency currency = 2;
53+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# License: MIT
2+
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Frequenz common gRPC API and bindings."""

0 commit comments

Comments
 (0)