Skip to main content

How can I define the operational mode or type for an AutoConfig job?

· 4 min read

Gunbot AutoConfig jobs run based on the type value in each job’s JSON definition. That type tells Gunbot which operational mode to execute (adding pairs, managing overrides, collecting data, and more).

Use the AutoConfig wizard

Nearly every option that follows can be set without editing files by hand.
Click the (three-dots) menu ➜ AutoConfig, step through the wizard, and press Save; it will write a correct autoconfig.json for you.

The Core Function: type Parameter

Each AutoConfig job in autoconfig.json must define a type. That string decides which internal logic runs when the job is triggered by its schedule.

{
"myFirstJob": {
"enabled": true,
"schedule": "0 * * * *", // Runs at the start of every hour
"type": "addPairs", // User setting: Defines this job's operational mode
"snapshots": 100,
"history": 50,
"historyInterval": 10,
"pairs": {
"exchange": "binance",
"include": "USDT-" // Consider all USDT pairs
// ... other pair settings
},
"filters": {
// Filters to select which pairs to add
"minVolumeFilter": {
"filterType": "minVolume24h",
"minVolume": 1000000
}
},
"strategy": "spotgrid" // Strategy to assign to newly added pairs
// ... other settings relevant to 'addPairs'
}
}

Here, type: "addPairs" tells Gunbot to scan for new pairs on the selected exchange, apply your filters, and add qualifying pairs with the chosen strategy.

Common AutoConfig Job Types and Their Purposes

While the exact list can evolve with Gunbot versions, these are common job types and their general functions:

  • addPairs: Finds and adds new pairs that pass your filters.

    • Key Settings: pairs, filters, strategy, maxPairs.
  • manageOverrides / manageOverrides2: Applies overrides to active pairs that pass filters.

    • Key Settings: pairs, filters, overrides.
  • removePairs / removePairs2: Removes or disables pairs that meet filter criteria.

    • Key Settings: pairs, filters, removeDisabled.
  • changeStrategy / changeStrategy2: Swaps the strategy for pairs that pass filters.

    • Key Settings: pairs, filters, strategy.
  • collectData: Captures ticker data without trading or config changes.

    • Key Settings: pairs, snapshots, tickersFolder.
  • backtesting: Replays historical ticker data to simulate how a job would behave.

    • Key Settings: tickersFolder, filters, plus other parameters for the simulated job type.
  • filteredQuote: Updates preferred quote currencies based on filter results.

    • Key Settings: filters.
  • hedge / hedgeGB / hedgeGB2: Manages hedging operations by changing strategies or overrides.

    • Key Settings: Parameters for hedging logic and base/target currencies.
  • changeDelay: Adjusts the exchange delay if filters match.

    • Key Settings: filters, delay.
  • manageBotSettings: Updates global bot or exchange-specific settings when filters match.

    • Key Settings: filters, bot, exchange.

Choosing and Configuring the Job type

  1. Define Your Goal: Decide the job’s primary task (add pairs, change overrides, remove pairs, collect data).
  2. Consult Documentation: Use the official docs for the most current list of job types and parameters.
  3. Start Simple: Begin with an addPairs or manageOverrides job to learn the workflow.
  4. Align Parameters: Use settings relevant to the chosen type (for example, strategy for addPairs, none for collectData).
  5. Use Distinct Job Names: Name jobs clearly so their purpose and type are obvious.

Example: Combining Job Types

Advanced setups often chain jobs together, for example:

  • An addPairs job adds new pairs.
  • A manageOverrides job adapts settings on active pairs.
  • A removePairs job cleans up pairs that no longer fit your criteria.

Each job should set its own type to define its role.

Defining the correct type tells Gunbot which automated task to perform. For details on each job type and its parameters, refer to the latest Gunbot documentation.