Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions stream/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ import (
"go.opentelemetry.io/otel/trace"
)

// password is sent as the MQTT password. Webull documents that any value is
// accepted; the App Key is carried as the user name.
const password = "webullapi4go"
// mqttPasswordAnyValue is the MQTT password. Webull accepts any non-empty
// value; the App Key is carried as the user name (cfg.AppKey). The literal
// string is an arbitrary placeholder and carries no authentication weight.
const mqttPasswordAnyValue = "webullapi4go"

// streamMetrics holds the OTel instruments for stream telemetry.
// All fields are nil when neither an explicit nor inherited meter is available.
Expand Down Expand Up @@ -156,7 +157,7 @@ func New(cl *client.Client, opts ...Option) (*Client, error) {
Broker: broker,
ClientID: cfg.sessionID,
Username: cl.Config().AppKey,
Password: password,
Password: mqttPasswordAnyValue,
KeepAlive: cfg.keepAlive,
ConnectTimeout: cfg.connectTimeout,
WriteTimeout: cfg.writeTimeout,
Expand Down
Loading