Skip to main content

Filter pairs by 24-hour trading volume with AutoConfig

· 4 min read

24-hour trading volume is a common liquidity signal. Gunbot's AutoConfig supports minVolume24h and maxVolume24h filters to include or exclude pairs based on this metric.

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 Importance of Trading Volume

24-hour trading volume signals how active and liquid a pair is.

  • High Volume: Easier entries/exits with lower slippage.
  • Low Volume: Wider spreads, harder fills, and less reliable strategy performance.

minVolume24h Filter

Use minVolume24h to require a minimum amount of 24-hour activity before a pair is included.

Configuration:

{
"activePairSelector": {
"enabled": true,
"type": "addPairs",
"schedule": "*/30 * * * *",
"pairs": {
"exchange": "binance",
"include": "-USDT" // Focus on USDT pairs
},
"filters": {
"ensureSufficientVolume": {
"filterType": "minVolume24h",
"minRequiredVolume": 1000000 // Value is in quote currency (USDT in this case)
}
},
"strategy": "spotgrid"
}
}

AutoConfig checks the pair's quoteVolume in ticker data. If volume is greater than 1,000,000 (in quote currency), the pair passes.

maxVolume24h Filter

Use maxVolume24h to exclude pairs above a threshold, or combine it with minVolume24h to target a range.

Configuration:

{
"mediumVolumeHunter": {
"filters": {
"minimumActivity": {
"filterType": "minVolume24h",
"minVol": 200000
},
"notTooCrowded": {
"filterType": "maxVolume24h",
"maxVol": 5000000 // Value in quote currency
}
}
}
}

A pair passes if its 24-hour volume is greater than 200,000 and less than 5,000,000 (in its quote currency).

Key Considerations

  1. Quote Currency Denomination: Volume thresholds are in the pair’s quote currency.
    • For USDT-BTC, volume is in USDT.
    • For BTC-ETH, volume is in BTC.
  2. Data Source: Filters rely on the quoteVolume field (or a proxy such as baseVolume * price if quoteVolume is unavailable).
  3. Arbitrary Key Name for Value: The key name for the volume value is arbitrary. AutoConfig uses filterType plus the numeric value in the remaining key.
  4. Dynamic Thresholds: The value can be a string evaluated as JavaScript (less common for these filters).
    "filters":{
    "dynamicMinVolume": {
    "filterType": "minVolume24h",
    "threshold": " this.variables.currentMinVolumeRequirement "
    }
    }
  5. Combining with Other Filters: Volume filters work best alongside volatility, spread, or price range filters.

Use minVolume24h and maxVolume24h to keep AutoConfig focused on liquid pairs that match your strategy requirements.