Skip to content

User Data Stream via Websocket API #696

@Haiss2

Description

@Haiss2

Binance has announced the update related to User Data Stream Spot, and it's very critical

  • [Apr 21] The legacy “User Data Stream with listenKey” will be deprecated; client should move to Websocket API instead

There are 2 types of WebSocket that are used in ccxt/go-binance

  1. websocket serve
    a. Used for data streams
    b. No authentication for WS connection
  2. websocket API client
    a. Used for handling request-response messages
    b. Handle auto reconnect - but without auth for ws connection
    c. I see readC <- is exposed for external uses, it causes problems when using both WriteSync and serve ws by getting GetReadChannel (https://github.com/ccxt/go-binance/blob/master/v2/common/websocket/client.go#L88-L89)

We need the combination of 1 & 2... which helps us

  • Do ws API (for Authentication, Subsription, .... )
  • Serve connection for subscription events, and Ws-API request as well

I’ve completed the implementation here. Please take a look at it and let me know if you find it helpful.
KyberNetwork#16

Activity

carlosmiei

carlosmiei commented on Apr 11, 2025

@carlosmiei
Collaborator

Hello @Haiss2,

Thanks for your contribution, we're still evaluating the best way of releasing this feature since will require all hmac/rsa users to create new ed25519 keys.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @pcriadoperez@Haiss2@carlosmiei

      Issue actions

        User Data Stream via Websocket API · Issue #696 · ccxt/go-binance