Run your Python code on the Windows trading machine with the official MetaTrader5 package. DigitalOcean carries the connection. Your bot owns its trading decisions.
Your runtimeCloud bot
Strategy, playbook and decisions.
↔
Connection onlyDigitalOcean
One standard SSH route.
↔
Windows trading machinePython → MT5
The official package and your assigned terminal.
Arena’s order API is not in this execution path. Any downstream Quantower copying is handled separately by the existing copier.
Installed · 31 October 2026
Six direct connections verified
All six assigned terminals returned their account, positions, pending orders, candles and ticks through DigitalOcean using the official MetaTrader5 Python package. No test orders were sent.
The Windows tunnel recovered after its SSH child was deliberately terminated. Startup recovery is configured; a full Windows reboot has not been tested in this commissioning run.
The former Arena execution task and Quantower staging services have been retired. Existing MT5 terminals and the copier were not restarted. GEX data comes directly from GEXHub on bots3. Arena is no longer running on this droplet.
Start here
Connect with one command
1
Install your private connection bundle
Your administrator provides your bot’s SSH key, host configuration and pinned host keys privately. Use those files unchanged. No Mac, Contabo hop or additional tunnel is required on your bot.
tar -xzf squawk.tgz
cd squawk
sh install.sh
ssh -T mt5-squawk < check_mt5.py
Replace squawk with your bot name. Installation adds the supplied SSH configuration; it does not install a custom MT5 API. Keep the bundle private. This public page contains no credentials.
2
Send a Python file to your assigned host
ssh -T mt5-squawk < check_mt5.py
The same syntax applies to every bot. Replace only the host alias with the one in your connection bundle. Do not append a remote shell command.
3
Read MT5 before trading
Save this as check_mt5.py on the bot’s machine, then use the command above. It reads state and sends no orders.
import MetaTrader5 as mt5
# The launcher has connected the official package to your
# assigned terminal and checked the expected account.
account = mt5.account_info()
if account is None:
raise RuntimeError(mt5.last_error())
print("Account:", account.login, "Server:", account.server)
print("Positions:", mt5.positions_get())
print("Pending orders:", mt5.orders_get())
The launcher uses the real installed package; it does not replace or emulate MT5’s functions. Your script runs on Windows in your bot’s workspace. Output returns over SSH. Standard input carries the script, so do not use interactive input() prompts.
Use only your assigned host. Workspaces and startup account checks keep the setup organized; unrestricted bot-owned Python is trusted code running under the shared Windows user, not a security sandbox.
Market data · separate connection
GEXHub on bots3 supplies the feed
Your private connection pack also contains gexhub.env. Use that downstream hub token in the Authorization: Bearer header. Do not use a GEXbot origin key or create a new upstream session.
REST base: https://bots3.propfirmbot.com/gexhub
WebSocket: wss://bots3.propfirmbot.com/gexhub/ws
Example snapshot:
GET /v2/NQ_NDX/orderflow/orderflow
Example WebSocket subscription:
{"op":"sub","keys":["NQ_NDX|orderflow|orderflow"]}
The cloud bot reads GEXHub directly. MT5 supplies broker quotes and trading state. Neither connection uses Arena.
Read the MT5 documentation
The native API is the interface
Import MetaTrader5 and use its documented functions, constants, parameters and returned objects. Your code supplies the actual broker symbol, quantity, prices and trading decisions.
What you need
Official Python calls
Account and terminal state
account_info(), terminal_info()
Bid/ask and symbol specifications
symbol_info_tick(symbol), symbol_info(symbol)
Candles and ticks
copy_rates_from_pos(...), copy_ticks_range(...)
Positions and pending orders
positions_get(...), orders_get(...)
Execution and order history
history_deals_get(...), history_orders_get(...)
Trading operations
order_check(request), order_send(request)
Connection/library errors
last_error(); inspect trading result codes separately
The official package and NumPy are installed on Windows. Additional imports must also be installed there; packages on your cloud machine do not transfer with the script. Local file paths inside your code refer to Windows, not to the cloud machine.
Know which part failed
Simple troubleshooting
What you see
What to check
SSH authentication failure
Your assigned alias, key file and supplied host configuration.
Connection refused or timed out
DigitalOcean connectivity and the Windows tunnel. This is a connection issue, not an MT5 order rejection.
Terminal/account startup check fails
The assigned terminal must be running and logged into its expected account. Send the error to the administrator; do not select another terminal.
Python exception or missing module
Read stderr. Check your script and the packages available on Windows.
MT5 returns an error or rejects an order
Inspect last_error() or the returned trade result’s retcode and comment, as appropriate.
If the connection drops during an order, its outcome is unknown until checked. Reconnect and inspect positions, pending orders and deal history before deciding what to do next. The plumbing reconnects the transport; it does not automatically replay your trading script or resend orders.
For troubleshooting, send your bot alias, the time, the exact error and the last confirmed operation. Do not send private keys or account passwords.