When using Gunbot's AutoConfig with an addPairs job, set the strategy parameter so newly discovered pairs that pass your filters get a default strategy.
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 Role of the strategy Parameter in addPairs
An addPairs job scans an exchange for pairs that match your filters, then adds those pairs to your main config.js. The strategy parameter tells AutoConfig which strategy to assign to each newly added pair, so the pair is ready to trade.
Use a strategy name that already exists in the strategies section of your config.js file (for example, "spotgrid", "stepgrid", or a custom strategy name).
Configuration Example
Here's how the strategy parameter is used within an addPairs job:
{
"discoverNewAltsJob": {
"enabled": true,
"type": "addPairs",
"schedule": "0 */4 * * *", // Runs every 4 hours
"strategy": "stepgrid", // Assign 'stepgrid' to newly added pairs
"pairs": {
"exchange": "binance",
"include": "USDT-" // Consider USDT-based pairs
},
"filters": {
"minVolume": {
"filterType": "minVolume24h",
"minVolume": 500000
},
"minVolatility": {
"filterType": "minVolatilityPct24h",
"minVolatility": 2.0
}
},
"overrides": { // Optional: assign default overrides too
"STOP_LIMIT": 1.0, // Example: Set a default stop limit
"GAIN": 0.8
},
"maxPairs": 20 // From pairs.maxPairs in expanded list, but often a top-level interpretation for the job
}
}
In the discoverNewAltsJob example:
"type": "addPairs"defines its core function."strategy": "stepgrid"assignsstepgridto any pair that passes the filters and gets added toconfig.js.- The optional
overridesobject sets per-pair settings that complement the assigned strategy.
If the strategy parameter is missing, the job can still discover pairs but won't know which strategy to assign in config.js.
Key Considerations
- Strategy must exist: The
strategyvalue must match a strategy defined inconfig.js. If it doesn't exist, Gunbot cannot assign it. - One strategy per job: Each
addPairsjob assigns a single strategy to all pairs it adds. Use separate jobs if you need different strategies. - Use the exact name: Match the strategy name as it appears in your
config.jsstrategiessection. - Works with
overrides:strategydefines the base logic, whileoverridescan fine-tune per-pair settings. - Post-addition changes: You can use other AutoConfig job types like
manageOverridesorchangeStrategylater if you want to adjust strategy or settings.
The strategy parameter connects pair discovery to an actual trading setup by assigning a defined strategy to each newly added pair. Ensure it points to a valid strategy in your main Gunbot configuration.