We estimate the effect of electronic trade on the quality of price discovery in the Intercontinental Exchange cotton futures market. Between 2006 and 2009, this market transtioned from floor-only trade to parallel floor and electronic trade and then to electronic-only trade. We use a random-walk decomposition to separate intraday variation in cotton prices into two components: one related to information about market fundamentals and one a “pricing error” related to market frictions such as the cost of liquidity provision and the transient response of prices to trades. We find that on a typical day during the electronic-only period, the standard deviation of the pricing error is half what it was on a typical day during the floor-only period. This drop reflects a substantial improvement in average market quality, much of which is associated with an increase in the number of trades per day. We report three additional findings: (i) market quality was significantly more volatile during the electronic trading period than the prior periods meaning that there were more days with large deviations from average market quality, (ii) market quality was poor immediately following the closure of the floor and (iii) market quality was better on days when public information was released in the form of USDA crop reports but worse on days where prices change by the maximum imposed by the exchange.