Device .state() methods should try and use .send() instead of having redundant code.  Also - stocks should update their State to err when markets are closed.