core: document order store options

This commit is contained in:
c9s 2023-07-25 17:50:48 +08:00
parent 6591ffad60
commit 1d24af13a8
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -11,11 +11,19 @@ type OrderStore struct {
mu sync.Mutex
orders map[uint64]types.Order
Symbol string
Symbol string
// RemoveCancelled removes the canceled order when receiving a cancel order update event
// It also removes the order even if it's partially filled
// by default, only 0 filled canceled order will be removed.
RemoveCancelled bool
RemoveFilled bool
AddOrderUpdate bool
C chan types.Order
// RemoveFilled removes the fully filled order when receiving a filled order update event
RemoveFilled bool
// AddOrderUpdate adds the order into the store when receiving an order update when the order does not exist in the current store.
AddOrderUpdate bool
C chan types.Order
}
func NewOrderStore(symbol string) *OrderStore {