Skip to content

Commit

Permalink
add logging to tbs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Jul 25, 2023
1 parent fbaef56 commit d0bbba3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/services/tradesBlockService/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/services/tradesBlockService
go 1.17

require (
github.com/diadata-org/diadata v1.4.315-rc-1
github.com/diadata-org/diadata v1.4.315-rc-2
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.8.1
)
Expand Down
4 changes: 4 additions & 0 deletions internal/pkg/tradesBlockService/tradesBlockService.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ func NewTradesBlockService(datastore models.Datastore, relDB models.RelDatastore
log.Info("bluechip threshold: ", blueChipThreshold)
log.Info("smallX: ", smallX)
log.Info("normalX: ", normalX)
log.Info("tradeVolumeThreshold: ", tradeVolumeThreshold)
log.Info("tradeVolumeThresholdUSD: ", tradeVolumeThresholdUSD)

s.volumeCache = s.loadVolumes()
log.Info("...done loading volumes.")
Expand Down Expand Up @@ -310,6 +312,8 @@ func (s *TradesBlockService) process(t dia.Trade) {
t.EstimatedUSDPrice = t.Price * price
if t.USDVolume() > tradeVolumeThresholdUSD {
verifiedTrade = true
} else {
log.Warn("low $ volume on trade: ", t)
}
}
}
Expand Down

0 comments on commit d0bbba3

Please sign in to comment.