Skip to content

Commit

Permalink
xnav: subscribe BTCUSDT symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 23, 2024
1 parent ebe6238 commit 420d128
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/strategy/xnav/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,17 @@ func (s *Strategy) Validate() error {
return nil
}

const anchorSymbol = "BTCUSDT"

var ten = fixedpoint.NewFromInt(10)

func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) {}
func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) {
for _, session := range sessions {
session.Subscribe(types.KLineChannel, anchorSymbol, types.SubscribeOptions{
Interval: types.Interval1m,
})
}
}

func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string]*bbgo.ExchangeSession) {
log.Infof("recording net asset value...")
Expand Down

0 comments on commit 420d128

Please sign in to comment.