bbgo_origin/pkg/bbgo/activeorderbook_callbacks.go
2022-06-06 06:03:49 +08:00

18 lines
353 B
Go

// 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)
}
}