I've noticed that when subscribing to an instrument and specifying the depth of the order book that you would like to be updated on, the calculateMarketDepthAllowedByExchange function gets called with a vector of the actually possible depths the exchange offers. This function then utilizes the ceilSearch function to determine the closest greatest market depth allowed by the exchange to the depthWanted.
In the current implementation, there is a potential issue where the function may iterate beyond the last element of the vector if the desired market depth exceeds the greatest market depth offered by the exchange.
I've noticed that when subscribing to an instrument and specifying the depth of the order book that you would like to be updated on, the calculateMarketDepthAllowedByExchange function gets called with a vector of the actually possible depths the exchange offers. This function then utilizes the ceilSearch function to determine the closest greatest market depth allowed by the exchange to the depthWanted.
In the current implementation, there is a potential issue where the function may iterate beyond the last element of the vector if the desired market depth exceeds the greatest market depth offered by the exchange.
Will leave screenshots as an attachment.