TBT 50-level depth bug in fyers-apiv3 — Depth._addDepth() ignores num

,

TBT 50-level depth bug in fyers-apiv3 — Depth._addDepth() ignores num

Hi team,

Found a bug in fyers-apiv3 (up to 3.1.18), FyersWebsocket/tbt_ws.py — Depth._addDepth() writes levels using the loop index instead of level.num.value.

Snapshots look fine, but partial diffs (only changed levels) get packed into 0..N-1 instead of their true 0-49 positions, so the order book corrupts after the first diff.

Fix is one rule: index by num, skip if missing/out-of-range. Full details + corrected code here:

Requesting an official fix in the next fyers-apiv3 release. Thanks.

Tags: api, python, websocket, market-depth