mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-15 03:23:52 +00:00
18 lines
407 B
Go
18 lines
407 B
Go
// Code generated by "callbackgen -type BboMonitor"; DO NOT EDIT.
|
|
|
|
package twap
|
|
|
|
import (
|
|
"github.com/c9s/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)
|
|
}
|
|
}
|