Class Orderbook


  • @Domain(fields={"timeslot","clearingPrice","dateExecuted"})
    public class Orderbook
    extends Object
    An orderbook instance captures a snapshot of the PowerTAC wholesale market's orderbook (the un-cleared bids and asks remaining after the market is cleared). Each OrderbookEntry contained in the orderbook contains a limit price and total un-cleared buy / sell quantity in MWh at that price. Each time the market clears, one orderbook is created and sent to brokers for each timeslot being traded during that clearing event.
    Version:
    1.2 , 05/02/2011
    Author:
    Daniel Schnurr, John Collins
    • Constructor Detail

      • Orderbook

        public Orderbook​(int timeslot,
                         Double clearingPrice,
                         org.joda.time.Instant dateExecuted)
        Constructor with default product type.
    • Method Detail

      • getId

        public long getId()
      • getClearingPrice

        public Double getClearingPrice()
        Returns the positive price at which the market cleared. This is the price paid to sellers, the negative of the price paid by buyers. Null if no trades were cleared.
      • getDateExecuted

        public org.joda.time.Instant getDateExecuted()
        The date when the market cleared.
      • getTimeslotIndex

        public int getTimeslotIndex()
        The timeslot in which energy commitments represented by cleared trades are due.
      • getTimeslot

        public Timeslot getTimeslot()
      • getBids

        public SortedSet<OrderbookOrder> getBids()
        The set of bids (positive energy quantities) that were submitted and did not clear, ascending sort. Because bid prices are normally negative, the first element is the highest (most negative) price that did not clear. Null prices (market orders) sort ahead of non-null prices (limit orders).
      • getAsks

        public SortedSet<OrderbookOrder> getAsks()
        The set of asks (negative energy quantities) that were submitted and did not clear, ascending sort. Null prices (market orders) sort ahead of non-null prices (limit orders).