mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
add NumOfOrders method on active book
This commit is contained in:
parent
c520cfa540
commit
c8b97629e0
|
@ -152,6 +152,10 @@ func (b *LocalActiveOrderBook) WriteOff(order types.Order) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (b *LocalActiveOrderBook) NumOfOrders() int {
|
||||
return b.Asks.Len() + b.Bids.Len()
|
||||
}
|
||||
|
||||
func (b *LocalActiveOrderBook) Orders() types.OrderSlice {
|
||||
return append(b.Asks.Orders(), b.Bids.Orders()...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user