AcceptedBid

Python pydantic class corresponding to json type `accepted.bid`.

class gwatn.types.AcceptedBid(*, MarketSlotName, BidderAlias, PqPairs, ReceivedTimeUnixNs, TypeName='accepted.bid', Version='000')

Bid acceptance sent from MarketMaker to a market partipant.

This is a legally binding contract for the bidder to consume or produce the quantity in its Bid consistent with the actual price. [More info](https://gridworks.readthedocs.io/en/latest/market-bid.html).

Parameters:
  • MarketSlotName (str) –

  • BidderAlias (str) –

  • PqPairs (List[PriceQuantityUnitless]) –

  • ReceivedTimeUnixNs (int) –

  • TypeName (Literal['accepted.bid']) –

  • Version (str) –

MarketSlotName:
  • Description:

  • Format: MarketSlotNameLrdFormat

BidderAlias:
  • Description:

  • Format: LeftRightDot

PqPairs:
  • Description:

ReceivedTimeUnixNs:
  • Description:

class gwatn.types.accepted_bid.check_is_left_right_dot(v)

LeftRightDot format: Lowercase alphanumeric words separated by periods, most significant word (on the left) starting with an alphabet character.

Raises:

ValueError – if not LeftRightDot format

Parameters:

v (str) –

class gwatn.types.accepted_bid.check_is_market_slot_name_lrd_format(v)
MaketSlotNameLrdFormat: the format of a MarketSlotName.
  • The first word must be a MarketTypeName

  • The last word (unix time of market slot start) must

be a 10-digit integer divisible by 300 (i.e. all MarketSlots start at the top of 5 minutes) - More strictly, the last word must be the start of a MarketSlot for that MarketType (i.e. divisible by 3600 for hourly markets) - The middle words have LeftRightDot format (GNodeAlias of the MarketMaker)

Example: rt60gate5.d1.isone.ver.keene.1673539200

Parameters:

v (str) –

class gwatn.types.AcceptedBid_Maker(market_slot_name, bidder_alias, pq_pairs, received_time_unix_ns)
Parameters:
  • market_slot_name (str) –

  • bidder_alias (str) –

  • pq_pairs (List[PriceQuantityUnitless]) –

  • received_time_unix_ns (int) –

classmethod tuple_to_type(tuple)

Given a Python class object, returns the serialized JSON type object

Parameters:

tuple (AcceptedBid) –

Return type:

str

classmethod type_to_tuple(t)

Given a serialized JSON type object, returns the Python class object

Parameters:

t (str) –

Return type:

AcceptedBid