Documentation ¶
Overview ¶
Package run provides components for dispatching orders.
Index ¶
- func CompositeConflatingQueueFactory[T mkt.AnyOrder]() *utl.ConflatingQueue[string, *Composite[T]]
- func ConflateTrade(existing *mkt.Trade, latest *mkt.Trade) *mkt.Trade
- func SubscriberQuoteQueueConnector(queue *utl.ConflatingQueue[string, *mkt.Quote]) func(*mkt.Quote)
- func SubscriberTradeQueueConnector(queue *utl.ConflatingQueue[string, *mkt.Trade]) func(*mkt.Trade)
- type Composite
- type Dispatcher
- type OrderProcess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompositeConflatingQueueFactory ¶
CompositeConflatingQueueFactory makes a composite queue for a single order process.
func ConflateTrade ¶
ConflateTrade is a convenience function for a trade utl.ConflatingQueue.
func SubscriberQuoteQueueConnector ¶
SubscriberQuoteQueueConnector provides the 'onQuote' callback function for a dma.Subscriber.
func SubscriberTradeQueueConnector ¶
SubscriberTradeQueueConnector provides the 'onTrade' callback function for a dma.Subscriber.
Types ¶
type Composite ¶
Composite is a set of possible updates to be pushed into a utl.ConflatingQueue for an order process.
func ConflateComposite ¶
ConflateComposite conflates updates to a utl.ConflatingQueue of Composite items.
type Dispatcher ¶
Dispatcher owns all orders and routes information to them.
func NewDispatcher ¶
func NewDispatcher[T mkt.AnyOrder]( instructions chan T, subscriber dma.Subscribable, quotes *utl.ConflatingQueue[string, *mkt.Quote], trades *utl.ConflatingQueue[string, *mkt.Trade], ) *Dispatcher[T]
NewDispatcher returns a *Dispatcher ready to use.
type OrderProcess ¶
OrderProcess which is associated with a single OrderID, Symbol and Side.