bbgo/pkg/twap/v2/bbomonitor_callbacks.go

18 lines
415 B
Go
Raw Permalink Normal View History

// Code generated by "callbackgen -type BboMonitor"; DO NOT EDIT.
package twap
import (
"git.qtrade.icu/lychiyu/bbgo/pkg/types"
)
func (m *BboMonitor) OnUpdate(cb func(bid types.PriceVolume, ask types.PriceVolume)) {
m.updateCallbacks = append(m.updateCallbacks, cb)
}
func (m *BboMonitor) EmitUpdate(bid types.PriceVolume, ask types.PriceVolume) {
for _, cb := range m.updateCallbacks {
cb(bid, ask)
}
}