orders_get() não retorna nada

 

Bom dia. Consigo enviar ordens sem problemas porém não consigo acessá-las depois. Alguém poderia me ajudar?


import MetaTrader5 as mt5
import pandas as pd

# establish connection to the MetaTrader 5 terminal
if not mt5.initialize():
    print("initialize() failed, error code =", mt5.last_error())
    quit()

symbol = "WDOX22"

symbol_info = mt5.symbol_info(symbol)
if symbol_info is None:
    print(symbol, "not found, can not call order_check()")
    mt5.shutdown()
    quit()

lot = 3.0
point = mt5.symbol_info(symbol).point
price = mt5.symbol_info_tick(symbol).ask
deviation = 20
request = {
    "ticket": "ordem",
    "action": mt5.TRADE_ACTION_DEAL,
    "symbol": symbol,
    "volume": lot,
    "type": mt5.ORDER_TYPE_BUY,
    "price": price,
    "sl": (price - 10000 * point),
    "tp": (price + 3000 * point),
    "deviation": deviation,
    "magic": 234000,
    "comment": "python script open",
    "type_time": mt5.ORDER_TIME_DAY,
    "type_filling": mt5.ORDER_FILLING_RETURN,
}

mt5.order_send(request)

# display data on active orders on GBPUSD
orders = mt5.orders_get(symbol=symbol)
if orders is None:
    print("No orders on WDOX22, error code={}".format(mt5.last_error()))
else:
    print("Total orders on WDOX22:", len(orders))
    # display all active orders
    for order in orders:
        print(order)
# shut down connection to the MetaTrader 5 terminal
mt5.shutdown()
Razão: