Skip to content

Might better use Threading for websocket instead of async #55

@iurii2002

Description

@iurii2002

I was trying to adapt the current WebSocket implementation to fit my needs, and it was really painful, as it requires a good understanding of low-level event looping, concurrency, and so on. While the examples provide a good demonstration of how to connect to the WebSocket, running other code separately and/or disconnecting from channels is not as straightforward.

For users, it might be easier to structure the WebSocket in a separate thread, allowing them to easily add or remove channels according to their needs.

I have adapted your WebSocket client accordingly https://github.com/iurii2002/paradex-py/blob/main/paradex_py/api/ws_client.py

If this is something you might consider, I may create PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions