The adaptive nature of liquidity in limit order books