def get_order_type(order):
    """
    Returns the order type (Sell, Short Sell, Buy)
    :param order: See models.Order
    :return: String
    """
    if hasattr(order, 'sellorder'):
        return 'SELL'
    elif hasattr(order, 'shortsellorder'):
        return 'SHORT SELL'
    elif hasattr(order, 'buyorder'):
        return 'BUY'
    else:
        return 'UNKNOWN'