Is there a way to get deal by order id?

 
I have a situation where I only have orderId but I need to check if the deal connected to that order, has direction out or in, is there a way to do this?