Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bunt ¶
type Bunt struct {
// contains filtered or unexported fields
}
func (*Bunt) CreateDiscard ¶
CreateDiscard keeps discard, once for its pair and its AfterID, under a key of its own, apart from the orders (see Orders).
func (*Bunt) UpdateOrder ¶
UpdateOrder writes order under its id, unless the order stored ended (see model.OrderStatusType.Final) and order is open: an end is never undone, eg: by a move the exchange answered as the order filled, logged and not written. Unlike the database of the agents, the times aren't compared: the order controller writes the states of an order in their order.
type DiscardStorage ¶
type DiscardStorage interface {
CreateDiscard(discard model.Discard) error
Discards() ([]model.Discard, error)
}
DiscardStorage is a Storage keeping the positions the order controller discarded, see model.Discard: CreateDiscard keeps one, once for its pair and its AfterID; Discards returns them all.
type OrderFilter ¶
func WithPair ¶
func WithPair(pair string) OrderFilter
func WithStatus ¶
func WithStatus(status model.OrderStatusType) OrderFilter
func WithStatusIn ¶
func WithStatusIn(status ...model.OrderStatusType) OrderFilter
func WithUpdateAtBeforeOrEqual ¶
func WithUpdateAtBeforeOrEqual(time time.Time) OrderFilter