AutoConfig removePairs jobs can also remove pairs that you manually disabled. Set pairs.removeDisabled: true to remove any pair in config.js with "enabled": false, keeping the config clean.
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.
Keeping config.js Tidy
Over time you might disable pairs in config.js, for example:
- A pair is underperforming, and you want to stop trading it temporarily.
- An exchange announces delisting or maintenance for a pair.
- You're testing a new strategy and disable pairs running older ones.
Those entries stay in config.js unless removed. pairs.removeDisabled automates that cleanup.
How pairs.removeDisabled: true Works
When you include pairs.removeDisabled: true in a removePairs (or removePairs2) job:
Primary filter-based removal: The job evaluates enabled pairs that match
pairs.include/pairs.excludeandpairs.notRemoveBefore(if set). Pairs that pass thefiltersblock are removed (or disabled, depending on theremovePairsimplementation).Disabled pair scan: Independently of filters, if
pairs.removeDisabled: true:- The job scans all pairs listed in
config.jsfor the specifiedpairs.exchange. - It identifies any pair that has its top-level
"enabled"parameter set tofalse. - These manually disabled pairs are then removed entirely from the
config.jsfile.
- The job scans all pairs listed in
Important: The main filters do not apply to removeDisabled. The only criterion is "enabled": false.
Configuration Example
Here's how you would configure a removePairs job to also clean up disabled pairs:
{
"configJanitorJob": {
"enabled": true,
"type": "removePairs",
"schedule": "0 5 * * 1", // Runs weekly, early Monday morning
"pairs": {
"exchange": "kraken",
"include": "-EUR,-USD", // Consider all EUR and USD pairs on Kraken
"notRemoveBefore": 20160, // Only apply main filters to pairs older than 2 weeks (14 days)
"removeDisabled": true, // User setting: Also remove any manually disabled pairs
"noBag": false // For main filter removal, remove even if bag exists (example)
},
"filters": { // These filters apply to *enabled* pairs older than 'notRemoveBefore'
"veryLowWeeklyTrades": {
"filterType": "custom",
"script": " return (this.pairVariables[this.exchangeName]?.[this.pairName]?.tradesThisWeek || 0) < 2;"
}
}
}
}
In configJanitorJob:
- It targets EUR and USD pairs on Kraken.
- Main Filter Logic: For enabled pairs older than 2 weeks, if they had fewer than 2 trades this week (checked by the custom filter), they would be removed by the primary action of the
removePairsjob. removeDisabledLogic: Because"removeDisabled": true, this job will also scan all Kraken pairs inconfig.js(regardless of theincludeornotRemoveBeforesettings for this specific part of the logic). If it finds any pair like"USDT-BTC": { "enabled": false, ... }(assuming USDT-BTC was a Kraken pair in this context), it will remove the entire "USDT-BTC" entry fromconfig.js. This happens irrespective of USDT-BTC's age, volume, or profitability.
Benefits of Using pairs.removeDisabled
- Automated configuration hygiene: Removes entries for pairs you've stopped trading.
- Reduced clutter: Keeps
config.jseasier to manage and back up. - Prevents accidental reactivation: Disabled pairs are removed, so other jobs are less likely to re-enable them unintentionally.
- Complements dynamic removal: Works alongside filter-based removal of enabled pairs.
Important Considerations
- Irreversible action: Removal deletes entries from
config.jsfor that run. Re-add the pair manually or viaaddPairs. Keep backups. - Scope: Applies to any pair on the target
pairs.exchangewith"enabled": false, regardless ofpairs.includeorpairs.notRemoveBefore. - Intention: Use when disabled pairs are truly meant to stay inactive.
- Interaction with
addPairs: AggressiveaddPairsjobs can re-add removed pairs if they still match criteria.