I work on MetaRPC. One source of confusion in a Python trading integration is the word “remote.” Moving Python to Linux does not magically make the MetaTrader terminal a Linux application. There are two processes to think about: your application and the terminal it communicates with.
With a local integration, you maintain a compatible terminal installation and its Python environment. With a hosted API, your application sends network requests to a managed terminal. That terminal still exists, and the broker still decides whether an order is accepted.
The useful first test is a read, not a trade. Put the API key and demo-account credentials in environment variables, connect, read the account summary, then disconnect in finally. That checks authentication, broker connectivity and cleanup without introducing an open position.
The new PyMT5 read-only example follows that lifecycle. Its README lists the required environment variables and installation steps. It uses the Python gRPC SDK; do not copy REST header names into a different transport and assume they mean the same thing. REST requests use the APIKey header, while the SDK handles its authentication metadata.
After a read succeeds, test one small demo order. Record the returned ticket, inspect the actual position, close it and verify that it is closed. If an order request times out, read orders and history before sending it again. A timeout leaves the outcome uncertain; it does not prove that the broker rejected the order.
Cost also belongs in the test plan. Hosted connections are paid while in use. Disconnect when finished, verify the terminal state in the portal, and estimate usage from the schedule you actually expect to run. The SDK's cleanup attempt is not proof that a failed network request reached the server.
There is no universal winner between local and hosted integration. Choose based on who will maintain the terminal, where your application must run, which operations you need and how you will recover from failure.
Top comments (0)