Skip to content

Commit

Permalink
make bybit ws connection string an env var.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Nov 6, 2024
1 parent 5ec8eb7 commit d1a542a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/exchange-scrapers/collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/exchange-scrapers/collector
go 1.22

require (
github.com/diadata-org/diadata v1.4.557
github.com/diadata-org/diadata v1.4.558
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.9.3
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/dia/scraper/exchange-scrapers/ByBitScraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/diadata-org/diadata/pkg/utils"
)

var ByBitSocketURL string = "wss://stream.bybit.com/spot/public/v3"
var ByBitSocketURL string = utils.Getenv("BYBIT_WS_URL", "wss://stream.bybit.com/spot/public/v5")

type ByBitMarket struct {
Name string `json:"name"`
Expand Down Expand Up @@ -135,7 +135,7 @@ func NewByBitScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB) *B

SwConn, _, err := wsDialer.Dial(ByBitSocketURL, nil)
if err != nil {
println(err.Error())
log.Error("Connect to websocket server: ", err.Error())
}

s.wsClient = SwConn
Expand Down

0 comments on commit d1a542a

Please sign in to comment.