← Back to Home

PulseXBot Documentation

Complete reference for PulseXBot v7.0 Phase 7: Pyramid Sizing · Compound Mode · Freefall Protection · Capital Stages · Climb Protection · RSI Dynamic Sizing · Volume Monitoring · Multi-Timeframe RSI · Event-Driven Recalibration · Stuck Deploy. Every configuration setting documented with real math and worked examples. Full strategy guides: token pairing, risk profiles, budget planning. All platforms: Windows, macOS, Linux.

Quick Start

PulseXBot is a self-contained trading bot — download the zip for your operating system, edit two text files, and run the launcher. No additional software to install, no command-line tooling required on Windows.

Before You Start — Three Things You Need

The bot cannot trade until all three of these are in place. Get them ready before you download anything.

① A DEDICATED WALLET

A PulseChain wallet used only for this bot. Never use your main wallet. You will paste the private key into the .env file — the bot has full signing access to everything inside it.

② PLS TO TRADE

Deposit PLS into your dedicated wallet. This is the capital the bot uses to buy and sell tokens. Include a gas buffer of at least 10,000–20,000 PLS on top of your trading budget.

③ PXB TOKENS

10,000 PXB per trading pair. PXB must be held in the same wallet as your private key. The bot checks your balance on-chain — no PXB means no trading, no exceptions.

Getting PLS Into Your Wallet

If you don't have PLS yet, here are the main ways to get it into your trading wallet:

💡

A single pair works best with a meaningful budget. A minimum of 5–10 million PLS per pair gives the grid room to work across multiple levels. Always keep a gas buffer of at least 10,000–20,000 PLS that you do not include in your TOTAL_PLS setting.

Getting PXB — 10,000 Per Pair

PXB is the license token for PulseXBot. Every active trading pair you want to run requires 10,000 PXB held in your trading wallet. You can buy PXB two ways:

Option A — Inside PulseXBot

The dashboard has a built-in Buy PXB button. Click it and the bot constructs the swap directly from your trading wallet — PLS in, PXB out — without needing a browser wallet extension.

Requires the bot to already be running and PLS already in your wallet.

Option B — PulseX DEX

Swap PLS for PXB directly on PulseX. Connect your wallet, paste the PXB contract address into the swap interface, and confirm.

→ Open PulseX DEX
How many PXB do you need? 1 pair → 10,000 PXB minimum
3 pairs → 30,000 PXB
7 pairs → 70,000 PXB
N pairs → N × 10,000 PXB (no upper limit on slots)
Slots = floor(PXB balance ÷ 10,000) — checked on-chain every 6 hours and on every restart

PXB contract address: 0x24698062D05D4E38190751B4708111Ff3a3ea65C

Once PXB lands in your wallet the bot detects it automatically on start. If the bot is already running, click Recheck in the dashboard — new slots activate within seconds.

PXB must be in the same wallet as your .env private key. PXB held in any other wallet is not counted, even if you control both wallets.

Setup Steps

Downloads

🪟
Windows
Windows 10 / 11 · Unzip and run · No install needed
PulseXBot-Setup.zip
🍎
macOS
Intel + Apple Silicon (M1/M2/M3/M4) · Run Start-PulseXBot.sh
PulseXBot-Setup-Mac.zip
🐧
Linux
Ubuntu · Debian · Fedora · x64 · Run Start-PulseXBot.sh
PulseXBot-Setup-Linux.zip
  1. 1
    Download for your platform

    Click the card above for your OS.

  2. 2
    Extract the zip

    Right-click → Extract All. Example: C:\PulseXBot\ on Windows, ~/PulseXBot/ on Mac/Linux.

  3. 3
    Create your .env file

    Copy .env.example, rename to .env, fill in your private key and RPC URLs. See → .env Setup.

  4. 4
    Configure your pairs

    Open corebot-config.js. Set your tokens, TOTAL_PLS budget, and RISK_PROFILE. Leave everything else as "AUTO".

  5. 5
    Start the bot

    Windows: double-click Start-PulseXBot.bat · Mac/Linux: run ./Start-PulseXBot.sh

  6. 6
    Open the dashboard

    Go to http://localhost:5555 in your browser.

Always use a dedicated trading wallet not your main wallet. Only deposit funds you are comfortable putting at risk. The bot has full signing access to everything in that wallet.

Requirements

🪟 Windows
  • Windows 10 or 11 (64-bit)
  • No other software needed
🍎 macOS
  • macOS 12 or later
  • Intel or Apple Silicon
  • No other software needed
🐧 Linux
  • Any modern x64 distro
  • Ubuntu, Debian, Fedora
  • No other software needed
ResourceDetail
RAM~150 MB per running pair. 7 pairs ≈ 1 GB.
Disk~100 MB for the bot, ~50 MB for logs (auto-rotated)
NetworkAlways-on internet, low-latency to PulseChain RPC recommended
WalletHot wallet funded with PLS for trading + PXB tokens for licensing
BrowserAny modern browser for the dashboard (Chrome, Firefox, Safari, Edge)

Installation

🪟 Windows

  1. 1
    Download

    PulseXBot-Setup.zip from pulsexbot.com

  2. 2
    Extract to a folder

    Right-click the zip → Extract All → e.g. C:\PulseXBot\

  3. 3
    Create your .env

    Copy .env.example → rename to .env → open in Notepad → fill in your private key.

  4. 4
    Edit corebot-config.js

    Open in Notepad or VSCode. Set your trading pairs and PLS budget.

  5. 5
    Start

    Double-click Start-PulseXBot.bat

  6. 6
    Open dashboard

    http://localhost:5555

C:\PulseXBot\
  ├── PulseXBot.exe           ← the bot binary
  ├── Start-PulseXBot.bat     ← recommended launcher
  ├── corebot-config.js       ← your trading config
  ├── .env.example            ← template  copy and rename to .env
  ├── .env                    ← (you create this  holds private key)
  ├── .lic                    ← license tracker (do not delete or edit)
  ├── .mk                     ← key decryption file (do not delete or share)
  ├── hex-grid-state.json     ← state file per pair (auto-created)
  ├── hex-grid-logs/          ← log folder per pair (auto-created)
  └── state-backups/          ← daily backups (auto-created)

The dashboard is built into the bot no separate file to open. Once running, navigate to http://localhost:5555 in your browser.

🍎 macOS (Intel + Apple Silicon)

  1. 1
    Download

    PulseXBot-Setup-Mac.zip works on all Macs

  2. 2
    Unzip

    Double-click in Finder. Move the folder where you want it.

  3. 3
    Create .env

    cp .env.example .env then edit in any text editor.

  4. 4
    Edit config

    Open corebot-config.js in any text editor.

  5. 5
    Start

    ./Start-PulseXBot.sh handles quarantine flag automatically.

  6. 6
    Open dashboard

    http://localhost:5555

🐧 Linux

  1. 1
    Download & Extract

    unzip PulseXBot-Setup-Linux.zip -d ~/PulseXBot && cd ~/PulseXBot

  2. 2
    Create .env

    cp .env.example .env && nano .env

  3. 3
    Edit config

    nano corebot-config.js

  4. 4
    Start

    ./Start-PulseXBot.sh

  5. 5
    Keep running 24/7

    Use screen or tmux to persist across SSH disconnects. See → Linux 24/7.

.env File Setup

The .env file holds your PulseChain wallet private key and RPC endpoints. It must be in the same folder as the bot binary.

💡

Easiest way: Copy .env.example, rename to .env (remove the .example part), then open in any text editor and fill in your values.

# PulseChain RPC endpoints
RPC_URL=https://rpc.pulsechain.com
RPC_URL_BACKUP=https://rpc-pulsechain.g4mm4.io

# Your trading wallet private key  KEEP THIS SECRET
PRIVATE_KEY=0xYOURPRIVATEKEYHERE
🚨

Never share your private key with anyone. Never upload your .env file to GitHub, Google Drive, or any cloud service. Use a dedicated trading wallet not your main wallet.

Automatic Private Key Encryption

On first start, the bot automatically encrypts your private key using AES-256-GCM and replaces the raw value with an ENC:... string. The decryption key is stored in a separate .mk file on your machine only copying .env without .mk won't work on another machine.

Back up both .env and .mk together. If you lose .mk, delete the ENC:... value and paste your raw private key again the bot will re-encrypt it on next start.

How to Export Your Private Key from MetaMask

  1. Click the account icon in MetaMask
  2. Go to Settings → Security & Privacy
  3. Click Export Private Key
  4. Enter your MetaMask password
  5. Copy the key exactly 64 hex chars (or 66 with leading 0x)

Available RPC Endpoints

URLNotes
https://rpc.pulsechain.comOfficial use as primary
https://rpc-pulsechain.g4mm4.ioCommunity good backup
https://pulsechain.publicnode.comPublicNode alternative
https://rpc.pulsechain.g4mm4.ioAlternative
💡

Always set both RPC_URL and RPC_URL_BACKUP. If the primary fails 3 times in a row, the bot switches to backup and keeps trading. It polls the primary every 5 minutes and switches back when healthy.

Config File Setup

Open corebot-config.js in any text editor. This is where you tell the bot which tokens to trade and how much PLS to allocate.

💡

First time? You only need to set TOTAL_PLS, RISK_PROFILE, and the three token identity fields for each pair. Leave everything else as "AUTO" the bot calibrates all other settings automatically on first run.

The Only Settings You Must Fill In

SettingWhat to put
SYMBOLShort name shown on the dashboard: "HEX", "PLSX", etc.
TOKEN_ADDRESSThe token's contract address from PulseScan or DexScreener
TOKEN_DECIMALSUsually 18. Check PulseScan if unsure. HEX/WBTC = 8, USDC = 6.
TOTAL_PLSYour PLS budget for this pair. See Budget Planning →
RISK_PROFILECONSERVATIVE / BALANCED / AGGRESSIVE. See guide →

Everything Else Leave as "AUTO"

All other settings are computed from your RISK_PROFILE and live market data by the auto-tune engine. Override only when you have a specific reason. See the full Configuration Reference → for details on every setting.

Minimal Pair Example

{
  SYMBOL:         "HEX",
  TOKEN_ADDRESS:  "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39",
  TOKEN_DECIMALS: 8,
  TOTAL_PLS:      10000000,       // 10M PLS budget
  RISK_PROFILE:   "AGGRESSIVE",  // volatile token → AGGRESSIVE
  // ── everything below is AUTO ──
  BUY_OFFSETS:    "AUTO",
  SELL_LEVELS:    "AUTO",
  // ... (all other settings)
}

First Run

On first start the bot runs a calibration phase for each pair before trading begins:

  1. 1
    License check

    Bot reads PXB balance from your wallet on-chain. 10,000 PXB = 1 slot. Trading won't start without it.

  2. 2
    Calibration (~3 minutes)

    For each pair, the bot samples price every 5 seconds to measure ATR volatility. You'll see [CALIBRATING] in the terminal. The dashboard shows the pair as CALIBRATING. Don't stop the bot during this phase.

  3. 3
    Grid seeded

    Auto-tune computes all AUTO parameters and places the grid. The log prints each level's trigger price and allocation. Trading is now live.

  4. 4
    First buy

    As soon as price touches a level's trigger, the bot buys. You'll get a Telegram alert (if configured) and see the level card turn green in the dashboard.

The calibration phase is also what the CALIBRATE button on the dashboard triggers it forces a fresh 3-minute calibration and re-seeds the grid from scratch with new AUTO values. Use it after a major market move.


Token Pairing Strategy

Not all tokens work the same way in a grid bot. Understanding what you're actually trading and how price movement maps to profit is the foundation of good config choices.

PulseChain-Native Volatile Tokens

Tokens like HEX, EHEX, PLSX, PDAI, INC, and PRVX are PulseChain-native assets. Their price in PLS moves with real supply and demand they pump and dump based on market sentiment, liquidity events, and trading volume. Grid trading works best here because price oscillates within a range, and the bot captures each swing.

These are your core trading pairs. Higher volatility means more level fills, more sells, more cycles. The grid earns on each round trip.

Bridged Assets (WETH, WBTC)

Wrapped ETH and Wrapped BTC on PulseChain track the global ETH/USD and BTC/USD price. Their volatility is real but lower than PulseChain-native meme tokens. They tend to move in larger, slower trends rather than rapid oscillations.

The grid still works here ETH and BTC do have meaningful daily ranges but they suit wider, fewer levels that capture larger moves rather than tight grids that fill on every micro-move.

Stablecoins Against PLS The Directional Bet

Important: Trading USDC/PLS is not the same as trading a volatile token. Understand this before running a USDC pair.

USDC is pegged to $1 USD. Its price in PLS is simply 1 ÷ PLS_USD_price. When PLS goes up in dollar value, USDC costs fewer PLS. When PLS drops, USDC costs more PLS.

USDC price in PLS PLS at $0.000010 → 1 USDC = 100,000 PLS
PLS at $0.000007 → 1 USDC = 142,857 PLS
PLS at $0.000005 → 1 USDC = 200,000 PLS
Buying USDC with PLS profits when USDC price rises in PLS = when PLS falls in USD

The bot buys USDC when PLS is "expensive" (USDC is cheap in PLS terms) and sells USDC when PLS is "cheap" (USDC is expensive in PLS terms). You profit when PLS falls in USD value.

This is a valid hedging strategy USDC positions gain value in PLS terms during a PLS downtrend. But if you're generally bullish on PLS, these positions will sit underwater while PLS appreciates. Size them accordingly and understand they're a directional bet, not a pure volatility trade.

USDC on PulseChain uses RISK_PROFILE: "CONSERVATIVE" wide levels to catch genuine PLS price moves, not micro-oscillations. Dollar pegging means ATR will be very low (tiny day-to-day noise), so AGGRESSIVE would create levels too tight to be meaningful.

PDAI A Different Story

PDAI on PulseChain is a meme token, not a real DAI implementation. Its price is well under 1 cent and moves independently of USD. Treat it exactly like any other PulseChain-native volatile token AGGRESSIVE profile, tight grid, high cycle frequency.

Quick Reference: Token → Profile

TokenTypeRecommended ProfileWhy
HEXPulseChain nativeAGGRESSIVEHigh ATR, high liquidity, active community, oscillates well
EHEXBridged HEXBALANCEDTracks HEX but lower liquidity, slightly less volatile
PLSXDEX governance tokenAGGRESSIVENative PulseChain, small cap, high cycle frequency
PDAIPulseChain memeAGGRESSIVEMeme token, volatile, under 1c not a real stablecoin
INCPulseChain nativeAGGRESSIVEHigh volatility, strong community, good range trader
PRVXPulseChain nativeAGGRESSIVESmall cap, volatile, good for active grid cycling
WETHBridged ETHCONSERVATIVETracks global ETH price, less volatile, wider trends
WBTCBridged BTCCONSERVATIVETracks global BTC price, large trends, not a scalp token
USDCDollar-pegged stablecoinCONSERVATIVEPLS/USD directional bet wide levels, small position, hedge only

Choosing Your Risk Profile

The RISK_PROFILE setting is the single most important config choice. It controls how aggressively the bot deploys capital, how many levels it uses, and how it responds to market conditions. Here's what each profile actually does.

CONSERVATIVE
Main levels3
Level weights0.28 / 0.33 / 0.39
Deep-DCA budget20% of total
Deep-DCA RSI gateRSI < 20
Capital stages[0.40, 0.70, 0.90]
Buy size at stage 275%
RSI oversold mult1.1×
RSI overbought mult0.5×
Compound modeOFF (0%)
Stuck deploy hours96h
Best forWETH, WBTC, USDC
BALANCED
Main levels3–4
Level weights0.22 / 0.33 / 0.44
Deep-DCA budget10% of total
Deep-DCA RSI gateRSI < 25
Capital stages[0.30, 0.60, 0.85]
Buy size at stage 275%
RSI oversold mult1.2×
RSI overbought mult0.6×
Compound modeOFF (0%)
Stuck deploy hours72h
Best forEHEX, most new tokens
AGGRESSIVE
Main levels5–6
Level weightssteeper pyramid
Deep-DCA budget5% of total
Deep-DCA RSI gateRSI < 30
Capital stages[0.25, 0.55, 0.80]
Buy size at stage 275%
RSI oversold mult1.3×
RSI overbought mult0.7×
Compound modeON (25%)
Stuck deploy hours48h
Best forHEX, PLSX, PDAI, INC, PRVX

What "More Levels" Actually Means

More levels doesn't mean more profit it means more capital deployed in a single downtrend. AGGRESSIVE with 6 levels can deploy the entire TOTAL_PLS budget across a -8% move. CONSERVATIVE with 3 levels spreads the same budget across a wider range, preserving more dry powder for deeper dips.

Budget deployment comparison 10M PLS total CONSERVATIVE (3 levels, even wider offsets):
L1 at -1.5%: 2.8M PLS · L2 at -3.5%: 3.3M PLS · L3 at -6.5%: 3.9M PLS All 3 fill only if price drops -6.5% from seed
AGGRESSIVE (6 levels, tighter offsets):
L1 at -0.7%: 1.1M · L2 at -1.4%: 1.6M · L3 at -2.2%: 2.2M · L4 at -3.1%: 2.7M · L5 at -4.2%: 1.2M · L6 at -5.5%: 1.2M All 6 fill if price drops -5.5% much faster budget exhaustion

The "Stuck" Risk with AGGRESSIVE

When AGGRESSIVE fills all 6 levels in a downtrend, all capital is deployed. If price keeps falling, there's nothing left to buy the dip. The grid sits "STUCK" waiting for a recovery. CONSERVATIVE preserves the deep-DCA reserve (20% of budget) for exactly this scenario it can still buy at a -12% to -26% offset even after the main grid is full.

Summary Decision Guide

Budget Planning

Sizing your budget per pair is as important as choosing the right profile. Too small and gas costs eat your profit. Too large relative to liquidity and your own swaps move the market against you.

The 85% Rule

The sum of all TOTAL_PLS budgets across all pairs should be at most 85% of your wallet balance. The remaining 15% covers:

Wallet sizing example 7 pairs Pair budgets: 50M + 54M + 34M + 51M + 16M + 16M + 5M = 226M PLS total
Wallet needed: 226M ÷ 0.85 = 266M PLS minimum Reserve headroom: 266M − 226M = 40M PLS for gas, reserves, DCA Rule: wallet ≥ (sum of TOTAL_PLS) × 1.18

Minimum Viable Budget Per Pair

The minimum useful TOTAL_PLS depends on the pool's trade size and gas costs. Too small and the bot spends more on gas than it earns:

Pair typePool liquidityMinimum TOTAL_PLSWhy
Small cap (PLSX, PDAI)$50K–$200K2M–5M PLSSmall pools mean smaller trades; 2M is enough to cycle profitably
Mid cap (EHEX, PRVX, INC)$200K–$500K5M–20M PLSMore liquidity supports larger buys with less slippage
Large cap (HEX, WETH, USDC)$400K+20M–100M PLSDeep pools handle large trades small budgets here cycle fine but earn less in PLS terms

How Budget Splits Across the Grid

Understanding exactly how the bot uses your budget helps avoid surprises. The full split is:

Full budget allocation 10M PLS, BALANCED profile TOTAL_PLS = 10,000,000 PLS
RESERVE_PLS = 200,000 (auto: gas safety buffer, never spent on buys) tradingBudget = 10,000,000 − 200,000 = 9,800,000 DEEP_DCA_BUDGET_PCT = 10% (BALANCED auto) dcaBudget = 9,800,000 × 0.10 = 980,000 (held for 3 deep reserve levels) gridBudget = 9,800,000 − 980,000 = 8,820,000 (for main grid levels) LEVEL_WEIGHTS (BALANCED, 3 levels) = [0.222, 0.333, 0.444] L1 alloc = 8,820,000 × 0.222 = 1,958K PLS L2 alloc = 8,820,000 × 0.333 = 2,937K PLS L3 alloc = 8,820,000 × 0.444 = 3,916K PLS Deep-DCA: 3 reserve levels × ~327K PLS each | Reserve held: 200K

Adding Capital Mid-Run

To increase TOTAL_PLS on a running pair: stop the bot, update the value in config, restart. The new budget takes effect on the next recalibration or reseed. Existing filled positions are preserved and reattached to the new grid automatically. The bot does not redistribute capital from existing filled levels only new buys use the updated sizing.

Don't reduce TOTAL_PLS below what's currently deployed. If L1+L2 have already spent 8M PLS and you set TOTAL_PLS to 5M, the budget tracking becomes negative and new buys are correctly blocked but existing positions still manage and sell normally. Wait for positions to sell before reducing the budget.


How Grid Trading Works

Grid trading places buy orders at fixed intervals below the current price. When price drops and fills a level, the bot holds the tokens and waits for a recovery. When price recovers past the sell target, it sells profiting from the round trip. The grid resets and repeats indefinitely.

Lifecycle of a Single Level

StageWhat happens
WAITINGPrice above trigger. Level is ready but not filled. No capital deployed.
BUY TRIGGERSPrice drops to the level's offset. Bot buys tokens with the level's allocated PLS.
FILLEDTokens held in wallet. Two-tier sell tracking begins (T1 fixed + T2 trail).
T1 SELLSPrice reaches T1 target. Bot sells 30% of tokens at the fixed price. Guaranteed partial profit.
T2 TRAIL ARMSPrice reaches T2 trigger. Trail stop activates, tracking the peak.
T2 SELLSPrice pulls back from peak by trail distance. Remaining 70% sells.
RECYCLEDLevel resets to WAITING. Profits are counted. Cycle count increments if all levels recycled.

Partial Tier Sells (30% / 70% split)

Every filled level sells in two tiers rather than all at once. This captures both quick early profit and the full upside of bigger moves.

Tier 1 Fixed Sell (30%)

When price reaches the T1 target, the bot immediately sells 30% of the level's tokens at a fixed price. This is a guaranteed profit lock it fires regardless of what happens next, even if price immediately reverses. T1 is never a trail.

Tier 2 Trailing Sell (70%)

After T1 fires, T2 holds the remaining 70%. Once price climbs past the T2 trigger, a trailing stop activates and follows the price up. When price retreats from its peak by the trail distance, T2 sells. This captures extended pump moves that T1 would have exited too early.

💡

Key insight: T1 guarantees you always make something on a level even if price immediately drops after the first target. T2 lets the remaining 70% ride higher moves. You get the best of both: certainty + upside.

Trailing Stop Sells

The trailing stop only ever moves up. Once armed, it tracks the highest price seen. The stop sits below that peak by TRAIL_DISTANCE_PCT. If price falls to the stop level, the sell fires. If price keeps rising, the stop rises with it it never drops.

Wick Filter (TRAIL_CONFIRM_POLLS)

Before the trail arms, price must stay at or above the T2 trigger for TRAIL_CONFIRM_POLLS consecutive ticks (default 2 = 10 seconds at 5s interval). A single spiked candle wick won't arm the trail at a phantom peak.

Loss-Guard Interaction and Invalidation

If the trail stop fires but the sell estimate is below the loss guard floor, the trail holds and retries every tick. If price then falls more than TRAIL_INVALIDATE_BUFFER_PCT (default 0.30%) below the stop, the trail cancels entirely and the tier re-arms at its original target it will wait for a fresh attempt when price recovers again.

Trade-Off

A tighter trail distance (TRAIL_DISTANCE_PCT 0.3%) exits quickly on small pullbacks, leaving more profit on the table for big moves. A wider distance (1.5%) rides bigger pumps but gives back more on the way down. Auto-tune scales this with ATR wider in volatile markets, tighter in calm ones.

Example

Trail sell walkthrough HEX level filled at 180 PLS T2 trigger at +2.5% → arms at 184.50 PLS
Trail distance = 0.8% → stop sits 0.8% below running peak Price rises to 188 PLS → stop rises to 188 × (1 − 0.008) = 186.49
Price rises to 195 PLS → stop rises to 195 × 0.992 = 193.44
Price pulls back to 193.00 → stop is 193.44 → SELL at 193.00
Gain vs fill: (193.00 − 180) ÷ 180 = +7.22% on 70% of position

Deep-DCA Reserve Levels

A portion of the budget is held back as a reserve three extra buy levels placed well below the main grid. These are insurance for genuine crashes, not regular dips.

Activation requires all three conditions simultaneously:

If deep-DCA rarely activates, that's correct behaviour. It's designed for genuine market crashes, not every dip. If you want it more active, increase DEEP_DCA_RSI_MAX or switch to AGGRESSIVE profile.

Auto-Shift Grid

When price rises above the seed and no levels are filled, the grid automatically shifts upward to follow. This prevents the bot from waiting forever with a grid anchored to a stale price far below current market.

Only fires when zero levels are filled the bot never shifts with open positions. AUTO_SHIFT_PCT sets the threshold above seed; AUTO_SHIFT_COOLDOWN_MS (default 5 minutes) prevents chasing chop by limiting shift frequency.

Stuck-Level Reduction

When a level stays filled for longer than STUCK_REDUCE_START_HOURS (default 6h) without selling, the stuck-reduction system gradually lowers its sell target toward a floor of STUCK_REDUCE_MIN_PCT (default +1.5%) over a 24-hour ramp.

This is optional STUCK_REDUCE_ENABLED defaults to false. When disabled, stuck levels wait indefinitely for full recovery. When enabled, they can exit at a smaller profit rather than waiting months for the original target.

Reduction ramp math original target 3.5%, floor 1.5%, ramp over 24h hoursStuck = 8h → ratio = (8 − 6) ÷ 24 = 0.083
reducedTarget = 3.5% − (3.5 − 1.5) × 0.083 = 3.5 − 0.17 = 3.33% hoursStuck = 18h → ratio = (18 − 6) ÷ 24 = 0.50
reducedTarget = 3.5% − (3.5 − 1.5) × 0.50 = 3.5 − 1.0 = 2.50% hoursStuck = 30h → ratio capped at 1.0
reducedTarget = floor = 1.5% (won't go lower) After 30+ hours stuck, the level will sell as soon as price reaches +1.5%

Cycle Completion

A cycle completes when every main grid level and every deep-DCA level has been filled and fully sold. At that point:


Auto-Tune Calibration

Auto-tune is the bot's built-in calibration engine. It runs on startup (first time or after a cycle completes), every AUTOTUNE_RECAL_MS hours (default 24h on a clean grid), and whenever a regime shift is detected.

During calibration (~3 minutes) the bot samples price every 5 seconds. It measures:

What Auto-Tune Sets

ParameterHow it's derived
BUY_OFFSETSATR × profile multiplier. CONSERVATIVE: 1.2×–4.5× ATR. BALANCED: 1.5×–6.0× ATR. AGGRESSIVE: 1.2×–5.5× ATR (more levels, tighter spacing).
SELL_LEVELST1 fixed target = ATR × 1.5–2.0. T2 trigger = ATR × 2.5–3.5. Trail distance = ATR × 0.5–0.8.
SLIPPAGE_PERCENTLiquidity-scaled. Very liquid pools (>$500K): 0.3%. Medium ($100K–500K): 0.5–0.8%. Thin (<$100K): 1.0–1.5%.
DEEP_DCA_OFFSETSThree levels at ×6, ×9, ×13 ATR below seed. AGGRESSIVE uses tighter multipliers; CONSERVATIVE uses wider.
RESERVE_PLS200K minimum + small scaling per number of levels.
FREEFALL_DROP_PCTmax(2.0%, ATR × 2.0)
CAPITAL_STAGE_THRESHOLDSProfile-specific. BALANCED: [0.30, 0.60, 0.85] of budget deployed.
LEVEL_WEIGHTSPyramid with profile steepness. Deeper levels get more capital.

Auto-Tune Modal (Dashboard)

Click AUTO-TUNE on any pair tab to open the live override modal. It shows every auto-tuned parameter with its current value and lets you:

Market Regimes

The bot continuously analyses price relative to the 20-period moving average (MA20) and RSI to detect the current market regime. The regime changes how the bot buys, sells, and deploys capital.

⬜ GRID
Price within ±1.5% of MA20
RSI between 35–65
Normal buy sizing (1.0×)
Standard sell targets
Normal level spacing
🟢 TREND_UP
Price > MA20 by climb sensitivity %
RSI above neutral zone
Climb protection activates
Sell targets raised by CLIMB_EXTRA_GAIN_PCT
Auto-shift fires if no levels filled
🔴 TREND_DOWN
Price < MA20 by 1.5%+
RSI below neutral zone
DCA bias applies (+10–25% to buys)
Deep-DCA gate partially relaxed
No auto-shift (price below seed)
🔵 DCA
Price > 3% below MA20
RSI below 40 (sustained oversold)
Full DCA bias on buys
Deep-DCA can activate if RSI < threshold
Maximum buy sizing at oversold levels
🟡 HIGH_VOL
ATR spikes above ATR_HIGH_VOL_PCT
Grid spacing widens by ATR mult
N deepest levels skipped (HIGH_VOL_SKIP_DEEP_LEVELS)
Sell targets widen proportionally
Freefall guard more sensitive

Regime detection uses the 5-minute RSI for speed. The 1-hour RSI is used separately for buy sizing decisions. Both timeframes are always running see Multi-Timeframe RSI.

ATR Adaptive Spacing

The ATR (Average True Range) measures typical price movement as a percentage. The bot uses it to automatically widen or tighten grid offsets and sell targets relative to current market volatility.

ATR spacing multiplier calculation ATR = 0.8% (measured during calibration)
ATR_LOW_VOL_PCT = 0.5% (auto) · ATR_HIGH_VOL_PCT = 1.5% (auto)
atrMult = 1.0 + (ATR − LOW) ÷ (HIGH − LOW) × 0.3 = 1.0 + (0.8 − 0.5) ÷ (1.5 − 0.5) × 0.3 = 1.0 + 0.09 = 1.09× Base offset L1 = −1.2% → effective offset = −1.2% × 1.09 = −1.31%

This means in high-volatility markets, levels are placed further apart (reducing fill frequency but improving profit per trade). In low-volatility markets, levels tighten slightly to stay relevant. The multiplier is bounded by ATR_MIN_SPACING_MULT and ATR_MAX_SPACING_MULT.

Risk Profiles

The three profiles set a complete bundle of parameters in one setting. The profile cards in the Choosing Risk Profile guide show every value each profile sets. Key differences:

DimensionCONSERVATIVEBALANCEDAGGRESSIVE
Capital deployment speedSlowest (3 wide levels)Medium (3–4 levels)Fastest (5–6 tight levels)
Deep-DCA reserve20% (largest reserve)10%5% (smallest reserve)
RSI oversold boost+10%+20%+30% (biggest)
Compound profitsOFFOFFON (25% reinvest)
Stuck deploy trigger96h72h48h
Risk of full depletionLowMediumHigh

Level Recycling

When the deep-DCA reserve is activated and a level fills, it's considered "deployed from reserve". After the reserve level sells, it recycles back to WAITING in the reserve pool it doesn't merge with the main grid. The capital is returned to the reserve budget and can redeploy next time the triple activation conditions are met.

If a deep-DCA level is stuck (all main levels still filled, 72h+ in BALANCED), the stuck-deploy timer fires it regardless of RSI. At that point it's no longer technically "reserve" it's treated as an emergency deploy. It still sells at its normal target and recycles normally after selling.


Partial Take-Profits Deep Dive

Tier Object Format

{ pct: 1.5,  portion: 0.30, trail: false }   // T1: sell 30% at +1.5% fixed
{ pct: 2.5,  portion: 0.70, trail: true  }   // T2: trail 70% once price hits +2.5%

Default AUTO Output (30% fixed + 70% trailing)

SELL_LEVELS: [
  { pct: 1.5,  portion: 0.30, trail: false },
  { pct: 2.8,  portion: 0.70, trail: true  }
]

Full 30/70 Worked Example

Complete tier sell walkthrough HEX, 2M PLS buy at 180 PLS/HEX Buy: 2,000,000 PLS → received 10,989 HEX (after ~0.5% slippage)
Fill price: 181.97 PLS/HEX (effective cost including slippage)

T1 target: fill × 1.015 = 184.70 PLS/HEX
Price hits 184.70 → T1 sells 30% = 3,297 HEX T1 received: 3,297 × 184.70 × (1 − 0.5% slippage) = 606,998 PLS T1 net profit: 606,998 − (2,000,000 × 0.30) = 606,998 − 600,000 = +6,998 PLS
T2 trigger: fill × 1.028 = 187.06 PLS/HEX
Price climbs to 192 → trail arms at 192. Stop = 192 × (1 − 0.008) = 190.46 Price peaks at 198 → stop rises to 198 × 0.992 = 196.42 Price drops to 196.30 → SELL 7,692 HEX (remaining 70%) T2 received: 7,692 × 196.30 × 0.995 = 1,502,600 PLS T2 net profit: 1,502,600 − 1,400,000 = +102,600 PLS
Total profit: 6,998 + 102,600 = +109,598 PLS on 2M investment (+5.48%)

Three-Tier Example

SELL_LEVELS: [
  { pct: 1.2, portion: 0.20, trail: false },  // T1: 20% at +1.2% fixed
  { pct: 2.5, portion: 0.30, trail: false },  // T2: 30% at +2.5% fixed
  { pct: 3.5, portion: 0.50, trail: true  }   // T3: trail remaining 50%
]

Three-tier setup locks in profit at two fixed points before trailing the rest. Useful for low-liquidity tokens where getting the trail exactly right is harder.

Dashboard Display

Level card shows tiers: ✓30% ●70%. ✓ = sold, ● = waiting. The card only resets to WAITING after ALL tiers complete.

Deep-DCA Deep Dive

Budget Split Math

Deep-DCA budget split 10M PLS, BALANCED TOTAL_PLS = 10,000,000
RESERVE_PLS = 200,000 (auto)
tradingBudget = 9,800,000 DEEP_DCA_BUDGET_PCT = 10%
dcaBudget = 9,800,000 × 0.10 = 980,000 (split across 3 reserve levels) gridBudget = 8,820,000 (main levels only) Each deep-DCA level alloc = 980,000 ÷ 3 = 326,667 PLS Deep-DCA offsets (auto, ATR 0.5%): −12%, −18%, −26.4%
Reserve activates only when: all main levels filled + RSI < 25 + TREND_DOWN/DCA

Why It Helps

After a genuine crash fills all main levels, the market is often at maximum fear. RSI is deeply oversold. This is precisely when buying adds the most value the reserve deploys at levels 12–26% below seed, positions the bot for the eventual recovery, and sells on the bounce well above those extreme lows.

Stuck Level Recovery Deep Dive

Reduction Math

The ramp runs from STUCK_REDUCE_START_HOURS to START_HOURS + 24 hours. At the start of the ramp, target is unchanged. At the end, target is at the floor.

Full hourly ramp table 6h start, 1.5% floor, original target 4.0% 6h: 4.00% (ramp begins) | 9h: 3.75% | 12h: 3.50% | 15h: 3.25%
18h: 3.00% | 21h: 2.75% | 24h: 2.50% | 27h: 2.25%
30h+: floor = 1.50% (minimum loss guard prevents selling below +0.30%)

When STUCK_TRAIL_TIGHTEN is true, the trail distance also tightens as the level ages making the trail more likely to fire on a small recovery rather than waiting for a full bounce.

Freefall Protection

How It Triggers

Every tick, the bot checks: has price dropped more than FREEFALL_DROP_PCT over the last FREEFALL_CANDLES candles? If yes, buying pauses immediately even if a level's trigger price is right there.

Recovery

Buying resumes when price recovers FREEFALL_RECOVERY_PCT above the low that triggered the pause. This prevents buying into a dead-cat bounce.

Auto-Tune Math

Freefall threshold auto-calculation ATR 1.8% FREEFALL_DROP_PCT = max(2.0%, ATR × 2.0) = max(2.0, 3.6) = 3.6% FREEFALL_CANDLES = auto: 12 candles = 60-minute lookback
FREEFALL_RECOVERY_PCT = auto: ATR × 0.5 = 0.9%
Trigger: price drops 3.6%+ in any 60-minute window → buys pause Resume: price recovers 0.9%+ above the freefall low

Capital Stages

As more budget is deployed, the bot automatically scales down buy sizes. This prevents committing all capital into a relentlessly declining market.

Default Values (BALANCED)

Thresholds: [0.30, 0.60, 0.85] of budget deployed. Multipliers: [1.0, 0.75, 0.50, 0]

0–30%100% size
30–60%75% size
60–85%50% size
85%+STOP

Example

Capital stage buy-size calculation 10M PLS total, 7M deployed (70% used) Deployment = 7M ÷ 10M = 70% → Stage 3 (between 60% and 85% threshold)
Multiplier = 0.50 (50% of base allocation)
L2 base allocation = 2,937,000 PLS
Effective buy = 2,937,000 × 0.50 = 1,468,500 PLS Bot buys half the normal size to preserve remaining capital

Stages reset automatically when a sell returns capital if deployment drops back below 60%, the next buy at 75% size again.

Climb Protection

How It Works

When price rises above MA20 by more than CLIMB_SENSITIVITY_PCT, the bot temporarily raises sell targets by CLIMB_EXTRA_GAIN_PCT. The moment price drops back below the MA20 threshold, targets revert immediately no persistence.

Example

Climb protection calculation EHEX MA20 = 74.50 PLS · CLIMB_SENSITIVITY_PCT = 1.5% (auto)
Climbing when price > 74.50 × 1.015 = 75.61 PLS
Current price = 76.20 → climbing ✓
Base T2 trigger = +3.0% · CLIMB_EXTRA_GAIN_PCT = 0.7%
Effective trigger while climbing = +3.0% + 0.7% = +3.7% Price drops back to 74.80 → below 75.61 → climb protection off → target reverts to +3.0%

RSI Dynamic Sizing

The 1-hour RSI adjusts buy size bigger bets when the market is genuinely oversold, smaller bets when overbought and likely to correct further down.

Default Values (BALANCED)

1h RSIZoneMultiplierEffect
< 35Oversold1.2× (BALANCED)Buy 20% more than base allocation
35–65Neutral1.0×Normal buy size
> 65Overbought0.6× (BALANCED)Buy 40% less than base allocation

Example (base allocation = 2,000,000 PLS)

RSI sizing with BALANCED profile RSI = 28 (oversold) → 2,000,000 × 1.2 = 2,400,000 PLS bought RSI = 50 (neutral) → 2,000,000 × 1.0 = 2,000,000 PLS bought RSI = 71 (overbought) → 2,000,000 × 0.6 = 1,200,000 PLS bought All subject to capital stage multiplier applied after RSI mult

Pyramid Level Sizing

Rather than allocating equal capital to each level, the pyramid gives more capital to deeper levels. The deeper the dip, the bigger the buy maximising position size exactly when prices are most attractive.

Default Weights by Profile (3 levels)

ProfileL1 (shallowest)L2 (mid)L3 (deepest)L3:L1 ratio
CONSERVATIVE28.2%33.3%38.5%1.37×
BALANCED22.2%33.3%44.5%2.00×
AGGRESSIVEsteepersteepersteeper2.5×+

Example BALANCED, 10M PLS, 3 main levels, gridBudget = 8,820,000

Pyramid allocation calculation weights = [0.222, 0.333, 0.444] → sum = 0.999 ≈ 1.0 (normalised)
L1 = 8,820,000 × 0.222 = 1,958,040 PLS (shallowest, smallest)
L2 = 8,820,000 × 0.333 = 2,937,060 PLS
L3 = 8,820,000 × 0.444 = 3,916,080 PLS (deepest, biggest buy)
If price drops to L3, the bot buys 2× what it bought at L1

Compound Mode

After every profitable sell, a portion of the net profit is reinvested added to the budget of the next buy. Positions grow using house money over multiple cycles, without requiring extra deposits.

Multi-Cycle Compounding Example (COMPOUND_PCT = 15%)

CycleBudget (PLS)Net ProfitCompound AddedNext Budget
15,000,000250,00037,500 (15%)5,037,500
25,037,500254,87538,2315,075,731
35,075,731258,75738,8135,114,544
55,152,547263,32739,4995,192,046
105,318,000274,50041,1755,359,175
175,538,000290,00043,5005,581,500

After 17 cycles with 15% compounding, the effective budget is ~11% larger than the original pure growth from reinvesting profits with zero additional deposits. AGGRESSIVE profile auto-sets this to 25%; CONSERVATIVE and BALANCED leave it off by default.

Volume Monitoring

What It Shows

The bot tracks 1h DEX volume in real time and compares it to the 24h rolling average. The dashboard shows a live volume ratio per pair:

RatioDisplayMeaning
> 1.5×🟢 StrongVolume well above average price moves are backed by real activity
0.5×–1.5×⬜ NormalTypical volume for this pair
< 0.5×🟡 ThinLow volume price may be illiquid, fills and slippage less predictable

Volume is informational only it doesn't directly block buys or sells. Use it to contextualise price moves shown in the dashboard and candlestick chart.

Multi-Timeframe RSI

Two RSI calculations run in parallel at all times:

TimeframePeriodUsed for
5-minute RSI14 periodsRegime detection (GRID / TREND_UP / TREND_DOWN / DCA / HIGH_VOL). Fast response to short-term momentum shifts.
1-hour RSI14 periodsBuy sizing (RSI_OVERSOLD_MULT / RSI_OVERBOUGHT_MULT). Filters out 5-minute noise. Must agree with 5m signal for max conviction.

Why Both Matter

5-minute RSI can flash oversold on a single large candle a spike that immediately reverses. The 1-hour RSI won't move as much from a single candle. If the 5m RSI is 20 (extreme oversold) but the 1h RSI is 55 (neutral), the buy-size boost is minimal. This filters panic spikes from genuine market weakness.

When both agree (5m oversold AND 1h oversold), the RSI multiplier is applied fully maximum buy conviction on genuine market lows.

Event-Driven Recalibration

In addition to the 24h scheduled recalibration, the bot recalibrates immediately when significant market events occur:

Triggers

EventRecalibration type
ATR spikes above HIGH_VOL thresholdFull recalibration widens grid for new volatility
ATR drops back below LOW_VOL thresholdFull recalibration tightens grid to stay relevant
RSI crosses above 65 (overbought)Partial adjusts sell targets, raises auto-shift threshold
RSI crosses below 35 (oversold)Partial adjusts DCA bias, deep-DCA RSI gate
Cycle completes (all levels sold)Full recalibration before next grid seed

Event-driven recalibration only fires on a clean grid (no filled levels) to protect open positions. If levels are filled when the event occurs, the recalibration queues until all levels have sold and cycled.

Stuck Deploy

If the grid stays fully loaded all main levels filled for longer than STUCK_DEPLOY_HOURS with no deep-DCA activation, the bot deploys the deep-DCA reserve without waiting for the RSI gate. The RSI condition is bypassed because the market simply isn't recovering even though technically all capital is deployed.

How It Differs from Normal Deep-DCA

Normal Deep-DCAStuck Deploy
TriggerAll levels filled + RSI oversold + downtrendAll levels filled + X hours without RSI condition
RSI requiredYes (RSI < threshold)No timer bypasses RSI gate
Typical useFlash crash acute, RSI very lowSlow grind down RSI never gets extreme enough
ResultReserve deploys at deep offsetsSame reserve deploys at deep offsets

Example (BALANCED, STUCK_DEPLOY_HOURS = 72)

Stuck deploy scenario HEX grid fully loaded All 3 main levels filled at T=0. RSI oscillates between 35–45 (never reaches 25 gate).
T=24h: still stuck. RSI = 38. Normal deep-DCA blocked (RSI > 25 threshold). T=48h: still stuck. RSI = 42. Still blocked. T=72h: STUCK_DEPLOY_HOURS reached → RSI gate bypassed → deep-DCA deploys 3 reserve levels fire at −12%, −18%, −26.4% offsets

Loss Guard (Strict Zero)

The loss guard is a pre-sell estimate that blocks any sell whose net result after gas and slippage would fall below SELL_LOSS_GUARD_PCT (default 0 = never sell at a loss). The check runs before every auto-sell.

Three-layer defense in depth:

SELL_MIN_PROFIT_PCT (default 0.30%) adds an additional floor above zero the bot won't sell at breakeven, only at a meaningful net gain. The dashboard always shows "sells at ≈ XXXXX" so you can see the exact threshold for each level.

Loss guard calculation example EHEX level Fill price: 74.40 · Tokens held: 5,000 EHEX · Gas paid on buy: 85 PLS
Cost basis: 5,000 × 74.40 + 85 = 372,085 PLS
Trail stop fires at 75.80. Estimate: 75.80 × 5,000 × 0.994 (slippage) − 90 (sell gas) = 376,870 PLS
Net = 376,870 − 372,085 = +4,785 PLS (+1.29%) Above SELL_MIN_PROFIT_PCT 0.30% → SELL EXECUTES
If trail stop had fired at 74.60 (barely above fill):
Estimate: 74.60 × 5,000 × 0.994 − 90 = 370,880 PLS Net = 370,880 − 372,085 = −1,205 PLS (−0.32%) Below 0% floor → SELL BLOCKED. Trail retries next tick.

5% Pre-Swap Deviation Check

Before every buy, the bot fetches a fresh DEX quote. If this quote is more than 5% different from the last known price, the buy is skipped for this tick. This protects against sandwich attacks, flash moves, and thin pool spikes where the bot might buy at a severely unfair price.

The check fires silently you'll see "pre-buy quote shows X% slippage skipping" in the log if it blocks a buy. The bot retries on the next tick automatically.

Low-Funds Watchdog

Every tick the bot checks whether the wallet has enough PLS to execute the next pending buy. If not:

The alert suppresses itself when all main levels are already filled in that case low balance is expected and normal, not an error.

State File Backups

State files are backed up at three points:

WhenFile saved asRetained
Every startup (before trading begins){pair}-grid-state.startup.jsonOverwritten each start always the pre-last-run state
Every hour (while running)state-backups/{pair}-grid-state.hourly.jsonRolling overwritten each hour
Every 24 hours (midnight)state-backups/{date}/{pair}-grid-state.json7 daily snapshots kept, older pruned
💡

Recovery order: try startup.json first (most recent good state). If that's corrupted, try hourly.json. If both are bad, use the daily from state-backups/.

State Mismatch Detection

On every restart, the bot reads the token balance from the wallet and compares it to the total tracked by the state file. If they don't match within a small tolerance, the pair pauses immediately and shows STATE MISMATCH rather than trading on stale data.

See Recovery from State Mismatch → for the step-by-step fix process.

RPC Auto-Recovery

The bot tracks failure counts per RPC endpoint. After 3 consecutive failures, it switches to the backup. It checks the primary every 5 minutes and switches back when healthy. An orange SERVER badge in the dashboard shows when the backup is in use.

RPC Latency Scoring

At startup, the bot tests all configured RPC endpoints and picks the fastest. Latency is measured per request throughout the session if a previously fast endpoint starts degrading, the failover logic activates.

Atomic State Saves

Every state write goes to a .tmp file first, then atomically renames to the real path. A crash or power cut at any moment leaves the state file intact it's impossible to have a half-written, corrupted state file. If the rename fails, the old state file remains untouched.

On-Chain Sell Verification

After every sell transaction confirms, the bot queries the actual on-chain token balance and compares it to what the state file expects. Only after this check passes does the bot log the sell as complete and reset the level. If the balance doesn't match expectations, the level stays FILLED and a warning fires no false completions.

Nonce Collision Prevention

The bot tracks the last submitted transaction's nonce. Before submitting a new transaction, it checks whether the previous nonce is still pending in the mempool. If it is, the new submission is held until the pending TX resolves preventing double-submitting, nonce collisions, and stuck transactions.

60-Second Transaction Deadline

Every swap includes a 60-second on-chain expiry timestamp. If the transaction isn't mined within 60 seconds, it auto-reverts rather than executing at a stale price. The bot retries on the next tick with a fresh quote. This protects against congested mempools where old TXs would otherwise fill at prices far from when they were submitted.

Chain ID Verification

On startup, the bot queries the connected RPC to confirm it's on PulseChain (chain ID 369). If the RPC returns a different chain ID, the bot refuses to start entirely. This prevents accidentally trading on a testnet or a wrong network with real funds.

Startup State Repair

On every restart, the bot scans all level statuses for inconsistencies that can occur after an unexpected shutdown:

Self-healing requires no manual intervention. You'll see ⚠ L3 stuck CLOSED with no tokens recycling to WAITING in the log when repair fires.


Configuration Overview

All bot settings live in corebot-config.js a plain JavaScript file in your bot folder. Open it with Notepad, Notepad++, TextEdit, VSCode, or any text editor. The file has three sections:

  1. Network & dashboard chain ID, router address, dashboard port. Rarely change these.
  2. Global tuning tick interval, logging, calibration timings.
  3. Pairs array one config block per token you trade. This is where you spend most of your time.
💡

Most settings should stay as "AUTO". Auto-tune derives them from real market conditions every 24 hours. Manually overriding bypasses that intelligence only do it when you have a specific, clear reason.

Network & Dashboard Settings

CHAIN_ID 369
PulseChain mainnet chain ID. Verified on startup the bot refuses to run if the RPC returns a different chain. Do not change unless testing on a fork.
CHAIN_ID: 369
ROUTER_ADDRESS 0x165C…52d9
PulseX V2 router contract address. The bot uses this for all swap transactions and liquidity checks. Do not change.
ROUTER_ADDRESS: "0x165C3410fC91EF562C50559f7d2289fEbed552d9"
WPLS 0xA107…9a27
Wrapped PLS contract address. Used for all swap routes PLS is automatically wrapped before swaps that require it.
WPLS: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27"
HOST "localhost"
Dashboard server host. Use "0.0.0.0" to make the dashboard accessible from other devices on your local network. Do NOT expose to the public internet without a firewall or SSH tunnel the dashboard has no authentication and includes sell/pause buttons.
Local only (default): HOST: "localhost"
LAN access: HOST: "0.0.0.0"
Access via SSH tunnel: ssh -L 5555:localhost:5555 user@vps-ip
PORT 5555
Dashboard server port. Change if 5555 is already in use on your machine. Dashboard URL: http://localhost:{PORT}
Default: PORT: 5555
Alternative: PORT: 8080
TX_EXPLORER "https://apphex.win/@/#/tx/"
Block explorer URL prefix. The bot appends transaction hashes to build clickable links in the dashboard trade log.
TX_EXPLORER: "https://apphex.win/@/#/tx/"

Global Settings

CHECK_INTERVAL_MS 5000
How often the main tick loop fires in milliseconds. Important: PulseChain produces a new block every ~10 seconds. The bot uses a block-change gate price is only fetched when a new block arrives, regardless of this interval. Setting this lower than 10000ms means most ticks fire on the same block and skip the price fetch (saving RPC calls). The optimal value is approximately one block time.

Changing this requires a full bot restart the setInterval timer is set once at startup and cannot be changed while running.
Block-based polling math 7 pairs, CHECK_INTERVAL_MS: 3000 PulseChain block time ≈ 10 seconds
Ticks per block = 10,000 ÷ 3,000 = 3.33 ticks/block
2 of every 3 ticks find no new block → skip price fetch, still call getBlockNumber() getBlockNumber() calls: 3.33/block × 6/min × 60min × 7pairs = 8,400/hour At CHECK_INTERVAL_MS: 10000 (≈ one block):
getBlockNumber() calls: ~2,520/hour 70% fewer RPC calls, identical trading speed
Default (5s): CHECK_INTERVAL_MS: 5000
Recommended (1 block): CHECK_INTERVAL_MS: 10000
Aggressive (3s, more RPC load): CHECK_INTERVAL_MS: 3000
CSV_LOGGING true
Whether to write a structured CSV of every buy and sell to {pair}-grid-logs/trades.csv. Each row: timestamp, type, level, price, tokens, PLS, PnL, gas, TX hash. Useful for spreadsheet analysis and tax records.
On (default): CSV_LOGGING: true
Off: CSV_LOGGING: false
PRICE_DECIMALS 7
Display precision for prices in logs and the dashboard. Affects readability only all accounting uses full floating-point precision internally. Set higher for very low-priced tokens (sub-0.0000001 PLS).
Standard: PRICE_DECIMALS: 7
Low-price token (PLSX, PDAI): PRICE_DECIMALS: 9
AUTOTUNE_RECAL_MS 86400000
How often auto-tune recalibrates while running (milliseconds). Only fires on a clean grid (zero filled levels) to protect open positions. Also triggers immediately on ATR or RSI regime shifts regardless of this timer. Default 24 hours = 86,400,000ms.
24h (default): AUTOTUNE_RECAL_MS: 86400000
12h (more adaptive): AUTOTUNE_RECAL_MS: 43200000
7 days (set-and-forget): AUTOTUNE_RECAL_MS: 604800000
CALIBRATION_MIN_MS / CALIBRATION_MAX_MS 180000 / 360000
Calibration runs until both conditions are met: at least CALIBRATION_MIN_MS elapsed AND at least CALIBRATION_MIN_SAMP price samples collected. It never runs longer than CALIBRATION_MAX_MS regardless of samples. Default: min 3 minutes, max 6 minutes.
Default: CALIBRATION_MIN_MS: 180000, CALIBRATION_MAX_MS: 360000
Faster startup: CALIBRATION_MIN_MS: 120000, CALIBRATION_MIN_SAMP: 8
CALIBRATION_MIN_SAMP 10
Minimum number of distinct price samples before calibration may complete. A price sample is counted only when price actually changes tokens with very thin liquidity may produce few samples even after several minutes.
Default: CALIBRATION_MIN_SAMP: 10
Illiquid token: CALIBRATION_MIN_SAMP: 5
Very active token: CALIBRATION_MIN_SAMP: 20
STATE_DIR ./ (bot folder)
Optional path for state files. Leave commented out to store state alongside the bot binary (default). Useful when running multiple bot instances to keep state files organised in separate directories.
Default (commented out): // STATE_DIR: "./state"
Custom path: STATE_DIR: "/home/user/pulsexbot/instance2/state"

Pair Settings Capital

Each entry in the PAIRS array configures one token. These are the identity and budget fields.

SYMBOL string
Display symbol. Used for log file names (HEX-grid-logs/), dashboard tabs, terminal output, and Telegram alerts. Must be unique across all pairs in the config.
SYMBOL: "HEX"
SYMBOL: "EHEX"
SYMBOL: "PLSX"
TOKEN_ADDRESS string
The token's contract address on PulseChain. Get this from PulseScan or DexScreener copy the exact checksum-cased address. Getting this wrong causes every swap to fail or trade the wrong token.
TOKEN_ADDRESS: "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39" // HEX
TOKEN_ADDRESS: "0x95B303987A60C71504D99Aa1b13B4DA07b0790ab" // PLSX
TOKEN_DECIMALS int
Number of decimals the token uses for its smallest unit. Check the token contract page on PulseScan. Getting this wrong causes all swaps to fail with incorrect amounts.
Most ERC-20 tokens (HEX, PLSX, WETH, PRVX, INC): TOKEN_DECIMALS: 18
HEX on Ethereum, WBTC: TOKEN_DECIMALS: 8
USDC, USDT: TOKEN_DECIMALS: 6
TOTAL_PLS number 10000000
Total PLS budget allocated to this pair. The bot splits this across reserve, deep-DCA budget, and main grid levels. The actual per-level allocation depends on RISK_PROFILE, LEVEL_WEIGHTS, and DEEP_DCA_BUDGET_PCT see the Budget Planning guide for the full math.
TOTAL_PLS split 10M PLS, BALANCED profile TOTAL_PLS = 10,000,000
− RESERVE_PLS (auto ≈ 200,000) = 9,800,000 tradable
− DEEP_DCA (10% of tradable) = 980,000 → 3 reserve levels
= gridBudget 8,820,000 → 3 main levels via pyramid weights
L1: 1,958K · L2: 2,937K · L3: 3,916K | Deep: 327K × 3
Small (tight budget): TOTAL_PLS: 2000000
Medium: TOTAL_PLS: 10000000
Large (high liquidity pair): TOTAL_PLS: 50000000
RISK_PROFILE enum "BALANCED"
The single most important setting. Controls level count, pyramid steepness, deep-DCA budget, capital stage thresholds, RSI multipliers, compound mode, and stuck-deploy timing all in one choice. See the Choosing Risk Profile guide for full profile comparison tables and decision rules.
Stablecoins (USDC), bridged assets (WETH, WBTC): RISK_PROFILE: "CONSERVATIVE"
New tokens, lower liquidity (EHEX): RISK_PROFILE: "BALANCED"
Volatile PulseChain tokens (HEX, PLSX, PDAI, INC): RISK_PROFILE: "AGGRESSIVE"
RESERVE_PLS number | "AUTO" "AUTO"
PLS kept in wallet at all times never spent on buys. Auto-tune sets a minimum of 200,000 PLS regardless of profile, scaling slightly with level count. This is a wallet-level safety buffer, not a per-pair budget. It protects against running out of gas if multiple pairs buy simultaneously.
Auto (recommended): RESERVE_PLS: "AUTO"
Manual override (large multi-pair setup): RESERVE_PLS: 1000000
No reserve (risky not recommended): RESERVE_PLS: 0

Pair Settings Grid

BUY_OFFSETS array | "AUTO" "AUTO"
Percent offsets below seed price where buy levels sit. Auto-tune derives these from ATR the number of levels and their spacing depends on both ATR and RISK_PROFILE. Negative numbers, smallest closest to current price.
BUY_OFFSETS auto-derivation ATR 0.15%, AGGRESSIVE profile ATR = 0.15% · Base multipliers (AGGRESSIVE): [1.2, 2.0, 2.8, 3.8, 5.0, 6.5]
Raw offsets = ATR × multiplier:
L1: −0.15 × 1.2 = −0.18% | L2: −0.15 × 2.0 = −0.30% L3: −0.15 × 2.8 = −0.42% | L4: −0.15 × 3.8 = −0.57% L5: −0.15 × 5.0 = −0.75% | L6: −0.15 × 6.5 = −0.98% ATR spacing multiplier (current vol): 1.09×
Effective: [−0.20%, −0.33%, −0.46%, −0.62%, −0.82%, −1.07%]
Auto (recommended): BUY_OFFSETS: "AUTO"
Custom tight 4-level: BUY_OFFSETS: [-0.8, -1.7, -2.8, -4.5]
Custom wide 3-level: BUY_OFFSETS: [-3, -7, -14]
DEEP_DCA_BUDGET_PCT number | "AUTO" "AUTO"
Percent of TOTAL_PLS held back for deep-DCA reserve levels. Auto by profile: CONSERVATIVE 20%, BALANCED 10%, AGGRESSIVE 5%. Set to 0 to disable deep-DCA entirely and put all capital on the main grid.
Auto: DEEP_DCA_BUDGET_PCT: "AUTO"
Conservative insurance: DEEP_DCA_BUDGET_PCT: 20
Disable (all capital on main grid): DEEP_DCA_BUDGET_PCT: 0
DEEP_DCA_OFFSETS array | "AUTO" "AUTO"
Three offsets for the reserve levels, expressed as % below seed price. Auto-tune scales by ATR more volatile tokens get wider offsets so reserves don't fill on normal moves. Three elements always required.
Auto: DEEP_DCA_OFFSETS: "AUTO"
Moderate crashes: DEEP_DCA_OFFSETS: [-12, -18, -26.4]
Deep crashes only: DEEP_DCA_OFFSETS: [-20, -35, -50]
DEEP_DCA_RSI_MAX number | "AUTO" 25
RSI threshold below which deep-DCA reserves can activate. Lower = more conservative (requires more extreme oversold reading). Auto by profile: CONSERVATIVE 20, BALANCED 25, AGGRESSIVE 30. This gate is bypassed by Stuck Deploy after STUCK_DEPLOY_HOURS.
Very conservative (only extreme crashes): DEEP_DCA_RSI_MAX: 20
Balanced (default): DEEP_DCA_RSI_MAX: 25
More active reserves: DEEP_DCA_RSI_MAX: 35
DCA_BIAS_EXTRA_PCT number | "AUTO" 10
Extra percent added to a level's allocation when the regime is TREND_DOWN or DCA. Provides mild buy-the-dip behaviour without requiring manual intervention. Auto-tune pre-divides level allocations by the bias multiplier during calibration so the total spend never overflows TOTAL_PLS even if every level fills simultaneously in DCA mode.
DCA bias calculation base alloc 2,000,000 PLS, DCA_BIAS_EXTRA_PCT 15% Normal regime: buy = 2,000,000 PLS
TREND_DOWN regime: buy = 2,000,000 × (1 + 0.15) = 2,300,000 PLS
Budget protection (auto-tune pre-divides):
Raw alloc target = level's share of gridBudget Stored alloc = raw ÷ 1.15 = scaled down so biased buy = original target Net effect: DCA buys spend more, but total never exceeds TOTAL_PLS
No bias (equal buy size always): DCA_BIAS_EXTRA_PCT: 0
Moderate dip boost (default): DCA_BIAS_EXTRA_PCT: 10
Strong dip-buy (AGGRESSIVE auto): DCA_BIAS_EXTRA_PCT: 25
AUTO_SHIFT_PCT number | "AUTO" "AUTO"
% above seed price at which the bot auto-reseeds upward. Only fires with zero filled levels. Auto-tune typically picks 1–3.5% scaled to ATR.
Auto: AUTO_SHIFT_PCT: "AUTO"
Shift early (follows price closely): AUTO_SHIFT_PCT: 1.5
Shift only on breakouts: AUTO_SHIFT_PCT: 5.0
AUTO_SHIFT_COOLDOWN_MS number 300000
Minimum time between two auto-shifts. Default 5 minutes. Prevents grid from chasing rapid chop by resetting too frequently.
5 min (default): AUTO_SHIFT_COOLDOWN_MS: 300000
15 min: AUTO_SHIFT_COOLDOWN_MS: 900000
1 hour: AUTO_SHIFT_COOLDOWN_MS: 3600000
RESEED_OFFSET_PCT number | "AUTO" "AUTO"
After a cycle completes, the grid reseeds this % above current price. A small positive value gives the new grid an upside cushion so the first level doesn't trigger immediately.
Auto: RESEED_OFFSET_PCT: "AUTO"
Seed slightly above: RESEED_OFFSET_PCT: 0.5
Seed at current price: RESEED_OFFSET_PCT: 0
BUY_COOLDOWN_MS number | "AUTO" "AUTO"
Minimum time between two buys on the same pair. Prevents filling multiple levels on a single fast candle when the next tick would show a recovery. Auto scales with volatility.
Auto (recommended): BUY_COOLDOWN_MS: "AUTO"
1 minute lock: BUY_COOLDOWN_MS: 60000
No cooldown: BUY_COOLDOWN_MS: 0

Pair Settings Sells

SELL_LEVELS array | "AUTO" "AUTO"
Two-tier sell configuration. T1 is a fixed-price partial sell (30% of tokens). T2 is a trailing stop that rides higher moves (70% of tokens). Auto-tune sets both targets based on ATR. Each tier object: { pct, portion, trail }.
Auto sell level derivation ATR 0.15%, BALANCED profile T1 fixed target = ATR × 1.8 = 0.15 × 1.8 = 0.27% → rounded up to min 1.5%
T2 trigger = ATR × 3.2 = 0.15 × 3.2 = 0.48% → rounded up to min 2.5%
AUTO output: T1 at +1.5% (30%), T2 trail from +2.5% (70%) For HEX (ATR 0.147%, AGGRESSIVE):
T1 = 0.147 × 2.0 = 0.29% → min 1.5% | T2 = 0.147 × 4.0 = 0.59% → min 2.5%
Auto (recommended): SELL_LEVELS: "AUTO"
Custom 30/70: SELL_LEVELS: [{pct:1.5, portion:0.3, trail:false},{pct:2.5, portion:0.7, trail:true}]
Single full trail: SELL_LEVELS: [{pct:4.0, portion:1.0, trail:true}]
Three tier: SELL_LEVELS: [{pct:1.2, portion:0.2, trail:false},{pct:2.5, portion:0.3, trail:false},{pct:3.5, portion:0.5, trail:true}]
TRAIL_TRIGGER_PCT number | "AUTO" "AUTO"
% above fill price where T2 trail arms. Once armed, the trail stop follows the price up. The trail stop only moves upward it never drops. Auto-tune scales with ATR.
Auto: TRAIL_TRIGGER_PCT: "AUTO"
Early trail: TRAIL_TRIGGER_PCT: 2.0
Late trail (wait for bigger move): TRAIL_TRIGGER_PCT: 5.0
TRAIL_DISTANCE_PCT number | "AUTO" "AUTO"
How far below the running high the trail stop sits. Tighter = quicker exit on reversal (but gives up more of big moves). Wider = captures larger pumps (but gives back more on the way down). Auto-tune scales with ATR wider in volatile markets.
Auto: TRAIL_DISTANCE_PCT: "AUTO"
Tight (quick exit): TRAIL_DISTANCE_PCT: 0.4
Wide (ride big moves): TRAIL_DISTANCE_PCT: 1.5
TRAIL_CONFIRM_POLLS number 2
Wick filter price must stay at or above the T2 trigger for this many consecutive ticks before the trail arms. Default 2 ticks ≈ 10 seconds (at 5s interval). Prevents a single spiked wick from arming the trail at a phantom peak.
Strict filter (default): TRAIL_CONFIRM_POLLS: 2
No filter (arm on first tick): TRAIL_CONFIRM_POLLS: 1
Very strict: TRAIL_CONFIRM_POLLS: 4
TRAIL_INVALIDATE_BUFFER_PCT number 0.30
If the trail stop fires but is blocked by the loss guard, the trail retries every tick. If price then falls this % further below the stop, the trail cancels and the tier re-arms at its original target rather than chasing a price that keeps falling.
Trail invalidation example stop at 173,093, buffer 0.30% Trail fires → sell blocked (loss guard: estimated net −0.2%)
Trail retries. Price = 172,900. Still blocked.
Invalidation threshold = 173,093 × (1 − 0.003) = 172,573
Price falls to 172,500 → below 172,573 → trail cancels, tier re-arms at original target
Default: TRAIL_INVALIDATE_BUFFER_PCT: 0.30
Tighter (cancel sooner): TRAIL_INVALIDATE_BUFFER_PCT: 0.15
Wider (retry longer): TRAIL_INVALIDATE_BUFFER_PCT: 0.60

Pair Settings Safety

SELL_LOSS_GUARD_PCT number | "AUTO" 0
Maximum permitted net loss on any auto-sell. Default strict zero never sell below cost. Set to a negative number to allow small losses if you have a specific reason (not recommended for normal use). Manual sells from the dashboard bypass this guard.
Strict zero (recommended): SELL_LOSS_GUARD_PCT: 0
Allow up to 0.5% loss: SELL_LOSS_GUARD_PCT: -0.5
SELL_MIN_PROFIT_PCT number 0.30
Every sell must show this estimated net margin (after gas and slippage) or it's blocked. Stricter than SELL_LOSS_GUARD_PCT prevents even breakeven sells. The dashboard shows "sells at ≈ XXXXX" so you always know the exact sell threshold for each level.
Default: SELL_MIN_PROFIT_PCT: 0.30
More strict: SELL_MIN_PROFIT_PCT: 0.50
Minimal: SELL_MIN_PROFIT_PCT: 0.10
SLIPPAGE_PERCENT number | "AUTO" "AUTO"
Maximum permitted slippage on swaps. Auto-tune scales to pool liquidity thin pools get higher tolerance so swaps don't fail. Failed swaps automatically retry once with a +0.5% bump.
Auto (recommended): SLIPPAGE_PERCENT: "AUTO"
Deep liquidity: SLIPPAGE_PERCENT: 0.3
Thin pool: SLIPPAGE_PERCENT: 1.5
STOP_LOSS_PCT number 0 (off)
If the average entry across all filled levels is more than this % above current price, the pair pauses new buys. Default 0 = disabled. A safety brake against catching a falling knife that never recovers. Existing positions are still managed and sold normally while paused.
Off (default): STOP_LOSS_PCT: 0
Pause if 20% underwater: STOP_LOSS_PCT: 20
Pause if 40% underwater: STOP_LOSS_PCT: 40
MIN_LIQUIDITY_USD number | "AUTO" "AUTO"
Minimum USD liquidity in the pool below which the bot won't trade this pair. Protects against rug-pulled or near-empty pools. Auto-tune sets based on TOTAL_PLS size.
Auto: MIN_LIQUIDITY_USD: "AUTO"
Require good liquidity: MIN_LIQUIDITY_USD: 100000
Small cap OK: MIN_LIQUIDITY_USD: 20000

Pair Settings Indicators

MA_PERIOD number | "AUTO" 20
Period of the moving average for regime detection. 20 ticks × 5s interval = 100-second moving average. Faster periods react quicker but are noisier; slower periods are smoother but lag.
Default: MA_PERIOD: 20
Faster (more reactive): MA_PERIOD: 10
Slower (less noise): MA_PERIOD: 50
RSI_PERIOD number | "AUTO" 14
RSI period (Wilder's smoothing). Standard 14 for both 5m and 1h RSI calculations. Both use the same period, calculated over their respective timeframes.
Standard (default): RSI_PERIOD: 14
More reactive: RSI_PERIOD: 9
Smoother: RSI_PERIOD: 21
ATR_PERIOD number | "AUTO" 14
ATR calculation period. Standard 14 candles. The ATR drives grid spacing, sell targets, trail distance, and freefall detection.
Standard (default): ATR_PERIOD: 14
Faster response: ATR_PERIOD: 7
More stable: ATR_PERIOD: 28
ATR_ADAPTIVE_SPACING boolean true
When true, live ATR is used to adjust grid offset spacing on each reseed relative to the calibrated base. Keeps the grid proportional to current volatility rather than stale calibration data. Set false only if you want purely static offsets.
On (default): ATR_ADAPTIVE_SPACING: true
Off (fixed offsets): ATR_ADAPTIVE_SPACING: false
ATR_MIN_SPACING_MULT / ATR_MAX_SPACING_MULT 0.7 / 1.3
Bounds on the ATR spacing multiplier. The multiplier is clamped within these values the grid can tighten to 70% of base spacing in calm markets and widen to 130% in volatile markets. Prevents extreme behaviour at the edges.
Tighter range: ATR_MIN_SPACING_MULT: 0.85, ATR_MAX_SPACING_MULT: 1.15
Wider range: ATR_MIN_SPACING_MULT: 0.5, ATR_MAX_SPACING_MULT: 1.7
HIGH_VOL_SKIP_DEEP_LEVELS number | "AUTO" 2
In HIGH_VOL regime, skip the N deepest main grid levels. Preserves capital for the continuation of the volatile move rather than deploying everything at once into a spike.
Skip 2 deepest (default): HIGH_VOL_SKIP_DEEP_LEVELS: 2
Skip none (deploy fully): HIGH_VOL_SKIP_DEEP_LEVELS: 0
Very cautious: HIGH_VOL_SKIP_DEEP_LEVELS: 3
AUTO_TUNE boolean true
Master on/off for auto-tune calibration for this pair. When false, every "AUTO" field must be set to a real number there's no intelligence to derive them. Strongly recommended to keep true unless you have deep expertise and a specific reason to override everything manually.
On (recommended): AUTO_TUNE: true
Manual control only: AUTO_TUNE: false

Pair Settings Phase 6 & 7

These settings cover the advanced adaptive features. All default to "AUTO" and are calibrated from RISK_PROFILE. The global PHASE6_* flags must also be true for each feature to take effect.

LEVEL_WEIGHTS array | "AUTO" "AUTO"
Pyramid allocation fractions per level from shallowest to deepest. Weights are normalised automatically to sum to 1.0 you don't need to calculate them precisely. Deeper levels receive more capital. Auto set by profile.
LEVEL_WEIGHTS worked example BALANCED, gridBudget 8,820,000 PLS AUTO weights (BALANCED, 3 levels): [0.222, 0.333, 0.444]
L1 = 8,820,000 × 0.222 = 1,958,040 PLS
L2 = 8,820,000 × 0.333 = 2,937,060 PLS
L3 = 8,820,000 × 0.444 = 3,916,080 PLS
L3 : L1 ratio = 3,916,080 ÷ 1,958,040 = 2.00× (exactly double) Equal weighting (flat grid): [0.333, 0.333, 0.333]
All 3 levels: 2,940,000 PLS each no pyramid effect
Auto (recommended): LEVEL_WEIGHTS: "AUTO"
Equal flat: LEVEL_WEIGHTS: [0.333, 0.333, 0.333]
Steep 4-level: LEVEL_WEIGHTS: [0.10, 0.20, 0.30, 0.40]
CAPITAL_STAGE_THRESHOLDS array | "AUTO" "AUTO"
% of TOTAL_PLS deployed that triggers each buy-size reduction stage. Expressed as decimals. One fewer entry than CAPITAL_STAGE_MULTIPLIERS. Auto by profile: BALANCED = [0.30, 0.60, 0.85].
Capital stage deployment table 10M PLS, BALANCED auto Thresholds: [0.30, 0.60, 0.85] · Multipliers: [1.0, 0.75, 0.50, 0]
0–30% deployed (0–3M): full buy size (1.0×)
30–60% deployed (3M–6M): 75% buy size (0.75×)
60–85% deployed (6M–8.5M): 50% buy size (0.50×)
85%+ deployed (8.5M+): no new buys (0×)
At 7M deployed (70%): next buy uses 50% of base alloc
Auto: CAPITAL_STAGE_THRESHOLDS: "AUTO"
More aggressive deployment: CAPITAL_STAGE_THRESHOLDS: [0.40, 0.70, 0.90]
CAPITAL_STAGE_MULTIPLIERS array | "AUTO" "AUTO"
Buy size multiplier at each capital stage. One more entry than CAPITAL_STAGE_THRESHOLDS (last entry covers the "above all thresholds" stage and should be 0 to stop buying when fully deployed).
Auto (BALANCED): CAPITAL_STAGE_MULTIPLIERS: [1.0, 0.75, 0.50, 0]
Gentler reduction: CAPITAL_STAGE_MULTIPLIERS: [1.0, 0.85, 0.65, 0]
Keep buying small: CAPITAL_STAGE_MULTIPLIERS: [1.0, 0.75, 0.50, 0.25]
RSI_OVERSOLD_LVL / RSI_OVERBOUGHT_LVL 35 / 65 (BALANCED)
1h RSI thresholds for oversold and overbought classification. Auto by profile: CONSERVATIVE 30/60, BALANCED 35/65, AGGRESSIVE 40/70. Used by RSI Dynamic Sizing to scale buy amounts.
Conservative: RSI_OVERSOLD_LVL: 30, RSI_OVERBOUGHT_LVL: 60
Balanced (default): RSI_OVERSOLD_LVL: 35, RSI_OVERBOUGHT_LVL: 65
Aggressive: RSI_OVERSOLD_LVL: 40, RSI_OVERBOUGHT_LVL: 70
RSI_OVERSOLD_MULT / RSI_OVERBOUGHT_MULT 1.2 / 0.6 (BALANCED)
Buy size multipliers applied when 1h RSI is in the oversold or overbought zone. Applied after capital stage multiplier. Oversold = buy more (bigger bet at potential bottom). Overbought = buy less (smaller bet when extended).
RSI sizing full stack 10M PLS, 7M deployed (stage 3, 0.50×), BALANCED L2 base alloc = 2,937,000 PLS
Capital stage multiplier (70% deployed): 0.50×
Stage-adjusted = 2,937,000 × 0.50 = 1,468,500
1h RSI = 28 (oversold) → RSI mult = 1.2×
Final buy size = 1,468,500 × 1.2 = 1,762,200 PLS 1h RSI = 72 (overbought) → RSI mult = 0.6×
Final buy size = 1,468,500 × 0.6 = 881,100 PLS
Auto (BALANCED): RSI_OVERSOLD_MULT: 1.2, RSI_OVERBOUGHT_MULT: 0.6
CLIMB_SENSITIVITY_PCT / CLIMB_EXTRA_GAIN_PCT "AUTO" / "AUTO"
Sensitivity: how far above MA20 price must be to trigger climb protection. Extra gain: how much to add to sell targets while climbing. Both revert instantly when price drops below the MA20 threshold.
Auto: CLIMB_SENSITIVITY_PCT: "AUTO", CLIMB_EXTRA_GAIN_PCT: "AUTO"
Manual: CLIMB_SENSITIVITY_PCT: 1.5, CLIMB_EXTRA_GAIN_PCT: 0.5
FREEFALL_DROP_PCT / FREEFALL_CANDLES / FREEFALL_RECOVERY_PCT "AUTO" / "AUTO" / "AUTO"
Freefall detection settings. Drop PCT: how much price must fall over candle window to trigger. Candles: how many 5-minute candles to look back over. Recovery PCT: how much price must recover from the low before buying resumes.
Auto (recommended): all three as "AUTO"
Manual: FREEFALL_DROP_PCT: 3.5, FREEFALL_CANDLES: 12, FREEFALL_RECOVERY_PCT: 0.8
STUCK_DEPLOY_HOURS number | "AUTO" "AUTO"
Hours all main levels must remain filled before deep-DCA activates regardless of RSI. Auto by profile: CONSERVATIVE 96h, BALANCED 72h, AGGRESSIVE 48h.
Auto: STUCK_DEPLOY_HOURS: "AUTO"
Quicker activation: STUCK_DEPLOY_HOURS: 48
Very patient: STUCK_DEPLOY_HOURS: 120
ATR_ADAPTIVE_SELLS boolean true
Scale sell targets AND trail distance with live ATR same principle as ATR_ADAPTIVE_SPACING but for take-profit levels. High ATR widens targets (up to 1.5×). Low ATR tightens them (down to 0.85×). Only active when ATR_ADAPTIVE_SPACING is also enabled.
ATR adaptive sell calculation base target 3.5%, ATR 4.2% (HIGH_VOL threshold 3.0%) atrMult = min(1.5, 1 + (4.2 − 3.0) ÷ 3.0 × 0.5) = 1 + 0.2 = 1.2
Effective sell target = 3.5% × 1.2 = 4.2% Trail distance = 0.8% × 1.2 = 0.96%
On (default): ATR_ADAPTIVE_SELLS: true
Off (fixed sell targets): ATR_ADAPTIVE_SELLS: false
COMPOUND_PCT number | "AUTO" "AUTO"
After each profitable sell, reinvest this % of net profit by adding it to TOTAL_PLS for the next grid. Positions grow using house money over multiple cycles. Auto: AGGRESSIVE 25%, BALANCED 0%, CONSERVATIVE 0%.
Compound mode COMPOUND_PCT 15%, sell nets 250,000 PLS compoundBonus = 250,000 × 0.15 = 37,500 PLS
TOTAL_PLS += 37,500 → grows from 10,000,000 to 10,037,500
Next grid's level allocations scale proportionally from new TOTAL_PLS After 17 cycles at ~5% profit/cycle: budget grows ~11% from compounding alone
Auto: COMPOUND_PCT: "AUTO"
Conservative compound: COMPOUND_PCT: 10
Aggressive compound: COMPOUND_PCT: 25
Off: COMPOUND_PCT: 0
MIN_VIABLE_PARTIAL_MULT number 3
Skip the T1 partial sell if the position value is less than this multiple of estimated gas cost. Prevents wasting a transaction where gas eats all the profit. The bot trails the full position instead of doing a tiny T1 sell.
Viability check avg gas 300 PLS, MIN_VIABLE_PARTIAL_MULT 3 Minimum viable T1 = 300 × 3 = 900 PLS
Position: 28,904 PLS × 30% T1 = 8,671 PLS → EXECUTES T1
Position: 2,400 PLS × 30% T1 = 720 PLS → 720 < 900 → SKIPS T1, trails full position
Default: MIN_VIABLE_PARTIAL_MULT: 3
Skip more small T1s: MIN_VIABLE_PARTIAL_MULT: 5
Always execute: MIN_VIABLE_PARTIAL_MULT: 0

Pair Settings Stuck Reduction

STUCK_REDUCE_ENABLED boolean false
Master switch for stuck-level target reduction. When false (default), stuck levels keep their original sell target indefinitely the bot waits for full recovery no matter how long. When true, stuck levels gradually lower their sell target toward the floor after STUCK_REDUCE_START_HOURS, allowing exit at a smaller but still profitable gain rather than waiting months.
Stuck reduction ramp 6h start, 24h ramp, 1.5% floor, original target 4.0% Progress = (hoursStuck − 6) ÷ 24, capped at 1.0
reducedTarget = 4.0% − (4.0 − 1.5) × progress
6h: 4.00% | 12h: 3.38% | 18h: 2.75% | 24h: 2.13%
30h+: floor = 1.5% (loss guard still prevents sell if net < 0.30%) Trail distance tightens proportionally when STUCK_TRAIL_TIGHTEN: true
Default (wait for full recovery): STUCK_REDUCE_ENABLED: false
Enable gradual exit: STUCK_REDUCE_ENABLED: true
STUCK_REDUCE_START_HOURS number | "AUTO" 6
Hours a level must be filled before stuck-reduction begins lowering the target. Only relevant when STUCK_REDUCE_ENABLED is true.
Default (6 hours): STUCK_REDUCE_START_HOURS: 6
Start sooner: STUCK_REDUCE_START_HOURS: 3
Very patient: STUCK_REDUCE_START_HOURS: 24
STUCK_REDUCE_MIN_PCT number | "AUTO" 1.5
Floor percent that stuck-reduction won't go below. Always set above typical slippage + gas to ensure the reduced target is still profitable. The loss guard provides the absolute hard floor on top of this.
Default (+1.5%): STUCK_REDUCE_MIN_PCT: 1.5
More aggressive exit: STUCK_REDUCE_MIN_PCT: 1.0
More profit preserved: STUCK_REDUCE_MIN_PCT: 2.0
STUCK_TRAIL_TIGHTEN boolean | "AUTO" true
When true, stuck-reduction also tightens the T2 trail distance as the level ages making the trail more likely to fire on a small recovery. A level that's been stuck 30+ hours has a much tighter trail than a freshly-filled level.
Tighten trail (default): STUCK_TRAIL_TIGHTEN: true
Keep wide trail: STUCK_TRAIL_TIGHTEN: false

Adding a New Pair

Open corebot-config.js, copy an existing block inside the PAIRS array, and fill in the five required identity fields. Leave everything else as "AUTO".

{
  // ── REQUIRED  fill these in ─────────────────────────────────────────
  SYMBOL:              "MYTOKEN",
  TOKEN_ADDRESS:       "0x...your token contract...",
  TOKEN_DECIMALS:      18,           // 18 for most; 8 for HEX/WBTC; 6 for USDC
  TOTAL_PLS:           5000000,      // your budget for this pair
  RISK_PROFILE:        "BALANCED",   // CONSERVATIVE | BALANCED | AGGRESSIVE

  // ── LEAVE ALL BELOW AS "AUTO" TO START ──────────────────────────────
  BUY_OFFSETS:              "AUTO",
  RESERVE_PLS:              "AUTO",
  DEEP_DCA_BUDGET_PCT:      "AUTO",
  DEEP_DCA_OFFSETS:         "AUTO",
  DEEP_DCA_RSI_MAX:         "AUTO",
  SELL_LEVELS:              "AUTO",
  TRAIL_TRIGGER_PCT:        "AUTO",
  TRAIL_DISTANCE_PCT:       "AUTO",
  SELL_LOSS_GUARD_PCT:      "AUTO",
  SLIPPAGE_PERCENT:         "AUTO",
  MIN_LIQUIDITY_USD:        "AUTO",
  BUY_COOLDOWN_MS:          "AUTO",
  AUTO_SHIFT_PCT:           "AUTO",
  RESEED_OFFSET_PCT:        "AUTO",
  DCA_BIAS_EXTRA_PCT:       "AUTO",
  STUCK_REDUCE_ENABLED:     false,
  SELL_MIN_PROFIT_PCT:      0.30,
  TRAIL_CONFIRM_POLLS:      2,
  TRAIL_INVALIDATE_BUFFER_PCT: 0.30,
}

Common PulseChain Token Addresses

TokenContract AddressDecimalsProfile
HEX0x2b591e99afE9f32eAA6214f7B7629768c40Eeb398AGGRESSIVE
PLSX0x95B303987A60C71504D99Aa1b13B4DA07b0790ab18AGGRESSIVE
EHEX0x57fde0a71132198BBeC939B98976993d8D89D2258BALANCED
INC0x2fa878Ab3F87CC1C9737Fc071108F904c0B0C95d18AGGRESSIVE
PRVX0xF6f8Db0aBa00007681F8fAF16A0FDa1c9B030b1118AGGRESSIVE
WETH0x02DcdD04e3F455D838cd1249292C58f3B79e3C3C18CONSERVATIVE
WBTC0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C5998CONSERVATIVE
USDC0x15D38573d2feeb82e7ad5187aB8c1D52810B1f076CONSERVATIVE
USDT0x0Cb6F5a34ad42ec934882A05265A7d5F59b51A2f6CONSERVATIVE

Make sure you have enough PXB slot capacity before adding a pair. Each active pair requires 10,000 PXB. The bot shows 🔒 Slot Required on pairs beyond your current slot count.


Web Dashboard

Open the dashboard at http://localhost:5555 (or your configured PORT). It refreshes automatically every 2–5 seconds via WebSocket.

Header Bar

ElementMeaning
TOTAL P&LCombined realised profit/loss across all pairs in PLS and USD. Green = profit.
PLS PRICECurrent PLS/USD with 1h, 24h, 7d % changes
PLS BALANCETotal wallet PLS balance in real time
CYCLES TOTALCombined cycle count across all pairs since first run
TODAY TRADESTotal buy + sell transactions today across all pairs
SERVER pillGreen = bot running. Red = offline. Orange = backup RPC in use. Hover for active RPC URL.
Logs buttonOpens a scrollable panel showing live terminal output

Price Ticker

Scrolling bar below header showing live prices for PLS and all active pairs with 1h, 24h, 7d % changes and direction arrows. Click any token to jump to its pair page.

Navigation Tabs

TabWhat it shows
⊞ ALL PAIRSOverview: all pair cards, combined P&L, portfolio chart, recent trade feed
Token tabs (HEX, PLSX…)Individual token detail page with grid levels and chart
◀ ▶ arrowsScroll tabs when too many to fit
OVERVIEW / SUMMARY / WALLET / METERS / P&LSub-tabs on the all-pairs view for different data layouts

All Pairs Overview

Token Page

Click any pair tab to open its detail page. Left column: grid level cards + trade log. Right column: OHLC candlestick chart + stats.

Grid Level Cards

ElementMeaning
L3 −1.96%Level number and % offset below seed price
● priceBuy trigger price. ● = WAITING, ⚡ = FILLED
+0.46% / −0.23%Current price vs this level's trigger (green = above, red = below)
→ 81.44Sell target price
tiers: ✓30% ●70%Partial tier status. ✓ = sold, ● = waiting
⚡ stuck 8.7hStuck reduction active with hours and current reduced target
FILL / WAIT badgeGreen FILL = above sell target. Orange FILL = below target. WAIT = buying not yet triggered.
💰 SELL L3 buttonManual sell bypasses all guards, sells immediately at market

Right Column Action Buttons

ButtonWhat it does
PauseStops new buys. Existing positions still managed and sold at targets. Click again to resume.
Sell AllImmediately sells ALL filled positions at market. Bot auto-reseeds after. Use to fully exit.
ReseedReseeds grid at current price without selling. Use when price moved far from seed with no filled levels.
CalibrateForces immediate ~3-minute recalibration. Grid reseeds with fresh ATR/liquidity measurements.
Auto-TuneOpens live override panel to view and adjust calibrated parameters.

Right Column Position Stats

StatMeaning
Token HeldTotal tokens across all filled levels
Avg EntryVolume-weighted average buy price and % vs current
Budget LeftUnspent PLS of total budget
Realised PnLTotal confirmed profit from all completed sells
CyclesFull grid cycles completed one cycle = all levels filled and sold
Today TradesBuy + sell count since midnight
Gas / MonthEstimated monthly gas cost at current trade frequency

Water-Level Cards

The animated pair cards on the overview visually represent position profit/loss status:

Terminal Display

The bot renders a live terminal display in the console window. Useful when running on a VPS via SSH or for text-only monitoring.

Header Strip

💎 PULSEXBOT CORE   PULSECHAIN 369   7 PAIRS             time 14:39:21   P&L +12,990,124 PLS   WALLET 14,530,000 PLS  $97
RPC ● rpc.pulsechain.com  latency 21ms  fails 0/3                          backup: rpc-pulsechain.g4mm4.io
LICENSE  ✓ LICENSED  7 slots active  · 70,000 PXB held       10,000 PXB = 1 slot · add more to unlock extra pairs
PAIRS ● HEX ◀ PROCESSING | ● USDC | ● EHEX | ● WETH | ● PDAI | ● WBTC | ● PLSX

License Row States

StateDisplay
LicensedLICENSE ✓ LICENSED 7 slots active · 70,000 PXB held
Grace periodLICENSE ⚠ GRACE PERIOD 19h remaining
Soft stopLICENSE ✗ SOFT STOP BUYS PAUSED no PXB held

Per-Pair Summary Table

ColumnMeaning
● PAIRGreen dot = healthy. Symbol and current mode (GRID / DCA / STUCK / PAUSED)
PRICE ▲/▼Current price and 1h direction arrow
avg (±X%)Volume-weighted avg entry and % vs current. Red = underwater.
✓ LIQ $XPool liquidity check green tick = above MIN_LIQUIDITY_USD
PnL ±X PLSLifetime realised PnL for this pair
B/STotal lifetime buys / sells
cycCycles completed

License System

PulseXBot uses the PXB token for licensing. Slots are unlocked by holding PXB tokens in the bot's wallet. License checks happen on startup and every 6 hours no internet license server, no user accounts. Pure on-chain verification.

10,000 PXB is required from the very first run. There is no free trial. The bot will calibrate but won't place any buys without PXB. Buy PXB, click Recheck in the dashboard, and trading starts immediately.

🚨

Do NOT edit the .lic file. It's cryptographically signed with your wallet address. Editing any field breaks the signature and triggers an immediate soft stop. Delete the file and restart to regenerate it if needed.

Buying PXB Tokens

There are two ways to buy PXB. Both swap PLS for PXB — the difference is where the transaction is constructed.

Option A — Built-in Buy PXB button (easiest)

Click the Buy PXB button in the PulseXBot dashboard. The bot constructs and signs the swap directly from your trading wallet. No browser extension, no MetaMask, no copy-paste. Requires the bot to be running and PLS already in your wallet.

Option B — PulseX DEX (if bot is not yet running)

Go to PulseX, connect your wallet, and swap PLS for PXB manually. Use the link below or navigate to PulseX and paste the contract address into the "To" field:

https://pulsex.mypinata.cloud/ipfs/bafybeicn3lj4oandfaufxsjgu6hevu4gyp5dhxpbajurglrsrlsbv7jipi/#/

PXB contract: 0x24698062D05D4E38190751B4708111Ff3a3ea65C

Once tokens land in your trading wallet, click Recheck in the dashboard. New slots activate within seconds.

PXB must be held in the same wallet as your .env private key. PXB in a different wallet is not counted.

Slots Explained

Slots are calculated as floor(PXB balance / 10,000) there is no cap. Slots update live every 6 hours and on every restart.

PXB heldSlotsActive pairs
10,000 PXB11 pair forever while holding
30,000 PXB33 pairs
70,000 PXB77 pairs (typical full setup)
N × 10,000 PXBNN pairs no upper limit

Pairs beyond your slot count show 🔒 Slot Required in the dashboard and don't trade until more PXB is added.

If PXB balance drops (you sell some PXB), the pair with the highest config position loses its slot first. Buys pause but existing positions are still managed and sold normally.


Log Files

The bot creates a session log in the bot folder and a dedicated log folder per trading pair. All files are created automatically no configuration needed.

Session Log (Bot Folder)

Every start creates a timestamped session log: session-2026-07-24_14-44-43.log. Captures every line of terminal output with timestamps. Auto-pruned after 14 days on startup the complete record for that run.

Per-Pair Log Folder (SYMBOL-grid-logs/)

Each pair gets its own log folder, e.g. hex-grid-logs/. Files inside it:

FileContentsRotates atBest for
trades.logFull timestamped log: buys, sells, regime changes, auto-tune events, warnings, errors5 MBComplete history and debugging
errors.logWARN and ERR entries only filtered from trades.log1 MBFirst file to check when something seems wrong
trades.csvEvery confirmed buy/sell. Columns: time, type, price, token_amount, pls_amount, level, gas_pls, net_pnl_pls, total_gas_pls5 MBTax records, spreadsheet analysis, import to Excel
daily-summary.logWritten at midnight: buys, sells, PnL, gas, best/worst trade, cycles completed, regime breakdown2 MBDaily performance check
weekly-summary.logWritten every Monday: same as daily but for the full 7-day week1 MBWeekly performance review
cycle-history.logOne entry per completed cycle: cycle number, seed price, exit price, PnL, duration, buy/sell count2 MBLong-term performance trends across many cycles
auto-tune.csvOne row per calibration run. Columns: timestamp, profile, volPct, liquidityUSD, levelCount, offsets, sellTiers, trailTrigger, trailDist, slippage, cooldownSec, reservePLS, deepDcaPct, deepDcaOffsets, deepDcaRsi, manualOverridesNeverReviewing how the bot calibrated over time
candles-YYYY-MM.jsonlEvery completed 5-minute OHLC candle as a JSON line. New file each calendar month (e.g. hex-candles-2026-07.jsonl). Used only by the dashboard OHLC chart not used for trading decisions.Monthly new fileDashboard chart history provides historical candlestick data going back as far as files exist

Log rotation: when a log file reaches its size limit it is renamed with a timestamp suffix (e.g. trades.log.2026-07-24.1) and a fresh file starts. The bot continues without interruption. Rotated files accumulate delete old ones manually if disk space is a concern.

candles-YYYY-MM.jsonl How It Works

Each line is one completed 5-minute candle in JSON:

{"t":1753401600000,"o":182.41,"h":182.94,"l":182.37,"c":182.71,"v":1603}

Fields: t = timestamp (ms), o/h/l/c = open/high/low/close in PLS, v = volume. The dashboard /api/candles endpoint reads all monthly files when you open the chart which is why chart history survives restarts and goes back months.

💡

Important: the bot's live trading decisions (ATR, RSI, regime detection, freefall guard) all use an in-memory candle buffer only never the JSONL files. After a restart the buffer starts at zero and rebuilds candle by candle in real time. The dashboard shows ⏳ ATR warming X/21 candles until the buffer has enough data (~1.5–2 hours). Candle files are write-only from the bot's perspective.

State Backups (state-backups/)

State files are backed up into a state-backups/ folder. Three independent tiers confirmed from bot code:

File patternWhen writtenSlots keptCoverage
{pair}-grid-state.startup.jsonEvery restart, before trading begins1 (overwritten each restart)Most recent pre-run state
{pair}-grid-state.hourly.N.jsonEvery hour while running (N = 0–11)12 rotating slots12 hours of hourly history
{pair}-grid-state.daily.N.jsonOnce per day at midnight (N = 0–6)7 rotating slots7 days of daily history
💡

Recovery order: try startup.json first (most recent good state). If corrupted, try hourly slots hourly.0hourly.11 (most recent hourly first). If all fail, try daily slots daily.0daily.6. Copy the chosen file over the live {pair}-grid-state.json then restart.


Security Checklist

🚨

Your .env file contains your private key. Anyone with this key has full control of your wallet. Protect it like a password.


Tips Capital Sizing

Per-pair TOTAL_PLS is the budget the bot can spend on that pair. Your wallet must hold at least:

min wallet = SUM(TOTAL_PLS across all pairs) + SUM(RESERVE_PLS per pair) + ~5,000 PLS gas

With auto-tune defaults at BALANCED, RESERVE is ~200K PLS per pair. So 7 pairs × 10M PLS = 70M for grids, plus 1.4M reserve, plus gas buffer ≈ 72M minimum wallet.

💡

Under-funding doesn't break anything it means a buy might block because the wallet is below RESERVE_PLS. The bot shows a warning and retries when balance improves. But if multiple pairs want to buy simultaneously, having exactly the minimum might cause some to skip a fill.

Tips Choosing Pairs

Grid bots make money on volatility within a range. Best pairs share these characteristics:

The bot has no "this token is bad, don't buy" logic. If you configure a pair and the token trends to zero, the bot will keep buying all the way down. Token selection is entirely your responsibility.

Tips Running on VPS

For 24/7 unattended operation, a low-cost VPS is ideal. The bot uses ~150 MB RAM per pair.

🚨

Do NOT expose port 5555 directly to the public internet. The dashboard has no authentication and includes Sell-All, Pause, and Reseed buttons. Anyone who can reach it can drain your positions.

Recovery from State Mismatch

If a pair shows STATE MISMATCH on the dashboard, the state file and wallet don't agree on token balance. Follow these steps:

  1. 1
    Stop the bot

    Close the bot window or Ctrl+C. Wait for the graceful shutdown message before proceeding.

  2. 2
    Inspect the state file

    Open {pair}-grid-state.json in any text editor. Compare tokenBalance (wallet) against totalTokens (state's expected total) to understand the gap.

  3. 3
    Check the backup folder

    Look in state-backups/ for {pair}-grid-state.startup.json first (taken right before the last restart). If that looks corrupted, try the hourly or daily slots.

  4. 4
    Restore the backup

    Copy the chosen backup over the live state file, renaming it to {pair}-grid-state.json. Keep a copy of the corrupt file before overwriting.

  5. 5
    Restart and verify

    Start the bot. The self-check should pass. If still mismatched, try an older daily backup. If all backups fail, use the Manual Recovery option: clear the state file completely, let the bot treat the pair as fresh, then manually reconcile your token balances.

Tips Running on Linux 24/7

Using screen (recommended)

screen -S pulsexbot          # create named session
./Start-PulseXBot.sh         # start the bot inside it
# Press Ctrl+A then D        # detach  bot keeps running
screen -r pulsexbot          # reattach later to check
screen -ls                   # list all sessions

Using nohup

nohup ./Start-PulseXBot.sh > /dev/null 2>&1 &
ps aux | grep PulseXBot      # verify it's running

Auto-restart on crash (systemd service)

# /etc/systemd/system/pulsexbot.service
[Unit]
Description=PulseXBot Trading Bot
After=network.target

[Service]
User=yourusername
WorkingDirectory=/home/yourusername/PulseXBot
ExecStart=/home/yourusername/PulseXBot/PulseXBot
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

# sudo systemctl enable pulsexbot
# sudo systemctl start pulsexbot
# sudo journalctl -u pulsexbot -f   ← live logs
💡

Access the dashboard from your home machine via SSH tunnel: ssh -L 5555:localhost:5555 user@your-vps-ip then open http://localhost:5555 locally. The dashboard stays private and your tunnel encrypts all traffic.


Telegram Alerts

PulseXBot sends real-time alerts to Telegram buys, sells, trail activations, low balance, daily summaries. No extra packages needed.

Setup

  1. Open Telegram → search @BotFather → send /newbot → copy the BOT_TOKEN
  2. Search @userinfobot → send any message → copy your CHAT_ID
  3. Open corebot-config.js → fill in the TELEGRAM section
  4. Restart the bot → startup message arrives immediately
TELEGRAM: {
  BOT_TOKEN: "7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxx",   // from @BotFather
  CHAT_ID:   "123456789",                                // from @userinfobot
  BOT_NAME:  "DevBot",   // shown at top of every alert  use different names per instance
  ALERTS: {
    buys:          true,
    sells:         true,
    trailActive:   true,
    lowBalance:    true,
    rpcFailover:   true,
    stuckLevels:   false,
    botLifecycle:  true,
    dailySummary:  true,
  },
}
💡

Running multiple bots? Set a different BOT_NAME for each instance e.g. "DevBot", "RpcBot". Every Telegram message shows this name so you always know which instance sent it.

Never paste your BOT_TOKEN in screenshots, Telegram chats, or Discord. Anyone with it can send messages through your bot and potentially read alerts. If exposed, revoke via @BotFather → /mybots → select your bot → API TokenRevoke current token.

Alert Types

AlertToggleWhat it shows
🟢 BUY FILLEDbuysPair, level, PLS spent, tokens received, fill price, sell target, TX link
🔴 30% FIXED SELLsellsPLS received, net P&L, %, USD, gas, hold time, all-time P&L, TX link
🎯 70% TRAIL SELLsellsSame as fixed sell
🎯 TRAIL STOP FIREDtrailActiveExit price, peak price, drop % from peak, gain vs entry, hold time
🟡 TRAIL ACTIVEtrailActiveTrail just armed unrealised P&L, current price, stop level
🎉 CYCLE COMPLETEsellsCycle P&L + USD, duration, all-time P&L, today P&L
🚧 SELL BLOCKEDsellsLoss guard blocked a sell max once/hour per level
⏳ LEVEL STUCKstuckLevelsStuck reduction started buy price, hold time, target ramp
⚠️ LOW BALANCElowBalanceWallet too low for next level buy
🔄 RPC SWITCHEDrpcFailoverPrimary failed, switched to backup RPC
🔼 GRID AUTO-SHIFTEDbotLifecycleGrid recentred shows new seed price
✅ BOT STARTEDbotLifecycleAll pairs, PLS allocations, profiles, license status and slot count
🛑 BOT STOPPEDbotLifecycleShutdown signal received
📊 DAILY SUMMARYdailySummaryToday P&L, sells/buys/cycles, best sell, all-time P&L, win rate. Fires at midnight per pair.
⛽ DAILY GAS REPORTdailySummaryCombined cross-pair gas: per-pair gas + net P&L, total gas in PLS and USD

Updating the Bot

New versions ship as updated zip files on pulsexbot.com. State files are forward-compatible your positions and history survive.

  1. 1
    Back up state files

    Copy all *-grid-state.json files and the state-backups/ folder. Daily backups already happen automatically, but a manual backup before a major update is good practice.

  2. 2
    Stop the bot

    Close the window or Ctrl+C. Wait for graceful shutdown.

  3. 3
    Download the new version

    Get the latest zip for your platform from pulsexbot.com.

  4. 4
    Replace the bot binary only

    Copy PulseXBot.exe (Windows) or PulseXBot (Mac/Linux) into your existing folder. Do not replace your .env, corebot-config.js, state files, or logs.

  5. 5
    Restart

    Start normally. The new version number appears in the terminal header. Positions and history are intact.

💡

Check the pulsexbot.com changelog before updating some releases add new config fields you may want to set for the best behaviour. The bot always runs safely with old config (new fields default to AUTO or false).


Troubleshooting

"FATAL: PRIVATE_KEY not found in .env file"

Your .env file is missing, misnamed, or the PRIVATE_KEY line is empty. Check: the file is named exactly .env (no other extension), it's in the same folder as the binary, and the value is your 64-character hex key or an ENC:... encrypted value.

"FATAL: Private key is encrypted but could not be decrypted"

Your .env has an ENC:... value but the .mk file is missing or from a different machine. Fix: delete the ENC:... value in .env and paste your raw private key the bot re-encrypts on next start.

Dashboard shows "connecting…" / no data

Make sure the bot terminal window is still open and running. Try Ctrl+Shift+R to hard refresh the browser. Try http://127.0.0.1:5555 instead of localhost. Check that PORT in config matches the URL.

"execution reverted" errors in the log

Slippage is too tight. Increase SLIPPAGE_PERCENT by 0.5 for that pair and restart. Also check pool liquidity on dexscreener.com/pulsechain.

Bot shows "SOFT STOP" badge

No PXB detected in wallet. Click Buy PXB in the dashboard (easiest — bot swaps directly from your wallet), or buy manually on PulseX DEX at PulseX DEX using PXB contract: 0x24698062D05D4E38190751B4708111Ff3a3ea65C. Then click Recheck.

"LICENSE FILE TAMPERED" in terminal

The .lic file was edited its signature no longer matches your wallet. Fix: delete the .lic file and restart with 10,000+ PXB in wallet. The bot regenerates the file on startup.

Trail stop fired but sell was blocked by loss guard

The estimated net (after slippage and gas) is below SELL_MIN_PROFIT_PCT. The trail holds and retries every tick. Dashboard shows "Loss guard: est net −X% < 0.30% floor". If price recovers enough, it executes. To exit immediately, use the manual SELL button manual sells bypass all guards.

"pre-buy quote shows X% slippage skipping"

The DEX quote was 3%+ worse than last price. Usually means thin liquidity or a fast move. Bot retries next tick automatically. If it repeats, check pool depth or increase SLIPPAGE_PERCENT.

🔒 Slot Required on a pair

That pair needs a PXB slot. Buy more PXB via the Buy PXB button in the dashboard, or on PulseX DEX (10,000 PXB per additional pair). Click Recheck after buying.

"Insufficient wallet balance skipping buy"

Wallet is at or below RESERVE_PLS. Top up wallet with more PLS, or reduce RESERVE_PLS. The dashboard shows a low-balance warning banner.

RPC errors / timeouts

Bot auto-switches to backup RPC. If errors persist, try a different primary endpoint from the list in .env Setup →.

macOS: "cannot be opened unidentified developer"

Run ./Start-PulseXBot.sh it removes the quarantine flag automatically. Or right-click PulseXBot → Open → confirm in the dialog. One-time only.

Linux: "Permission denied"

Run chmod +x PulseXBot then try again. Or use Start-PulseXBot.sh which sets permissions automatically.


FAQ

Will the bot ever sell at a loss?

No, by default. The strict-zero loss guard blocks any auto-sell whose net result (after gas and slippage) is below cost. Stuck-reduction lowers targets down to +1.5%, but the loss guard provides the hard floor. Manual sells via the dashboard bypass all guards.

What happens if PulseChain RPC goes down?

Bot switches to backup RPC automatically and keeps trading. It polls the primary every 5 minutes and switches back when healthy. You get a Telegram alert if rpcFailover is enabled.

What if the bot crashes mid-trade?

State is persisted to disk on every change. On restart, the bot loads the last state and resumes. The startup self-check verifies wallet balance matches state if there's a mismatch, the pair pauses for manual review rather than trading on stale data.

Can I run multiple instances on the same wallet?

No. Two instances race on swap nonces and corrupt each other's state. Run one bot per wallet. For more pairs than your current slot count allows, use a second wallet with its own PXB allocation.

Can the bot lose tokens?

Tokens never leave the wallet except via swaps the bot legitimately initiates. Even if the state file is corrupted, tokens stay on-chain. The seedGrid preservation system tracks positions through every reseed and recalibration.

What happens during the 24h auto-tune recalibration?

Trading pauses for ~3 minutes while the bot samples price and recomputes AUTO parameters. Existing filled levels are preserved across the recalibration they reattach to the new grid by closest-trigger-price match. You'll see ↪ Reattached preserved fill: L1 @ ... in the log.

How do I update the bot?

Stop the bot, replace only the binary (not your .env, config, or state files), restart. State files are forward-compatible positions and history survive. See Updating → for full steps.

What does "stuck X.Xh target reduced to +1.50%" mean?

That level has been filled for X hours without selling. The stuck-reduction system has lowered the sell target. It sells when price reaches the reduced target, or when the trail fires.

Why does a SELL show "gas: 312 PLS (sell 200 + buy 112)"?

The full cost-of-trade includes both the sell gas AND the original buy's gas. T1 sells charge the full buy gas; T2 shows "buy 0" because T1 already paid it. This prevents double-counting.

What is the difference between Pause and Sell All?

Pause stops new buys but keeps managing existing positions they still sell at their targets. Sell All immediately exits all filled positions at market and reseeds. Use Pause to stop accumulating. Use Sell All to fully exit.

What does CALIBRATE do vs AUTO-TUNE?

CALIBRATE forces a fresh 3-minute calibration that re-measures ATR and liquidity, then reseeds the grid. AUTO-TUNE opens a panel to view and override individual parameters without triggering a full recalibration.

Why does Deep-DCA never activate?

All three conditions must fire simultaneously: all main levels filled + TREND_DOWN/DCA regime + RSI below DEEP_DCA_RSI_MAX. If RSI never gets oversold enough, use Stuck Deploy it bypasses the RSI gate after STUCK_DEPLOY_HOURS. Or increase DEEP_DCA_RSI_MAX directly.

Can I trade the same token on two different pairs?

No each SYMBOL must be unique. Running two EHEX pairs would cause state and accounting conflicts. One token = one pair config.

My trail fired and sold but the level card still shows FILL?

With partial tiers (30%/70%), the card shows FILL until ALL tiers complete. After T1 (30%) sells, it shows ✓30% ●70% still FILL because 70% is still open. It resets to WAIT only after the final tier sells.

What is the 60-second TX deadline?

Every swap has a 60-second on-chain expiry. If not mined in time, it reverts automatically it can never execute at a stale price. The bot retries on the next tick. This protects against sandwich attacks and mempool congestion.

Is there a maximum number of pairs?

No hard cap. Slots = floor(PXB / 10,000) with no upper limit. Each pair uses ~150 MB RAM your machine's resources are the practical limit.

What does "⚠ L3 stuck CLOSED with no tokens recycling to WAITING" mean?

The bot found a level in CLOSED status but hadn't finished recycling usually from an unexpected shutdown. The startup repair caught and fixed it automatically. No action needed.

Why does the low balance alert disappear even though my wallet is low?

If all main levels are filled, low wallet balance is expected all capital is deployed. The bot suppresses the alert to avoid false alarms. It only fires when a level is genuinely waiting to buy but can't afford to.

What does "1 buy · 1 sell" in the trade log header mean?

Today's confirmed transaction count since midnight. A partial tier sell (T1 30%) counts as one sell. A T2 trail sell counts as another. A full cycle = at least N buys + 2N sells (T1 + T2 for each of N levels).