Data size for VOLUME field in websocket

HowUTrade
HowUTrade edited September 2023 in General
@Kailash @sujith @rakeshr

Yesterday (14-Sep-2023), the total volume (2419188400) for 'NIFTY CALL 20100' crossed the Int32.MaxValue (2147483647), which resulted in an overflow.

As a temporary measure, we changed the data type in our programs to Uint32, but given that trading volumes are increasing day by day, it's better to allocate 8 bytes for volume or have a common specified divider if want to retain the 4 bytes structure.
  • rakeshr
    We are currently using Uint32, in all our official libraries for the volume-related fields. In most of the scenarios, it shouldn't overflow. We will check on the requirement to allocate 8 bytes of unsigned integer type.
Sign In or Register to comment.