mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 11:03:53 +00:00
18 lines
512 B
Go
18 lines
512 B
Go
// Code generated by "callbackgen -type MarketDataStore"; DO NOT EDIT.
|
|
|
|
package bbgo
|
|
|
|
import (
|
|
"github.com/c9s/bbgo/pkg/types"
|
|
)
|
|
|
|
func (store *MarketDataStore) OnKLineWindowUpdate(cb func(interval types.Interval, kline types.KLineWindow)) {
|
|
store.kLineWindowUpdateCallbacks = append(store.kLineWindowUpdateCallbacks, cb)
|
|
}
|
|
|
|
func (store *MarketDataStore) EmitKLineWindowUpdate(interval types.Interval, kline types.KLineWindow) {
|
|
for _, cb := range store.kLineWindowUpdateCallbacks {
|
|
cb(interval, kline)
|
|
}
|
|
}
|