MT5 Python error -7: Unsupported method (RES_E_UNSUPPORTED)

The terminal doesn't support the function you called. Update the terminal and package, or use a different call.

-7RES_E_UNSUPPORTED
NoSafe to retry?
Not a tradeCould it have executed?

What it means

You see this code in mt5.last_error() in Python, after a package call returns None or False.

-7 says the method isn't supported by the terminal on the other end. The package documentation gives only that short description.

It most often points at a version gap, or at a feature this terminal or server doesn't offer.

Common causes

  • A newer package function called against an older terminal.
  • A feature the broker's server doesn't provide.

How to fix it

  • Update the terminal and the package, then try again.
  • Check mt5.version() and test the call on a fresh install.
  • Fall back to another function that gives the same data.

Example in Python:

import MetaTrader5 as mt5

if mt5.market_book_add("EURUSD"):
    book = mt5.market_book_get("EURUSD")
    mt5.market_book_release("EURUSD")
else:
    print("market depth not available:", mt5.last_error())

Is it safe to retry?

Not as is. The same call fails the same way.

Could the order have executed?

Not a trade. Nothing was done.

Without the Python package

With Tickwire your code calls a REST API from any operating system, so this package error doesn't come up. See the MT5 Python API page.

All MetaTrader error codes

All MetaTrader5 Python functions

One API for MT4 and MT5

Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.