Skip to content

fix: support WebSocket proxies and Python 3.13 event loops - #147

Open
yelan187 wants to merge 1 commit into
okxapi:masterfrom
yelan187:fix/websocket-proxy-errors-py313
Open

yelan187 wants to merge 1 commit into
okxapi:masterfrom
yelan187:fix/websocket-proxy-errors-py313

Conversation

@yelan187

Copy link
Copy Markdown

Summary

  • add an optional proxy argument to public and private WebSocket clients
  • forward explicit proxies to websockets.connect
  • propagate the original connection exception instead of returning None
  • bind the event loop when start() runs, avoiding get_event_loop() failures on Python 3.13
  • modernize WebSocket tests to use asyncio.run
  • document explicit WebSocket proxy configuration

Validation

  • python -m pytest test/unit/ -q — 198 passed
  • verified a live demo public WebSocket subscription through an HTTP proxy and received BTC-USDT ticker messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant