mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
update activeorderbook callback file
This commit is contained in:
parent
3786fc64f1
commit
80d9c8a3be
17
pkg/bbgo/activeorderbook_callbacks.go
Normal file
17
pkg/bbgo/activeorderbook_callbacks.go
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user