Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuyComparator ¶
func BuyComparator(a, b interface{}) int
func SellComparator ¶
func SellComparator(a, b interface{}) int
Types ¶
type DirectionEnum ¶
type DirectionEnum int
const ( DirectionEnumBuy DirectionEnum = iota + 1 DirectionEnumSell )
type MatchEngine ¶
type MatchEngine struct {
// contains filtered or unexported fields
}
func NewMatchEngine ¶
func NewMatchEngine() *MatchEngine
func (*MatchEngine) GetBuyBook ¶
func (e *MatchEngine) GetBuyBook() *OrderBook
func (*MatchEngine) GetPrice ¶
func (e *MatchEngine) GetPrice() decimal.Decimal
func (*MatchEngine) GetSellBook ¶
func (e *MatchEngine) GetSellBook() *OrderBook
func (*MatchEngine) ProcessOrder ¶
func (e *MatchEngine) ProcessOrder(ctx context.Context, order *Order) *MatchResponse
func (*MatchEngine) String ¶
func (e *MatchEngine) String() string
type MatchResponse ¶
type MatchResponse struct { TakerOrder *Order MatchRecords []*MatchedRecord }
type MatchedRecord ¶
type OrderBook ¶
type OrderBook struct {
// contains filtered or unexported fields
}
func NewBook ¶
func NewBook(direction DirectionEnum) *OrderBook
Click to show internal directories.
Click to hide internal directories.