Repository navigation
fix(okx): use port 443 for OKX websocket streams - #344
Merged
Merged
Conversation
OKX is retiring websocket port 8443; connections on it already receive "WebSocket port 8443 will be retired soon". Switch the public price feed and the private execution stream (live and demo) to the default port, and pin the okx urls in the stream tests like the other exchanges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Paddy <89168564+patrickballard@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
patrickballard
force-pushed
the
fix/okx-ws-port-443
branch
from
November 4, 2026 11:03
fae4d3b to
c4d997a
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
OKX is retiring WebSocket port 8443 (OKX v5 changelog; ccxt/ccxt#30715 and hummingbot/hummingbot#8525 make the same switch). Connections on 8443 still open, but the first frame OKX sends on them is
{"event":"notice","msg":"WebSocket port 8443 will be retired soon. Please migrat…"}. This switches QuantDinger's OKX streams to the default port 443.Related issue
Changes
app/services/market_price_stream.py: the OKX public price feed URL is nowwss://ws.okx.com/ws/v5/public.app/services/execution_streams/adapters.py: theOkxExecutionAdapterprivate URL is nowwss://ws.okx.com/ws/v5/private(live) andwss://wspap.okx.com/ws/v5/private(demo).test_okx_demo_and_live_use_port_443_private_websocket_hosts(same style as the Bitget host test) andtest_okx_public_price_feed_uses_port_443_websocket[spot|swap].Test plan
docker compose up -d --build: not done; I didn't run the full stacktests/test_execution_stream_adapters.py tests/test_market_price_stream.pygive 42 passed, with deps installed as inbasic-ci.yml(requirements.lock --no-depsplusrequirements-dev.txt). With the old URLs, the 3 new tests fail.ruff checkon the changed files passeswss://ws.okx.com/ws/v5/public,wss://ws.okx.com/ws/v5/privateandwss://wspap.okx.com/ws/v5/privateall answerpingwithpongon port 443. A login on each private host is processed (60005 Invalid apiKeyfor a fake key). I didn't test with real credentials.🤖 Generated with Claude Code