periodic script to store orderbook