Documentation ¶
Index ¶
- type MatchingEngine
- func (me *MatchingEngine) CancelOrder(order model.Order) ([]model.OrderCancellation, error)
- func (me *MatchingEngine) GetHighestBuyPrice() decimal.Decimal
- func (me *MatchingEngine) GetLowestSellPrice() decimal.Decimal
- func (me *MatchingEngine) GetOrderBookFullSnapshot() *orderbook.BookSnapshot
- func (me *MatchingEngine) GetOrderBookSnapshotWithDepth(depth int) *orderbook.BookSnapshot
- func (me *MatchingEngine) GetTotalBuyUnitsFromPrice(price decimal.Decimal) decimal.Decimal
- func (me *MatchingEngine) GetTotalSellUnitsToPrice(price decimal.Decimal) decimal.Decimal
- func (me *MatchingEngine) ProcessLimitOrder(order *model.OrderLimit) model.MatchResult
- func (me *MatchingEngine) ProcessMarketOrder(order *model.OrderMarket) model.MatchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchingEngine ¶
type MatchingEngine struct {
// contains filtered or unexported fields
}
func NewMatchingEngine ¶
func NewMatchingEngine() *MatchingEngine
func (*MatchingEngine) CancelOrder ¶
func (me *MatchingEngine) CancelOrder(order model.Order) ([]model.OrderCancellation, error)
func (*MatchingEngine) GetHighestBuyPrice ¶
func (me *MatchingEngine) GetHighestBuyPrice() decimal.Decimal
func (*MatchingEngine) GetLowestSellPrice ¶
func (me *MatchingEngine) GetLowestSellPrice() decimal.Decimal
func (*MatchingEngine) GetOrderBookFullSnapshot ¶
func (me *MatchingEngine) GetOrderBookFullSnapshot() *orderbook.BookSnapshot
func (*MatchingEngine) GetOrderBookSnapshotWithDepth ¶
func (me *MatchingEngine) GetOrderBookSnapshotWithDepth(depth int) *orderbook.BookSnapshot
func (*MatchingEngine) GetTotalBuyUnitsFromPrice ¶
func (me *MatchingEngine) GetTotalBuyUnitsFromPrice(price decimal.Decimal) decimal.Decimal
func (*MatchingEngine) GetTotalSellUnitsToPrice ¶
func (me *MatchingEngine) GetTotalSellUnitsToPrice(price decimal.Decimal) decimal.Decimal
func (*MatchingEngine) ProcessLimitOrder ¶
func (me *MatchingEngine) ProcessLimitOrder(order *model.OrderLimit) model.MatchResult
func (*MatchingEngine) ProcessMarketOrder ¶
func (me *MatchingEngine) ProcessMarketOrder(order *model.OrderMarket) model.MatchResult
Click to show internal directories.
Click to hide internal directories.