In Python/mt5, my order request returned an error

 

Hello,

With this code:

    request = {
        "action": MetaTrader5.TRADE_ACTION_PENDING,
        "symbol": "BTCUSD",
        "volume": 0.01,
        "type": mt5.ORDER_TYPE_BUY,
        "price": round(price, 3),
        "type_filling": MetaTrader5.ORDER_FILLING_RETURN,
        "type_time": MetaTrader5.ORDER_TIME_GTC,
        "comment": "some comment"
    }
    # Send the order to MT5
    order_result = MetaTrader5.order_send(request)
    # Notify based on return outcomes
    if order_result[0] == 10009:
        print(f"Order for {symbol} successful")
    else:
        print(f"Error placing order. ErrorCode {order_result[0]}, Error Details: {order_result}")

I get an error (Error placing order. ErrorCode 10013

Do you have any idea why this is happening ?

Thanks

Error placing order. ErrorCode
 
Thanks, but it does not tell me what is the issue exactly :)
 
got the same error sir, please let me know what is the main reason here.
 
avakx1234 #:
got the same error sir, please let me know what is the main reason here.
Please show your code if you need coding help.