Pair Selector
The pair selector automatically picks which trading pairs your bot trades. Instead of manually listing pairs in your config, the selector filters and ranks all available pairs on the exchange based on volume, price momentum, and other metrics — then subscribes to the top ones.
This means your bot always trades the most active or fastest-moving pairs without manual intervention.
How It Works
The pair selector runs a three-step pipeline:
All exchange pairs
→ Filter (remove pairs that don't meet criteria)
→ Sort (rank remaining pairs by a metric)
→ Limit (take the top N)
→ Bot trades these pairsThis pipeline runs periodically (configurable interval). When the selected pairs change, the bot automatically stops trading pairs that dropped off the list and starts trading newly selected pairs.
Pairs with open positions are always preserved — they stay active even if they no longer meet the filter criteria. The bot won't abandon a position just because volume dropped.
Enabling Pair Selection
Add a pairSelector object to your strategy parameters:
{
"pairSelector": {
"minVolume24h": 5000000,
"sortBy": "volume24h",
"sortDesc": true,
"maxPairs": 10,
"updateIntervalSecs": 300
}
}If no pairSelector key is present, the bot trades the pairs listed in your config file as usual.
Filtering
Filters remove pairs that don't meet your criteria. All filters are optional — only set the ones you care about. Pairs must pass all active filters to be selected.
Whitelist and Blacklist
| Parameter | Type | Default | Description |
|---|---|---|---|
whitelist | string[] | [] | Only consider these pairs. Empty = all pairs |
blacklist | string[] | [] | Exclude these pairs. Applied after whitelist |
If whitelist is non-empty, only those pairs are considered. Blacklist is then applied on top.
All pairs: BTCUSDT, ETHUSDT, SOLUSDT, DOGEUSDT, XRPUSDT
whitelist: ["BTCUSDT", "ETHUSDT", "SOLUSDT"]
→ only BTCUSDT, ETHUSDT, SOLUSDT considered
blacklist: ["SOLUSDT"]
→ SOLUSDT removed
Result: BTCUSDT, ETHUSDTIf whitelist is empty, all pairs on the exchange are considered (minus blacklisted ones).
Volume Filter
| Parameter | Type | Default | Description |
|---|---|---|---|
minVolume24h | USD | none | Minimum 24-hour quote volume |
maxVolume24h | USD | none | Maximum 24-hour quote volume |
Quote volume is the total USD value traded in the last 24 hours. Use minVolume24h to skip low-liquidity pairs.
minVolume24h: 5000000 ($5M daily volume minimum)
BTCUSDT volume: $2.1B → passes
ETHUSDT volume: $890M → passes
XYZUSDT volume: $1.2M → filtered out (below $5M)Price Change Filter
| Parameter | Type | Default | Description |
|---|---|---|---|
minPriceChangePct | percent | none | Minimum 24-hour price change % |
maxPriceChangePct | percent | none | Maximum 24-hour price change % |
Use these to filter by daily price movement. For example, skip pairs that barely moved or that pumped/dumped too hard.
minPriceChangePct: -5.0
maxPriceChangePct: 5.0
BTCUSDT change: +1.2% → passes
ETHUSDT change: -3.8% → passes
DOGEUSDT change: +12.4% → filtered out (above +5%)
XYZUSDT change: -8.1% → filtered out (below -5%)Momentum Delta Filters
Delta filters measure short-term price momentum — how much a pair's price moved in the last 1 minute, 5 minutes, 15 minutes, 1 hour, 2 hours, or 3 hours.
| Parameter | Type | Default | Description |
|---|---|---|---|
minDelta1m / maxDelta1m | percent | none | 1-minute price change % |
minDelta5m / maxDelta5m | percent | none | 5-minute price change % |
minDelta15m / maxDelta15m | percent | none | 15-minute price change % |
minDelta1h / maxDelta1h | percent | none | 1-hour price change % |
minDelta2h / maxDelta2h | percent | none | 2-hour price change % |
minDelta3h / maxDelta3h | percent | none | 3-hour price change % |
Deltas are calculated as: ((current_price - price_N_ago) / price_N_ago) * 100
minDelta5m: 0.1 (only pairs that moved up at least 0.1% in last 5 min)
BTCUSDT 5m delta: +0.3% → passes
ETHUSDT 5m delta: -0.1% → filtered out (negative, below +0.1%)
SOLUSDT 5m delta: +0.05% → filtered out (below +0.1%)Pairs without enough price history for a delta timeframe are excluded if that filter is active.
Sorting
After filtering, remaining pairs are sorted by a metric. The sort determines which pairs end up in your top-N list.
| Parameter | Type | Default | Description |
|---|---|---|---|
sortBy | string | "volume24h" | Metric to sort by (see table below) |
sortDesc | boolean | true | Sort order. true = highest first |
Sort Metrics
| Value | Description |
|---|---|
volume24h | 24-hour quote volume (default — trades the most liquid pairs) |
delta1m | 1-minute price momentum |
delta5m | 5-minute price momentum |
delta15m | 15-minute price momentum |
delta1h | 1-hour price momentum |
delta2h | 2-hour price momentum |
delta3h | 3-hour price momentum |
sortBy: "delta5m", sortDesc: true
SOLUSDT 5m delta: +1.2% → rank 1
BTCUSDT 5m delta: +0.3% → rank 2
ETHUSDT 5m delta: +0.1% → rank 3Limiting
After sorting, take the top N pairs.
| Parameter | Type | Default | Description |
|---|---|---|---|
maxPairs | number | none | Maximum pairs to trade. No limit if unset |
maxPairs: 5
Sorted pairs: SOL, BTC, ETH, DOGE, XRP, AVAX, MATIC, ...
→ Bot trades: SOL, BTC, ETH, DOGE, XRP (top 5 only)Update Interval
The selector re-evaluates pairs on a schedule.
| Parameter | Type | Default | Description |
|---|---|---|---|
updateIntervalSecs | seconds | 0 | How often to re-run the selection pipeline. 0 = only on startup |
Each update cycle:
- Fetches fresh 24-hour statistics from the exchange
- Updates 1-minute kline data for momentum deltas
- Runs the filter → sort → limit pipeline
- Compares new list with current list
- Stops tasks for removed pairs (unless they have open positions)
- Starts tasks for newly added pairs
updateIntervalSecs: 300 (every 5 minutes)
14:00 selected: BTC, ETH, SOL, DOGE, XRP
14:05 re-evaluate → SOL dropped (volume fell), AVAX added
selected: BTC, ETH, AVAX, DOGE, XRP
→ SOL task stopped (if no open positions), AVAX task startedMomentum Data Collection
The pair selector uses a metrics collector that maintains a rolling 3-hour window of 1-minute price data for each pair. This data powers the delta calculations.
On startup:
- Loads 180 one-minute candles (3 hours of history) per pair from the exchange
- Calculates all 6 delta timeframes from the loaded history
On each update cycle:
- Fetches new kline data since last update
- Prunes entries older than 3 hours
- Recalculates deltas
Pairs new to the exchange (or with very recent listings) may not have enough data for longer delta timeframes. Those deltas will be None, and any active filter for that timeframe will exclude the pair.
Preserved Pairs
Pairs with open positions are always included in the selected list, even if they no longer meet any filter criteria. This prevents the bot from orphaning positions.
maxPairs: 3, minVolume24h: 10M
Current positions: DOGEUSDT (open long)
Filter results: BTC, ETH, SOL (DOGE didn't pass volume filter)
Final selected: BTC, ETH, SOL, DOGE
→ DOGE kept because it has an open position
→ Once the position closes, DOGE will be dropped on next updateExamples
High-Volume Trader
Trade the top 10 most liquid pairs, re-evaluated every 5 minutes:
{
"pairSelector": {
"minVolume24h": 10000000,
"sortBy": "volume24h",
"sortDesc": true,
"maxPairs": 10,
"updateIntervalSecs": 300
}
}Momentum Chaser
Trade the top 5 pairs with the strongest 5-minute momentum, skip extreme movers:
{
"pairSelector": {
"minVolume24h": 5000000,
"minDelta5m": 0.1,
"maxDelta5m": 5.0,
"minPriceChangePct": -10.0,
"maxPriceChangePct": 10.0,
"sortBy": "delta5m",
"sortDesc": true,
"maxPairs": 5,
"updateIntervalSecs": 60
}
}Curated List with Filters
Only trade from a fixed list of pairs, but still apply momentum filters:
{
"pairSelector": {
"whitelist": ["BTCUSDT", "ETHUSDT", "SOLUSDT", "BNBUSDT", "XRPUSDT"],
"minDelta15m": 0.05,
"sortBy": "delta15m",
"sortDesc": true,
"updateIntervalSecs": 120
}
}All Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
whitelist | string[] | [] | Only consider these pairs. Empty = all |
blacklist | string[] | [] | Exclude these pairs |
minVolume24h | USD | none | Minimum 24h quote volume |
maxVolume24h | USD | none | Maximum 24h quote volume |
minPriceChangePct | percent | none | Minimum 24h price change % |
maxPriceChangePct | percent | none | Maximum 24h price change % |
minDelta1m / maxDelta1m | percent | none | 1-minute momentum range |
minDelta5m / maxDelta5m | percent | none | 5-minute momentum range |
minDelta15m / maxDelta15m | percent | none | 15-minute momentum range |
minDelta1h / maxDelta1h | percent | none | 1-hour momentum range |
minDelta2h / maxDelta2h | percent | none | 2-hour momentum range |
minDelta3h / maxDelta3h | percent | none | 3-hour momentum range |
sortBy | string | "volume24h" | Sort metric: volume24h, delta1m, delta5m, delta15m, delta1h, delta2h, delta3h |
sortDesc | boolean | true | Sort descending (highest first) |
maxPairs | number | none | Maximum pairs to select |
updateIntervalSecs | seconds | 0 | Re-evaluation interval. 0 = startup only |
