mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
bbgo: fix: filter trades by symbol
This commit is contained in:
parent
42f22e0ef3
commit
0f24eec715
|
@ -412,7 +412,9 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
|
|||
|
||||
session.Trades[symbol] = &types.TradeSlice{Trades: trades}
|
||||
session.UserDataStream.OnTradeUpdate(func(trade types.Trade) {
|
||||
if trade.Symbol == symbol {
|
||||
session.Trades[symbol].Append(trade)
|
||||
}
|
||||
})
|
||||
|
||||
position := &types.Position{
|
||||
|
|
Loading…
Reference in New Issue
Block a user