BullionDocs

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. 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 is C:\Bullion\Agent.
  2. 2

    Create a virtual environment and install dependencies

    Open a Command Prompt as Administrator, navigate to the agent folder, and run:
    cmd
    cd C:\Bullion\Agent
    
    python -m venv venv
    venv\Scripts\pip install -r requirements.txt
  3. 3

    Add NSSM to your PATH

    Download nssm.exe from nssm.cc/download and place it somewhere on your system PATH, for example C:\Windows\System32. Verify it works:
    cmd
    nssm version
  4. 4

    Run the service installer

    Still in the same Administrator Command Prompt:
    cmd
    install_service.bat
    This registers BullionAgentService, sets it to auto-start, configures log rotation, and starts the service immediately. You should see:
    Service installed and started.
  5. 5

    Verify the service is running

    cmd
    nssm status BullionAgentService
    You should see SERVICE_RUNNING. Logs are written to logs\service_stdout.log inside 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.