Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comparator ¶
func Comparator(a, b interface{}) (result int)
Comparator is used for comparing Key.
func StopComparator ¶
func StopComparator(a, b interface{}) (result int)
StopComparator is used for comparing Key.
Types ¶
type Key ¶
type Key struct { ID uint64 `json:"id"` Side Side `json:"side"` Price decimal.Decimal `json:"price"` StopPrice decimal.Decimal `json:"stop_price"` CreatedAt time.Time `json:"created_at"` }
Key is used to sort orders in red black tree.
type Order ¶
type Order struct { ID uint64 `json:"id"` Side Side `json:"side"` Price decimal.Decimal `json:"price"` StopPrice decimal.Decimal `json:"stop_price"` Quantity decimal.Decimal `json:"quantity"` FilledQuantity decimal.Decimal `json:"filled_quantity"` CreatedAt time.Time `json:"created_at"` ImmediateOrCancel bool `json:"immediate_or_cancel"` }
Order .
func (*Order) PendingQuantity ¶
PendingQuantity is the remaing quantity.
Click to show internal directories.
Click to hide internal directories.