Gunbot's AutoConfig feature is designed to perform a variety of automated tasks related to your trading setup. The specific function of an AutoConfig job is determined by its "operational mode" or "type." This is configured using the type
parameter within the job's JSON definition. Understanding the available job types and how to set them is fundamental to leveraging AutoConfig's full capabilities.
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 you define in your autoconfig.json
file must have a type
parameter. This string value dictates the fundamental behavior of the job. When the job runs (based on its schedule
), AutoConfig executes a specific set of internal logic corresponding to the designated type
.
Here's a conceptual layout showing where the type
parameter fits:
{
"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'
}
}
In this example, type: "addPairs"
means "myFirstJob" is designed to scan for new trading pairs on the "binance" exchange that match the specified filters (e.g., minimum 24-hour volume) and then add them to your Gunbot configuration with the "spotgrid" strategy.
Common AutoConfig Job Types and Their Purposesโ
While the exact list of job types can evolve with Gunbot versions, here are some of the most common and their general functions:
addPairs
:- Purpose: To dynamically discover and add new trading pairs to your Gunbot configuration.
- How it works: It fetches market data, applies your defined filters (e.g., volume, volatility, price range), and if pairs pass these filters and are not already in your config, they are added with a specified strategy and overrides.
- Key Settings:
pairs
(to define exchange and inclusion/exclusion criteria),filters
(to select pairs),strategy
(to assign to new pairs),maxPairs
(to limit total active pairs).
manageOverrides
/manageOverrides2
:- Purpose: To dynamically change strategy override settings for existing, active trading pairs.
- How it works: It evaluates active pairs against filters. If a pair passes, the job applies the specified
overrides
to that pair's configuration. This is useful for adaptive strategies, like enabling selling when a profit target is hit, or adjusting risk parameters based on market conditions. - Key Settings:
pairs
(usually to include all or specific active pairs),filters
(to select which pairs to modify),overrides
(the settings to change).
removePairs
/removePairs2
:- Purpose: To automatically remove or disable trading pairs from your configuration.
- How it works: It checks active pairs against filters. If a pair matches the criteria (e.g., low volume for an extended period, strategy indicates a completed cycle), the job can either fully remove the pair or disable its
BUY_ENABLED
/SELL_ENABLED
flags. - Key Settings:
pairs
(to specify which pairs are candidates for removal),filters
(to decide which pairs to remove),removeDisabled
(option to also clean up already disabled pairs).
changeStrategy
/changeStrategy2
:- Purpose: To change the assigned trading strategy for existing pairs.
- How it works: Similar to
manageOverrides
, but instead of changing override values, it changes thestrategy
string assigned to pairs that pass the filters. - Key Settings:
pairs
,filters
,strategy
(the new strategy name to assign).
collectData
:- Purpose: To gather and store ticker data snapshots over time without performing any trading actions or configuration changes.
- How it works: On its schedule, it fetches ticker data for the specified exchange and saves it to a file. This data can then be used by
backtesting
jobs or for external analysis. - Key Settings:
pairs
(to define the exchange),snapshots
(often set high to collect many points),tickersFolder
(if saving to a specific location).
backtesting
:- Purpose: To simulate how AutoConfig jobs (especially
addPairs
with filters) would have performed on historical ticker data. - How it works: It reads ticker data from files (typically collected by a
collectData
job or downloaded) and processes it sequentially, applying the job's filters as if it were live data. Results are logged, showing which pairs would have been added/removed/modified at what times. - Key Settings:
tickersFolder
(location of historical data),filters
, and other parameters relevant to the job type being simulated.
- Purpose: To simulate how AutoConfig jobs (especially
filteredQuote
:- Purpose: Used in specific contexts, often with bitRage or similar strategies, to dynamically update the list of preferred quote currencies based on filter results.
- Key Settings:
filters
to identify suitable quote assets.
hedge
/hedgeGB
/hedgeGB2
:- Purpose: Specialized job types designed to manage hedging operations, often involving changing strategies or overrides to facilitate converting assets into a preferred base currency.
- Key Settings: Specific parameters related to hedging logic, base currencies, and target strategies.
changeDelay
:- Purpose: To modify the
delay
setting for an exchange if filter conditions are met. - Key Settings:
filters
,delay
(the new delay value).
- Purpose: To modify the
manageBotSettings
:- Purpose: To change global bot settings or exchange-specific settings if filter conditions are met.
- Key Settings:
filters
,bot
(object with bot settings to change),exchange
(object with exchange settings to change for the job's current exchange).
Choosing and Configuring the Job type
โ
- Define Your Goal: What do you want AutoConfig to do? Add promising new coins? Adjust risk on current pairs? Systematically remove underperformers? Your goal will point you to the right job
type
. - Consult Documentation: Gunbot's official documentation is the best source for the most up-to-date list of job types and their specific parameters.
- Start Simple: If you're new to AutoConfig, begin with a straightforward
addPairs
ormanageOverrides
job to understand the workflow. - Align Parameters: Ensure that the other parameters in your job configuration are relevant to the chosen
type
. For example, anaddPairs
job needs astrategy
to assign, while acollectData
job does not. - Use Distinct Job Names: If you have multiple AutoConfig jobs, give them descriptive names to easily identify their purpose and
type
.
Example: Combining Job Typesโ
Advanced AutoConfig setups often involve multiple jobs working together. For instance:
- An
addPairs
job runs regularly to add new pairs. - A
manageOverrides
job adjusts settings on these active pairs based on performance or market conditions. - A
removePairs
job cleans up pairs that are no longer desirable.
Each of these jobs would have its type
parameter set appropriately.
By correctly defining the type
of your AutoConfig job, you instruct Gunbot to perform the precise automated task you need, making it a powerful component of a dynamic and responsive trading system. Always refer to the latest Gunbot documentation for specifics on each job type and its associated configuration options.