def get_symbol_positions_and_orders(symbol, side):
    try:
        # Format the symbol for Phemex
        formatted_symbol = format_symbol_for_phemex(symbol)

        # Normalize the side parameter
        normalized_side = side.lower()
        if normalized_side in ['l', 'long']:
            position_side = 'long'
            order_side = 'buy'
        elif normalized_side in ['s', 'short']:
            position_side = 'short'
            order_side = 'sell'
        else:
            raise ValueError("Invalid side parameter. Must be 'L', 'Long', 'S', or 'Short' (case-insensitive).")

        # Fetch positions
        all_positions = get_open_positions([formatted_symbol])
        positions = [pos for pos in all_positions if pos['side'].lower() == position_side]

        # Fetch open orders
        open_orders = exchange.fetch_open_orders(formatted_symbol)

        # Filter orders based on the specified side and exclude stop orders (case-insensitive)
        filtered_orders = [
            order for order in open_orders 
            if order['side'].lower() == order_side and order['type'].lower() not in ['stop', 'stop_limit', 'stop-market', 'stoplimit']
        ]

        # Format the positions
        formatted_positions = []
        for pos in positions:
            formatted_pos = {
                'symbol': pos['symbol'],
                'side': pos['side'],
                'amount': float(pos['contracts']),
                'entryPrice': float(pos['entryPrice']),
                'unrealizedPnl': float(pos['unrealizedPnl']) if pos['unrealizedPnl'] is not None else None,
                'leverage': float(pos['leverage']),
                'markPrice': float(pos['markPrice']),
                'liquidationPrice': float(pos['liquidationPrice']),
                'margin': float(pos['initialMargin']),
                'marginType': pos['marginMode'],
                'timestamp': pos['timestamp'],
                'id': pos['id'],
                'orderId': pos['info'].get('orderId'),
                'clientOrderId': pos['info'].get('clientOrderId'),
                'positionId': pos['info'].get('positionId'),
                'stopLoss': get_position_stop_loss(pos)
            }
            formatted_positions.append(formatted_pos)

        # Format the orders
        formatted_orders = []
        for order in filtered_orders:
            stop_loss_info = get_stop_loss_info(order['clientOrderId'])
            formatted_order = {
                'id': order['id'],
                'clientOrderId': order['clientOrderId'],
                'symbol': order['symbol'],
                'type': order['type'],
                'side': order['side'],
                'amount': float(order['amount']) if order['amount'] is not None else None,
                'price': float(order['price']) if order['price'] is not None else None,
                'status': order['status'],
                'timestamp': order['timestamp'],
                'storedStopLossPrice': stop_loss_info['stop_loss_price'] if stop_loss_info else None
            }
            formatted_orders.append(formatted_order)

        return {
            'status': 'success',
            'symbol': symbol,
            'side': position_side,
            'positions': formatted_positions,
            'orders': formatted_orders
        }
    except ValueError as e:
        logging.error(f"Invalid input: {str(e)}")
        return {'status': 'error', 'message': str(e)}
    except ccxt.NetworkError as e:
        logging.error(f"Network error while fetching data for {symbol}: {str(e)}")
        return {'status': 'error', 'message': f"Network error: {str(e)}"}
    except ccxt.ExchangeError as e:
        logging.error(f"Exchange error while fetching data for {symbol}: {str(e)}")
        return {'status': 'error', 'message': f"Exchange error: {str(e)}"}
    except Exception as e:
        logging.error(f"Unexpected error while fetching data for {symbol}: {str(e)}")
        return {'status': 'error', 'message': f"Unexpected error: {str(e)}"}


STOP this code from returning stop orders like this one: 

it is type stop with s top price: 

{"orders":[{"amount":0.02,"clientOrderId":"Ben213","id":"4120c6cd-ed5a-4091-a2d4-ed3a5b88bd17","isStopOrder":false,"price":2230.0,"side":"buy","status":"open","stopLoss":null,"stopPrice":null,"storedStopLossPrice":2100.0,"symbol":"ETH/USDT:USDT","timestamp":1726711594754,"type":"limit"},{"amount":0.31,"clientOrderId":"@Johnny545","id":"2db098c1-f3e5-425b-8c8a-f509288a0fc6","isStopOrder":false,"price":2385.0,"side":"buy","status":"open","stopLoss":null,"stopPrice":null,"storedStopLossPrice":2272.0,"symbol":"ETH/USDT:USDT","timestamp":1726712572943,"type":"limit"},{"amount":0.35,"clientOrderId":"@Johnny546","id":"945553eb-d29a-4448-af37-8bf3f18a1ee0","isStopOrder":false,"price":2372.0,"side":"buy","status":"open","stopLoss":null,"stopPrice":null,"storedStopLossPrice":2272.0,"symbol":"ETH/USDT:USDT","timestamp":1726712573935,"type":"limit"},{"amount":0.16,"clientOrderId":"@Johnny547","id":"1f75b8b8-e5d0-42bd-aba2-7fdaf02f7b7e","isStopOrder":false,"price":2378.5,"side":"buy","status":"open","stopLoss":null,"stopPrice":null,"storedStopLossPrice":2272.0,"symbol":"ETH/USDT:USDT","timestamp":1726712574799,"type":"limit"},{"amount":0.0,"clientOrderId":"49727630003_ETHUSDT_2_SL","id":"11fbba78-535c-4114-b3c7-dc3dcd935ec0","isStopOrder":false,"price":null,"side":"buy","status":"open","stopLoss":null,"stopPrice":2420.0,"storedStopLossPrice":null,"symbol":"ETH/USDT:USDT","timestamp":1726715848369,"type":"Stop"}],"positions":[],"side":"long","status":"success","symbol":"ETH/USDT:USDT"}