Documentation ¶
Index ¶
- type Element
- type Orders
- func (o Orders) Asset() string
- func (o Orders) Cap() (i int)
- func (o Orders) First() (order.Order, error)
- func (o *Orders) Insert(order *order.Order)
- func (o Orders) Last() (order.Order, error)
- func (o Orders) Len() (i int)
- func (o Orders) TimeEnd() time.Time
- func (o Orders) TimePeriod() time.Duration
- func (o Orders) TimeStart() time.Time
- func (o Orders) VolumeWeightedAveragePrice() (vwap decimal.Decimal)
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
Element this is the element as it will be used by the ring it wraps the OrderType with an index
func (*Element) SetTags ¶
todo: transfer this logic into convenience functions - IsOldest IsNewest SetNewest SetOldest
ideally the type should answer a few questions about it self as opposed us checking things in other packages, this is specially useful in implementing logic that relates to orders, as you can have the orders hold information about itself that is relevant for a group of orders, i.e: is this the newest order?
SetTags set one or more tags
type Orders ¶
type Orders struct {
// contains filtered or unexported fields
}
Orders implements a type that holds multiple orders data... this could be the bids of an orders book or the X latest orders this structure implies that orders are sorted in a useful manner
func (Orders) TimePeriod ¶
TimePeriod returns the time period of orders inside
func (Orders) VolumeWeightedAveragePrice ¶
VolumeWeightedAveragePrice calculates the VWAP for a group of orders
Click to show internal directories.
Click to hide internal directories.