decred.org/dcrdex@v1.0.5/server/matcher/interface.go (about)

     1  // This code is available on the terms of the project LICENSE.md file,
     2  // also available online at https://blueoakcouncil.org/license/1.0.0.
     3  
     4  package matcher
     5  
     6  import "decred.org/dcrdex/dex/order"
     7  
     8  // Booker should be implemented by the order book.
     9  type Booker interface {
    10  	LotSize() uint64
    11  	BuyCount() int
    12  	SellCount() int
    13  	BestSell() *order.LimitOrder
    14  	BestBuy() *order.LimitOrder
    15  	Insert(*order.LimitOrder) bool
    16  	Remove(order.OrderID) (*order.LimitOrder, bool)
    17  	BuyOrders() []*order.LimitOrder
    18  	SellOrders() []*order.LimitOrder
    19  }
    20  
    21  // MatchCycleStats is data about the results of a match cycle.
    22  type MatchCycleStats struct {
    23  	MatchVolume uint64
    24  	QuoteVolume uint64
    25  	BookSells   uint64
    26  	BookBuys    uint64
    27  	BookSells5  uint64
    28  	BookBuys5   uint64
    29  	BookSells25 uint64
    30  	BookBuys25  uint64
    31  	HighRate    uint64
    32  	LowRate     uint64
    33  	StartRate   uint64
    34  	EndRate     uint64
    35  }