Trading preconditions

MT5 trading and market-data calls are proxied in real time to the MT5 terminal through a connected runner. Before a call can succeed, all of the following must hold, or you'll get a 4xx/503:

  1. The instance exists and belongs to your account → else 404.
  2. The instance has an assigned runner → else 400 Instance has no assigned runner.
  3. The instance is in the RUNNING state → else 400 Instance is not running (state: …).
  4. The runner is currently connected → else 503 Runner is not connected.

Commands are forwarded to the terminal and Atlaas waits up to 30 seconds for a reply. If the terminal/runner doesn't answer in time you get a timeout error.