Setup
Installing the Agent
The Bullion Agent is a Python service that runs as a Windows background service. Installation takes about five minutes.
RequirementsRequirements
- Windows 10 or Windows 11 (64-bit)
- MetaTrader 5 terminal installed (doesn't need to be open)
- Python 3.11 or later — python.org
- NSSM (Non-Sucking Service Manager) — nssm.cc
- An Agent ID and API Key from the Bullion dashboard
ℹ
Get your Agent ID and API Key by going to the dashboard, opening the Agents page, clicking Add agent, and copying the credentials shown after creation.
InstallationInstallation
- 1
Download and extract the agent package
In the dashboard, go to Agents → Download Agent and download the latest release. Extract the zip to a permanent location — the service will run from here, so don't move it later. A good default isC:\Bullion\Agent. - 2
Create a virtual environment and install dependencies
Open a Command Prompt as Administrator, navigate to the agent folder, and run:cmdcd C:\Bullion\Agent python -m venv venv venv\Scripts\pip install -r requirements.txt - 3
Add NSSM to your PATH
Downloadnssm.exefrom nssm.cc/download and place it somewhere on your system PATH, for exampleC:\Windows\System32. Verify it works:cmdnssm version - 4
Run the service installer
Still in the same Administrator Command Prompt:This registerscmdinstall_service.batBullionAgentService, sets it to auto-start, configures log rotation, and starts the service immediately. You should see:Service installed and started. - 5
Verify the service is running
You should seecmdnssm status BullionAgentServiceSERVICE_RUNNING. Logs are written tologs\service_stdout.loginside the agent folder.
Service management
Common commands for day-to-day service management:
cmd
nssm start BullionAgentService
nssm stop BullionAgentService
nssm restart BullionAgentService
nssm remove BullionAgentService # uninstalls the service⚠
Always run as Administrator. Both the installer and NSSM commands require elevated privileges to register and manage Windows services.