Back to all projects
In Progress v6.0|Jun 8, 2026 |Data & Modeling

Padre Trenches — Automated Detection, Alerts & Trading

An end-to-end pipeline that watches a live trading site for freshly migrated Solana tokens, alerts my phone the instant one appears, logs every token's 30-minute outcome to a spreadsheet, and — when I let it — places the trade for me in a real browser with take-profit and stop-loss already set. Everything it collects feeds a data dashboard I built to hunt for a genuine edge.

JavaScriptPythonPlaywrightFlaskAPIsAutomationData AnalysisFinance
The Padre Outcome Analytics dashboard showing win rate, expectancy, equity curve, and signal filters

01The Idea

On Solana, brand-new tokens "migrate" from their launchpad onto a real exchange the moment they hit a certain market cap. That migration is the starting gun — it's the first time the token is openly tradeable, and the next thirty minutes are where almost all of the price action (good and bad) happens. The site I watch, trade.padre.gg, surfaces these migrations in a live "Migrated" column, but they scroll past in seconds and there are hundreds of them a day. No human can sit there refreshing a screen fast enough to catch the right ones, pull up the metrics, judge them, and place a trade before the move is over.

So I built something that never blinks. The goal was a single pipeline that could do four things with zero human input: detect every qualifying token the instant it migrates, alert me with all the relevant metrics, log what actually happened to each one over the following 30 minutes, and trade it automatically with pre-set exits. The fourth piece only works because of the third — I can't trade an edge I haven't measured, so before risking a dollar I spent most of my effort turning thousands of these migrations into clean data and then mining it for a pattern worth acting on.

02How It All Connects

The system is three programs that hand off to each other. A browser userscript does the watching; two local Python servers do the heavy lifting. Keeping them separate was deliberate — if the logger or the trader crashes, the alerts keep firing, and if I want to trade manually I just leave the trading server off. Here's the whole flow at a glance:

  1. A Tampermonkey userscript runs inside my browser on trade.padre.gg, watching the page for new migrated tokens that match my filters. When one appears, it scrapes every metric off the card and fans that data out to three places at once.
  2. Telegram gets a formatted alert on my phone — market cap, volume, holders, safety stats, and a one-tap link to open the token.
  3. A logger server (padre_logger.py) records the token, waits 30 minutes, then pulls its price history from an API and writes the full outcome into a spreadsheet.
  4. A trading server (padre_trader.py) drives a real Chromium browser to open the token and place a buy order with take-profit and stop-loss attached.

All of the inter-process traffic is plain JSON over localhost — the userscript fires the same payload at 127.0.0.1:8765 (logger) and 127.0.0.1:8766 (trader). Nothing leaves my machine except the Telegram message and the API calls. You can see the userscript running below: its console prints every detection, send, and hand-off in real time.

trade.padre.gg open with the Tampermonkey menu and the userscript console logging its activity
Fig. 1The userscript running live, logging every detection and hand-off to the console.

03The Detection Engine

The hardest part of the whole project turned out to be the simplest-sounding: reliably noticing when a new token shows up. The site is a heavy React app — the migrated tokens render as absolutely-positioned cards inside a virtualized scroll column, with no stable IDs and class names that change on every redeploy. I couldn't just query a tidy list. So the userscript locates the "Migrated" column by its header text, then watches it two ways at once: a MutationObserver fires almost instantly whenever the DOM changes, backed up by a 500 ms poll in case a mutation slips through. That belt-and-suspenders approach is what gets the alert out within a second of migration, which matters — the data later proved that tokens caught more than ~15 seconds late measurably underperform.

Once a card is spotted, the script reads its raw text and parses out every metric with a set of position-aware regexes — market cap, volume, fees, total and "pro" holders, the migrated/created ratio, top-holder %, sniper and insider percentages, dev age, creator handle and follower count, token age, and views. It also has to recover the token's real link, which the site hides behind React click handlers rather than plain <a> tags — so the script walks the React fiber tree and, as a last resort, temporarily hijacks window.open to capture the URL the card would have opened. A rolling 24-hour dedupe cache (persisted with GM_setValue) makes sure I never get alerted twice for the same token.

The Tampermonkey editor showing the userscript's dedupe cache and Telegram sending functions
Fig. 2Part of the v6.0 userscript — the dedupe cache and the rate-limit-aware Telegram sender.

Filters live right in the script's config, so I can tighten what counts as "worth alerting" without touching the detection logic. A token has to clear every active filter — minimum market cap, minimum holders, maximum insider %, and so on — before it's allowed through. The thresholds I actually use came out of the data analysis further down this page, not out of a hunch.

filters: {
  minMcap: 0,        maxMcap: 27000,    // clean migration cap, un-pumped
  minVolume: 0,      minViews: 0,
  minTotalHolders: 0, maxTop10Pct: 0,
  minProHolders: 0,  maxInsidersPct: 0,
  maxAge: 0          // 0 = disabled
}

04Telegram Alerts

The alert itself goes out through the Telegram Bot API. The script POSTs a formatted HTML message to my bot, which lands in a private chat on my phone a second or two after the token migrates. I built in a stagger between sends and a retry that respects Telegram's 429 rate-limit response — during a busy minute a dozen tokens can migrate at once, and without queuing them the API just drops the overflow.

Each message is laid out so I can judge a token at a glance without opening anything: the name and ticker up top, then a Metrics block (market cap, volume, current fees in SOL, total and pro holders, migrated/created), a Safety block (top-holder concentration, dev age, snipers, insiders, and the creator's handle and following), and finally the token's age, view count, and a tappable "Open on Padre" link. If I'm watching, I can act on it manually; if I'm not, the automation has already handled it.

Telegram conversation showing formatted new migrated token alerts with metrics and safety stats
Fig. 3The alerts as they arrive — everything I need to size up a token in one message.

05The Outcome Logger

An alert tells me a token migrated; it doesn't tell me whether buying it would have made money. That's the logger's job. padre_logger.py is a small Flask server that receives the same payload the Telegram alert was built from, writes down everything known at alert time, and then sets a 30-minute timer on that token. The pending list is saved to disk, so even if I restart the server it picks up every token still inside its window.

When the timer fires, the server resolves the token's real mint address through DexScreener, then pulls one-minute OHLCV candles for that exact mint from the Birdeye API over the [alert, alert + 30min] window. I went with Birdeye specifically because it covers a token from its very first trade — the other candle source I tried back-fills fresh pump tokens with a long delay, so right at migration (exactly when I need it) its history was nearly empty. From those candles it computes the entry, the peak, the lowest wick, and the end-of-window price, converts each to a market cap, and writes a single tidy row per token into padre_results.xlsx — over fifty columns covering every metric and every outcome. If the spreadsheet happens to be open in Excel, it retries and then falls back to a CSV so a row is never lost.

PowerShell window running padre_logger.py with Birdeye, logging alerts and results
Fig. 4The logger server, scheduling and writing 30-minute outcomes.
The padre_results.xlsx spreadsheet filled with logged token rows and metrics
Fig. 5The dataset it builds — every metric beside its real outcome.

Note: the Birdeye API key lives in a private config.py that never leaves my machine — it's read from there (or an environment variable), never hard-coded into the logger.

06Autonomous Trading

The third program is the one that actually risks money, so it's also the one I built the most safety valves into. padre_trader.py is an aiohttp server that, on startup, launches a real Chromium browser through Playwright using a persistent profile — meaning my Padre account and crypto wallet are already logged in and ready. When an alert comes in and trading is enabled, the script opens a fresh tab on that token's page, waits for the order form to render, types in my pre-set USDC amount, and clicks Buy. After the transaction settles it scrapes the "Trades" tab — filtered to "Mine" so it can't accidentally read someone else's fill — to capture the exact market cap I entered at, then logs the whole trade to its own spreadsheet for comparison against the logger's data.

The automated Chromium browser open on a token page on trade.padre.gg with the buy panel and exit strategy visible
Fig. 6The browser the script drives — order amount and TP/SL exits set automatically before it clicks Buy.

I never want this thing running without a kill switch I can reach instantly, so the server exposes a /toggle endpoint. Hitting 127.0.0.1:8766/toggle in any browser flips autonomous trading on or off mid-session — the alerts and logging keep running regardless, but no orders get placed while it's off. It's the difference between "collect data today" and "trade the edge today," and it's one click away.

A browser showing the toggle endpoint reading Autonomous trading is now ENABLED
Fig. 7The one-click kill switch for autonomous trading.

07Smarter Orders

The first version of the trader fired plain market buys. That works, but it leaves money on the table: these tokens almost always wick down hard in the first minute, so paying the migration price is rarely the best entry. The advanced version, padre_trader_adv.py, switches the order type to a "Buy Dip" limit that only fills if the price drops to a configured percentage below current — letting me buy the inevitable dip instead of the spike. Each order goes in with take-profit and stop-loss levels attached, both pulled straight from the analysis below.

A limit order that never fills is its own problem, though — it just sits there tying up capital while the opportunity passes. So the script waits a configurable window (30 seconds by default) and then checks the open-orders grid: if the buy is still unfilled it cancels it, computes roughly what fraction filled, and records the outcome as filled, partially filled, or cancelled. Getting that cancel logic right was fiddly in the best way — it has to identify the correct token's buy row in a virtualized data grid and cancel only that, never touching the take-profit or stop-loss exit orders sitting in the same table. It even detects Padre's "limit can't be higher than current price" rejection and bails out cleanly instead of mis-logging it. Those are exactly the edge cases that separate a script that demos well from one I'll actually leave running with real money.

PowerShell window running padre_trader.py, launching trade sequences through Playwright
Fig. 8The trading server working through a live execution sequence.

08Making Sense of the Data

With the logger quietly cataloguing thousands of migrations, I finally had something most people trading these tokens never bother to get: a clean record of what every metric at alert time was worth. A first pass came from a Python analyzer (analyze.py) that splits winners from losers, correlates each metric with the outcome, and reports the win rate inside each quartile of every metric — the quickest way to spot a threshold worth using. The matplotlib panels below are from that work: the distribution of peak multiples, hit rate by feature quartile, an expected-value heatmap across take-profit/stop-loss combinations, and the cumulative P/L of the best filter versus trading everything.

Four matplotlib charts analyzing the token dataset: peak multiple histogram, hit rate by quartile, EV heatmap, and cumulative P/L
Fig. 9The statistical view — distribution, quartile hit rates, the TP/SL EV surface, and the equity curves.

Reading static charts only gets you so far, though, so I built a self-contained interactive dashboard to actually play with the data. It loads the exported spreadsheet entirely in the browser — nothing is uploaded anywhere — and turns every token into a simulated trade. I set a take-profit and stop-loss at the top, set minimum and maximum bounds on any combination of signals, and the whole page recomputes live: win rate, expectancy per trade, total P/L, profit factor, the winner/loser split, an equity curve, quartile breakdowns, and a scatter explorer I can box-select to read the win rate of any cluster. There's even a threshold finder that scans each signal for the single cutoff that most improves expectancy and lets me stack it onto the filter set with a click.

The Padre Outcome Analytics dashboard with TP/SL sliders, signal filter inputs, backtest KPIs, equity curve and winner/loser donut
Fig. 10The interactive dashboard I built to tune filters and TP/SL levels and watch the economics move in real time.

09What the Data Says

Here's the honest headline: the market is mostly noise — but not entirely. A cross-validated machine-learning model over all the metrics I collect only reaches an AUC of about 0.56 for predicting whether a token doubles (0.50 is a coin flip). In plain terms, roughly 85% of the outcome is simply unpredictable from anything knowable at alert time. No metric tells me which token will run. What the thin remaining signal does do is let me throw out a tranche of near-certain losers, and in a payoff structure this lopsided, that's enough.

The signal, in one sentence: tokens that migrate "quietly" outperform tokens that migrate "hot." Low creator fees, low volume at alert, few "pro" holders, low views, and a low entry market cap all individually predict better peak multiples — and they're all really measuring the same thing, which is how much bot and insider attention a token already attracted before it migrated. Tokens that arrive already pumped above the clean ~$27K migration cap, generating heavy fees with a wallet base full of pro traders, have usually already been distributed; the upside got harvested before I could ever enter.

Unfiltered, this is a structurally losing game if you hold to the end of the window — the median token is down 46% after 30 minutes and only about 31% finish above where they started. The entire strategy is selling into the early spike, which is exactly why the automated take-profit and stop-loss matter so much. My best validated filter — entry market cap ≤ $27K, pro-holder ratio ≤ 0.70, and total holders ≤ 250 — selects about 17% of migrations and lifts the chance of hitting 2x within 30 minutes from a 30% baseline to roughly 48%. Paired with a 3x take-profit and a 40% stop, that worked out to a positive expected value on every one of the five days tested and on the held-out portion of the data.

The discipline the data screams, regardless of setup: never hold past the 30-minute window without an exit, keep stops wide (35–45%, not tight — these tokens routinely wick 30–50% before a real run), and take many small equal-sized positions, because the top 10% of trades carry roughly half of all the profit. Skip the wrong days and the edge disappears.

I want to be clear-eyed about what this is. Five days of data is one market regime, memecoin metas rotate weekly, and any filter tuned to this slice will decay — so the dashboard exists precisely so I can re-run the analysis on fresh data and treat the direction of the signal (avoid the pre-pumped, bot-saturated migrations) as far more durable than the exact thresholds. It's a real, measured, repeatedly-validated edge, and it's also a thin one sitting on top of a lot of noise. Both of those things are true, and pretending otherwise is how people lose money here.

10Status & Next Steps

The detection, alerting, logging, trading, and analysis pieces all work and run together today — the userscript is on v6.0 and the data pipeline has catalogued well over a thousand migrations so far. I'm keeping this one marked In Progress because the most important work is ongoing by design: re-validating the filter thresholds on rolling fresh data, since the one thing this market guarantees is that today's edge erodes.

A few specific improvements on my list:

  • Capture the timing of the window low. Right now the data records that a low happened but not when — which means when a token touches both my take-profit and stop-loss inside the window, the backtest can't be certain which filled first. Logging the timestamp of the low turns my current best/worst-case range into a single precise number.
  • Fix the entry-price capture. A handful of rows had junk first-tick prices from the candle source, so I rebuilt all the outcome math on the internally consistent market-cap series. Cleaning the price capture at the source restores those columns.
  • Model size-dependent slippage. My backtest assumes a flat 3% round-trip cost, but real slippage on a fresh pool depends on position size — the high-target setups hold up well, but I'd like the dashboard to account for it directly.
  • Test a partial-exit hybrid — selling most of a position at 2x and letting a runner ride to 3–4x — which sits between my two best TP/SL profiles but which this dataset can't yet backtest precisely.

This is a personal research and engineering project — a statistical analysis of a historical sample, not financial advice. Patterns in memecoin microstructure decay quickly, and capital deployed here can go to zero.