update activeorderbook callback file

This commit is contained in:
c9s 2022-06-06 06:00:43 +08:00
parent 3786fc64f1
commit 80d9c8a3be
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -0,0 +1,17 @@
// Code generated by "callbackgen -type ActiveOrderBook"; DO NOT EDIT.
package bbgo
import (
"github.com/c9s/bbgo/pkg/types"
)
func (b *ActiveOrderBook) OnFilled(cb func(o types.Order)) {
b.filledCallbacks = append(b.filledCallbacks, cb)
}
func (b *ActiveOrderBook) EmitFilled(o types.Order) {
for _, cb := range b.filledCallbacks {
cb(o)
}
}