Skip to main content

Scaling Agent

The Scaling Agent is an interactive command-line assistant built into the Bot Management tab. It helps you optimize your perp market maker (perp_mm) bot settings through natural conversation and guided commands.
The Scaling Agent only works with perp_mm strategy bots. Vortex DCA and other strategies use different parameters.

🚀 Getting Started

Accessing the Agent

  1. Navigate to Bot Management tab
  2. Find the Scaling Agent Console at the top of the page
  3. Type commands or natural language questions
  4. Press Enter or click Send

First Time?

If you don’t have a running perp_mm bot, the agent will guide you to:
  1. Select an appropriate preset (like “BloFin v7 Long Short Counterscalp”)
  2. Configure your exchange credentials
  3. Start your first bot

💬 Commands Reference

Quick Profiles

Apply pre-tuned risk profiles instantly:
CommandRisk Levelequity_pctLeverageExpected Returns
/scale conservativeLow3%10x0.5-1% daily
/scale moderateMedium5%50x1-3% daily
/scale aggressiveHigh12%75x3-10% daily
/scale degenExtreme20%100x10-50%+ (or rekt)
DEGEN mode uses 100x leverage. You could lose your entire account. Only use with money you can afford to lose!

Fine-Tune Settings

Adjust individual parameters:
/set equity_pct 5      # Set equity percentage to 5%
/set leverage 50       # Set leverage to 50x
/set base_spread_bps 15    # Set spread to 15 basis points
/set target_net_bps 11     # Set take-profit to 11 bps
/set num_levels 7          # Set grid levels to 7
/set xgrid_enabled true    # Enable XGrid counter scalp
Available Parameters:
ParameterRangeDescription
equity_pct0-50% of equity per grid cycle
leverage1-125Position leverage
base_spread_bps5-100Base spread in basis points
min_spread_bps3-50Minimum spread floor
target_net_bps3-50Take-profit target
num_levels2-20Number of grid levels
hard_stop_loss_bps50-3000Hard stop loss
xgrid_enabledtrue/falseEnable XGrid hedging

Analysis Commands

/status          # Show current bot settings
/risk check      # Analyze your risk level
/profit estimate # Estimate daily returns
/overview        # Show all bots across exchanges
/symbols         # Top symbols for market making

Learn

/explain equity_pct  # How equity scaling works
/explain xgrid       # Counter-scalp hedging explained
/explain leverage    # Leverage and liquidation risk
/explain spread      # Understanding spreads and fees
/explain grid        # Grid levels explained

🎯 Natural Language

You can also just ask questions naturally:
  • “I want more profit” - Get scaling recommendations
  • “Make my bot safer” - Conservative settings guide
  • “What’s my risk level?” - Risk analysis
  • “Explain equity_pct” - Educational content
  • “Need more grid levels” - Grid configuration help

📊 /overview Command

See all your running bots across exchanges:
/overview
Returns:
  • Active exchanges (Bybit, BloFin, etc.)
  • Running bot count
  • Total effective exposure across all bots
  • Per-bot breakdown with config, strategy, exposure
  • Risk warnings if exposure is high
Example output:
**Bot Overview**

**Active Exchanges:** blofin, bybit
**Running Bots:** 2
**Total Effective Exposure:** 375% of equity

---
**🟢 Running Bots:**

**BLOFIN** - perp_mm
- Config: BloFin v7 Long Short Counterscalp
- Settings: 5% equity × 75x = **375%** exposure
- Symbols: ASTER, SOL, XRP

⚠️ **Moderate Risk Level**
Combined exposure: 375% - This is aggressive but manageable.

📈 /symbols Command

Get real-time symbol recommendations for market making:
/symbols          # Uses your bot's exchange
/symbols bybit    # Force Bybit symbols
Returns top 10 symbols ranked by MM Score:
SymbolPrice1h VolSpreadATRPTrendScore
ASTER$0.08$2.1M0.05%0.32🟢8.5
SOL$185$15M0.02%0.28🟢7.2
XRP$2.15$8M0.03%0.25🔴6.8
MM Score Formula:
(volume / 100K) × (1 / spread) × min(ATRP × 10, 5) × (leverage / 50)
Best for MM: High volume, low spread, moderate ATRP (0.1-0.5)

⚖️ Risk Profiles Explained

Conservative

{
  "equity_pct": 3.0,
  "leverage": 10,
  "base_spread_bps": 25,
  "target_net_bps": 15,
  "hard_stop_loss_bps": 200
}
  • Best for: Learning, large accounts, uncertain markets
  • Effective exposure: ~30% of equity
  • 1% adverse move costs: ~0.3% of account

Moderate

{
  "equity_pct": 5.0,
  "leverage": 50,
  "base_spread_bps": 15,
  "target_net_bps": 11,
  "hard_stop_loss_bps": 500
}
  • Best for: Balanced risk/reward
  • Effective exposure: ~250% of equity
  • 1% adverse move costs: ~2.5% of account

Aggressive

{
  "equity_pct": 12.0,
  "leverage": 75,
  "base_spread_bps": 10,
  "target_net_bps": 8,
  "hard_stop_loss_bps": 800
}
  • Best for: Experienced traders, smaller accounts
  • Effective exposure: ~900% of equity
  • 1% adverse move costs: ~9% of account

Degen

{
  "equity_pct": 20.0,
  "leverage": 100,
  "base_spread_bps": 8,
  "target_net_bps": 6,
  "hard_stop_loss_bps": 1500
}
  • Best for: Gambling, “fun money” only
  • Effective exposure: ~2000% of equity
  • 1% adverse move costs: ~20% of account
Degen mode requires explicit confirmation. You will be asked to type /confirm scale degen before applying.

🧮 Key Concepts

equity_pct (The Growth Engine)

Controls what % of your account equity is used for grid sizing:
equity_pct$1,000 account$10,000 account
3%$30 per cycle$300 per cycle
5%$50 per cycle$500 per cycle
10%$100 per cycle$1,000 per cycle
Why it matters:
  • As your account grows, positions automatically scale up
  • Combined with leverage: equity_pct × leverage = effective exposure
  • At 10% with 75x: effective exposure = 750%

Effective Exposure Formula

Effective Exposure = equity_pct × leverage
Example:
  • 5% equity_pct × 50x leverage = 250% exposure
  • A 1% adverse price move costs: 250% × 1% = 2.5% of your account

XGrid Counter Scalp

When enabled, automatically opens counter-positions when market moves against you:
  1. You’re LONG, market dumps 2%
  2. XGrid opens a SHORT position (counter-scalp)
  3. If market keeps falling, SHORT profits offset LONG losses
  4. If market reverses, original LONG profits
Best for: Volatile, choppy markets where direction is uncertain

⚙️ How It Works

Config Synchronization

When you modify settings through the Scaling Agent:
  1. JSON file updated - Bot process reads this on restart
  2. Database updated - Frontend JSON editor shows new values
  3. Backup created - Previous config saved with timestamp
Changes require a bot restart to take effect. The running bot uses the config from when it started.

Safety Features

  • Automatic backups before any change
  • Validation prevents invalid configurations
  • Warnings for dangerous settings
  • Confirmation required for degen mode

🛠️ Troubleshooting

”No perp_mm configs found”

Your bot isn’t using the perp_mm strategy. The Scaling Agent only works with perp_mm bots. Solution: Start a bot with a perp_mm preset like “BloFin v7 Long Short Counterscalp”

Changes not appearing in JSON editor

SQLAlchemy JSON column detection issue (rare). Solution: Refresh the page after making changes

Bot not using new settings

Bots read config at startup only. Solution: Restart your bot after making changes

📚 Next Steps

Happy scaling! 🚀