Frame parsing only returning first array and discarding the rest of socket message
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- networking
Research direction
Start by reading the Frame class and reproduce the Bitfinex websocket response shown in the issue. Check how multiple WebSocket frames or data objects are consumed, then verify that all arrays from one socket message are returned rather than only the first; compare the result with the public echo-service behavior described.
Written by the indexing model from the issue text.
Description
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...
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 285
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Lawouach/WebSocket-for-Python
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Lawouach/WebSocket-for-Python#300 ·
-
question
Lawouach/WebSocket-for-Python#297 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Lawouach/WebSocket-for-Python#296 ·
-
Lawouach/WebSocket-for-Python#280 · 1 comment · 1 assignee ·
-
Setup new CI Open
Lawouach/WebSocket-for-Python#275 · 1 assignee ·
All issues in Lawouach/WebSocket-for-Python
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100