diff --git a/pkg/bbgo/session.go b/pkg/bbgo/session.go index 8b6e993e8..5d78e0e83 100644 --- a/pkg/bbgo/session.go +++ b/pkg/bbgo/session.go @@ -347,6 +347,11 @@ func (session *ExchangeSession) Init(ctx context.Context, environ *Environment) } } + // add trade logger + session.UserDataStream.OnTradeUpdate(func(trade types.Trade) { + log.Info(trade.String()) + }) + if viper.GetBool("debug-kline") { session.MarketDataStream.OnKLine(func(kline types.KLine) { log.WithField("marketData", "kline").Infof("kline: %+v", kline)