I am subscribing to 20 depth data using the websockets, but I have noticed that the update frequency in this stream is lower than that on the charts and also it throttles the ticks.
In normal 5 depth stream, updates are instant, but in 20 depth stream the updates are a bit late sometimes. Also, the number of updates per second is only 2 in 20 depth stream as opposed to 5-6 ticks.
Can the number of updates in 20 depth stream be increased and also instead of throttling, sent as soon as they arrive?
@tradernoob You are using API to subscribe to 20 depth data? Do you get bot Bid and Ask data? Can you paste your logic for parsing the 20 level depth data. I am getting a lot of garbage data in parsing and wondering what I missed or interpreted wrong in reading the API docs?
It may change so Iād suggest waiting for their Python module.
But currently, they send N * (12 + 320) bytes in one go where N is (variable) number of packets.
First 12 bytes are the response header, and next 320 are 16 * 20 bytes of payload. The exact schema is similar to the one they mentioned.
Also, though not sure, they send multiples (332 + 332) bytes everytime, such that bid and ask are always clubbed together.
So the whole packet may be like: bidPacket1 + askPacket1 + bidPacket2 + askPacket2 + ā¦ + bidPacketN + askPacketN.