Skip to main content

Configuring and running Autoconfig jobs

In AutoConfig, all job configurations are stored in a single file. You can include one or many jobs in the autoconfig.json file, each with its own schedule. Whenever Gunbot restarts or the file is modified, all jobs within the configuration are automatically scheduled. Previously scheduled jobs are removed to avoid any conflicts.

Running AutoConfig jobs is simple. You need two things:

  • Enabled jobs - each job has an option to enable or disable it
  • AutoConfig enabled - this can be done through the browser interface on the AutoConfig page.

Creating a straightforward AutoConfig job is easy with the browser interface's editor. This editor walks you through each necessary step. To create more complex jobs, use the Gunbot code editor. It offers autosuggest options for valid templates related to all job types and filters. However, if you prefer, you may use any editor you like, as the format for jobs is simply JSON.

When a job is processed, changes to the file are made only for pairs that pass all filters in a filter set. A job applies to a single exchange and can have one or multiple filters. Within a job, you can specify filters to determine which pairs it applies to.

If a job successfully completes, the changes are written to config.js, and Gunbot starts using the new settings. Most config changes, such as pair override changes, are applied without restarting the bot. If a job doesn't cause any changes, it won't cause a Gunbot restart.

You can set schedules per job in a format similar to how cron jobs are set. All configuration options are available in the browser interface. We suggest creating a config example using the interface, even if you prefer manually editing the config file. This way, you can ensure all necessary parameters are included.