Minimum price variation

What would be a systematic way to handle minimum price variation when placing orders (such as a limit order)? I thought MinTick (available in the master db) would handle minimum price increment, but that does not seem to be the case.

I can manually round, say, the limit price for a stock to be within the minimum price variation for that stock, but it is not really possible when I am dealing with thousands of stocks whose minimum price variation is not uniform.

The error I am getting is:

client 6001 got IB error code 110: The price does not conform to the minimum price variation for this contract.

round_to_tick_sizes did the trick.