API Reference / parseMarketDepth200Packet
Function: parseMarketDepth200Packet()
parseMarketDepth200Packet(
buf,subscriptions?):MarketDepth200Event[]
Defined in: src/ws/parsers/marketDepth200.ts:115
Parses a 200-level market depth packet stream from wss://full-depth-api.dhan.co/twohundreddepth.
Packet format:
- 12-byte header:
- [0-1]: int16 LE messageLength
- [2]: uint8 responseCode (41 = Bid, 51 = Ask)
- [3]: uint8 exchangeSegmentCode
- [4-7]: int32 LE securityId
- [8-11]: uint32 LE row count (number of levels up to 200)
- Payload: row count × 16 bytes:
- [+0-7]: float64 LE price
- [+8-11]: uint32 LE quantity
- [+12-15]: uint32 LE order count
Parameters
buf
Buffer
subscriptions?
object[]