Skip to content

price_pb2

frequenz.api.common.v1.market.price_pb2 ¤

Generated protocol buffer code.

Classes¤

frequenz.api.common.v1.market.price_pb2.Price ¤

Bases: Message

Represents a monetary price for electricity trading, including the amount and currency. The currency used should align with the delivery area's standard currency.

Validation Required

It's essential to ensure that the currency aligns with the standard currency of the associated delivery area. Failure to do so may result in the API service rejecting the request due to currency mismatches.

Relation to Delivery Area

The currency specified is intrinsically related to the delivery area for the contract. Make sure the chosen currency is compatible with the delivery area's currency standards.

Source code in frequenz/api/common/v1/market/price_pb2.py
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)frequenz/api/common/v1/market/price.proto\x12\x1d\x66requenz.api.common.v1.market\x1a*frequenz/api/common/v1/types/decimal.proto\"\xda\x02\n\x05Price\x12\x35\n\x06\x61mount\x18\x01 \x01(\x0b\x32%.frequenz.api.common.v1.types.Decimal\x12?\n\x08\x63urrency\x18\x02 \x01(\x0e\x32-.frequenz.api.common.v1.market.Price.Currency\"\xd8\x01\n\x08\x43urrency\x12\x18\n\x14\x43URRENCY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43URRENCY_USD\x10\x01\x12\x10\n\x0c\x43URRENCY_CAD\x10\x02\x12\x10\n\x0c\x43URRENCY_EUR\x10\x03\x12\x10\n\x0c\x43URRENCY_GBP\x10\x04\x12\x10\n\x0c\x43URRENCY_CHF\x10\x05\x12\x10\n\x0c\x43URRENCY_CNY\x10\x06\x12\x10\n\x0c\x43URRENCY_JPY\x10\x07\x12\x10\n\x0c\x43URRENCY_AUD\x10\x08\x12\x10\n\x0c\x43URRENCY_NZD\x10\t\x12\x10\n\x0c\x43URRENCY_SGD\x10\nb\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'frequenz.api.common.v1.market.price_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
  DESCRIPTOR._loaded_options = None
  _globals['_PRICE']._serialized_start=121
  _globals['_PRICE']._serialized_end=467
  _globals['_PRICE_CURRENCY']._serialized_start=251
  _globals['_PRICE_CURRENCY']._serialized_end=467
# @@protoc_insertion_point(module_scope)
Attributes¤
amount: frequenz.api.common.v1.types.decimal_pb2.Decimal property ¤

The amount of the price.

currency: global___Price.Currency.ValueType instance-attribute ¤

The currency in which the price is denominated.

Classes¤
Currency ¤

Bases: _Currency

List of supported currencies.

Extensibility

New currencies can be added to this enum to support additional markets.