Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame parsing only returning first array and discarding the rest of socket message #240

Open
GerardBCN opened this issue Feb 2, 2018 · 0 comments

Comments

@GerardBCN
Copy link

Hi, I have a problem parsing the messages that the websocket of Bitfinex API sends (wss://api.bitfinex.com/ws/2) after connecting to it and sending the following payload

{
              "event": "subscribe",
              "channel": "book",
              "pair": "tBTCUSD",
              "prec": "R0"
            }

An example of a complete byte string returned by the websocket is the following:

b'\x81\x16[210,[7793198037,0,1]]\x81\x17[210,[7813472121,0,-1]]\x81\x17[210,[7813464771,0,-1]]\x81\x17[210,[7813472713,0,-1]]\x81"[210,[7813472969,8850,0.86764592]]\x81%[210,[7813472987,8850.1,-0.18178494]]\x81%[210,[7813473056,8850.1,-0.30526279]]\x81 [210,[7813473029,8851,-0.06004]]'

However, the parsing process happening in Frame class, is only returning the first array:

[210,[7793198037,0,1]]

and is discarding all the rest of the data.

Am I doing something wrong? should I set some special configuration? Is the protocol implemented in the Frame Class incomplete to handle multiple data objects in the response?

Using public websocket services such as https://websocket.org/echo.html I get all the arrays back, which makes be suspicious about ws4py...

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

No branches or pull requests

1 participant