Fixed some packet handling. Added close and open trade events.