20 depth websockets (API) update frequency

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?

Please do post your reply at Live Market Depth Feed isn't implemented in Python SDK - #6 by kartz

Thanks in advance.

@kartz they will update the docs soon IG, its currently not updated. Format is slightly diferent.

1 Like

@tradernoob I realized that and have raised it in another thread (that I have mentioned in my earlier reply to yours).

Do you mind sharing the schema structure in the mentioned thread, given that you got it right?

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.

1 Like

@Hardik kindly see this ^^ (the original post)