mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
mark trades with the strategy ID
This commit is contained in:
parent
478bef526d
commit
ebcef65b01
|
@ -332,6 +332,12 @@ func (s *Strategy) tradeUpdateHandler(trade types.Trade) {
|
|||
if s.orderStore.Exists(trade.OrderID) {
|
||||
log.Infof("received trade update of order %d: %+v", trade.OrderID, trade)
|
||||
|
||||
if s.TradeService != nil {
|
||||
if err := s.TradeService.MarkStrategyID(context.Background(), trade.ID, ID) ; err != nil {
|
||||
log.WithError(err).Error("mark strategy ID error")
|
||||
}
|
||||
}
|
||||
|
||||
if trade.Side == types.SideTypeSelf {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user