Order type and close the last trade

 

Hello everyone,

How to know the order type of the last trade send (not close) and how to close it ?