You've got a Solana wallet, an API key, and a bot you set up over the weekend. It made money on Monday, so you nudged the position size up. By Thursday it had given back more than that, and the log didn't say why. Two fills landed far from the quote, one transaction your client reported as failed went through anyway, and a token that looked busy went silent the moment your order hit the pool.
None of that was a strategy problem. It was a data and execution problem.
A crypto trading bot is a rule set that reads market data and sends orders through an API. The rule matters, but on Solana the costs around the rule decide whether you keep anything: swap fees, priority fees, slippage, failed transactions, and pools that were never liquid enough to trade. Add outright fraud, the kind that promises a fixed monthly return, and the arithmetic gets worse. I'd spend the first week proving that prices and fills are real and that the keys can't be drained, and only then tune a signal.
Pick a Strategy the Market Can Support
Most bot strategies get chosen the same way. Someone posts a screenshot of a grid bot up 18% in a month, and the reader copies the settings into their own account. The screenshot says nothing about whether the market that produced it will look the same next month.
The market picks the strategy, not the reverse. Each family of bot assumes one kind of price behaviour, and breaks in a predictable way when that assumption fails. Here's the comparison worth keeping on screen while you choose.

| Strategy | Best market | Main risk | Simple example |
|---|---|---|---|
| Grid bot | Sideways, range-bound price | Price breaks out of the grid and leaves positions losing | 10 buy and sell levels between two set prices |
| DCA bot | Long-term accumulation | Buying through a long, steady fall | Buy 20 USDC worth of SOL every 6 hours |
| Trend-following bot | Strong directional moves | Repeated false signals in choppy markets | Buy when the 20-period average crosses above the 50-period average |
| Arbitrage bot | Price gaps between venues | Gaps close in seconds and fees eat the profit | Buy SOL on one DEX and sell on another when the gap exceeds fees plus slippage |
| Market-making bot | Liquid pairs with steady volume | Inventory builds up when price moves fast | Quotes a buy and a sell order around the mid price |
The research record supports the boring, rule-based end of that table. A 2022 survey in Financial Innovation reviewed 146 cryptocurrency-trading studies and found that 102 of them, 69.86%, covered statistical or machine-learning methods. Inside that group, 88 papers (86.28%) focused on statistical methods and only 14 (13.72%) examined machine learning. Most working bots run on measurable signals, not autonomous AI.
Solana is where a lot of retail bot activity sits. In 2024, 87% of Telegram-based crypto trading-bot users focused on Solana tokens, against 8% for Ethereum and 4% for Base, according to Axiobench's bot statistics. That density cuts both ways: deeper liquidity in the pairs worth trading, and far more competition at machine speed.
Finish this sentence before you code. "I'm running a trend bot on SOL because I want directional exposure during strong moves." If you can't fill in the market condition, the goal and the strategy in one line, you own a bot with no thesis.
How to Set Up Your Crypto Trading Bot Step by Step
I'd build the simplest useful bot first: one that buys 20 USDC of SOL every 6 hours, with a hard ceiling of 200 USDC a day. It's dull, it exercises every part of the pipeline, and it breaks loudly when the plumbing is wrong.

Seven steps from rule to live order
- Write the rule in plain words. "Buy 20 USDC of SOL every 6 hours, never spend more than 200 USDC in a day." If the sentence needs a diagram, the code will drift from your intent within a week.
- Pick a feed that pushes. A WebSocket subscription on the SOL/USDC pool ticks several times a second. Polling a REST endpoint every few seconds means you price off data that was already old when it arrived, and stale prices produce fills you didn't budget for.
- Scope the API key to trading only. Withdrawals off, key restricted to your server's IP address, signing key stored outside the repo. A leaked key with withdrawal rights isn't a bug report, it's an empty wallet.
- Route execution and check the signature. Send swaps through an aggregator that returns a transaction signature. Solana Tracker's Raptor Swap API is a free hosted swap API that routes across 71 Solana DEXes, with an optional self-hostable binary. Swaps settle on-chain through decentralized protocols, so store each signature and confirm it in an explorer before the next order goes out.
- Set size, slippage and retries. Start with a 1% slippage cap and tighten to the 0.5% majors figure from the risk table once your fills come in close to the quote. Cap retries at two attempts. Skipping the cap is the most expensive shortcut in the whole build, because one thin-liquidity fill can cost more than a week of planned entries.
- Log every decision. Quote at decision time, chosen route, signature, intended amount, filled amount, fee paid. A flat file is fine. Without it, you have no way to audit a bad week.
- Run paper mode for a week. Real quotes, no capital. Compare the log against the chart. Most setup bugs surface in the first 48 hours, usually as duplicate sends after a timeout.
The slip that costs the most
A timeout is not a failure. It's an unknown. Before resending a buy, look up the signature from the first attempt, because the transaction may already have landed and the resend doubles your position in a pool that just moved against you.
Sanity check: every logged trade should show three numbers, the amount you intended, the amount you filled, and the fee. If any of the three is missing, the bot isn't ready for capital.
Verify Market Data Before the Bot Trades
Say a token shows up in the trending list with heavy volume and a wall of comments. Every rule in your bot says buy. Three checks should stop it before the order is built.
| Check | What to compare | Reject the trade when |
|---|---|---|
| Feed freshness | Latest price timestamp against the current time | No update for more than 5 seconds |
| Cross-venue price | Pool price against a quote from a second DEX | Gap above 3% that does not close within a minute |
| Volume against liquidity | 24-hour volume against pool depth | Volume far above depth with almost no price movement |
| Holder concentration | Largest wallets against total supply | One wallet holds more than 20% of supply |
| Token authority | Mint and freeze authority status | Either authority is still active |
| Trade history | Explorer signatures against dashboard PnL | Trades appear on the dashboard with no signature to open |
| Social and comment activity | Buyer and comment bursts against on-chain volume | Activity spikes with no matching on-chain volume |
Run the checks in this order
Freshness comes first, because every later check is meaningless on an old quote. Cross-venue price next: a 3% gap that doesn't close within a minute usually means one feed is stale or one pool is too thin to price accurately.
Then look at the token itself. Copycat mints, an active mint or freeze authority, and a single wallet holding more than 20% of supply are all reasons to skip, no matter what the chart looks like. Rugcheck scores tokens from 0 to 10 across more than 20 risk factors, including snipers, bundlers, insider wallets and authority status, which turns most of this into one number you can gate on.
Pull prices, trades, holders and risk scores from a single source rather than stitching three endpoints together, because mismatched timestamps between them create false confirmations. The Solana Tracker data API exposes tokens, wallets, trades, prices and risk scores from one indexed layer, so the freshness test applies to the whole picture instead of one field.
When price, volume and holder checks disagree, skip the trade and log the reason. A bot that refuses entries is doing its job.
How to Backtest Without Fooling Yourself
A backtest that looks too good usually is. Take a strategy earning 0.3% per trade before costs. Over 100 trades that's 30% gross. Charge 0.3% all-in per trade and you're at zero; charge a realistic 0.5% and you're down about 20%. Same signals, same chart, opposite conclusion.
The literature is blunt about this. Work on transaction costs in crypto backtests found that naive sign-based Bitcoin strategies turned unprofitable after only 10 basis points per trade, and that a filter trading only when the forecast exceeded the estimated cost restored profitability in selected configurations. Costs aren't a reporting line. They decide which signals you're allowed to take.
The rule I use: submit an order only when the predicted edge beats fees, spread and slippage by a safety margin. Thin margin means no trade.
Walk forward, don't fit the whole history
Split the history into sequential windows, tune parameters only inside each training window, then run the next window the bot has never seen. That's nested walk-forward validation, and an audit of six crypto factors on Binance USDT perpetuals shows what happens without it. Across 137 contracts from 2020 to 2024, a frictionless protocol inflated annualized Sharpe ratios by an average of 3.6 times. After walk-forward selection, explicit costs and a Deflated Sharpe Ratio adjustment, none of the six factors survived and four produced negative out-of-sample Sharpe ratios.
On Solana the squeeze is worse. Thin tokens carry large price impact and short histories, so a result that only works on one mint is not a result, it's a coincidence with a chart.
The checklist that kills weak strategies
- Report net, never gross. Fees, priority fees, spread and slippage come off the top before you look at the equity curve.
- Keep a final period untouched. If you peek at it while tuning, it's training data with extra steps.
- Test two regimes. A trending month and a choppy one. One regime proves nothing.
- Check more than one token. The edge should survive on something other than your favourite pair.
- Pre-register the parameter grid. Write the values down before the test, so you can't add a sixth variation until one wins.
Risk Filters That Stop Bad Trades Early
Set these before the first live order, not after the first bad day.
| Control | Starting value | Why it matters |
|---|---|---|
| Max position per trade | 2% of account | One bad trade cannot wipe out the account |
| Daily loss limit | 5% of account | Stops the bot for the rest of the day after losses |
| Slippage cap | 0.5% for majors, 1-2% for small tokens | Prevents a thin fill from costing far more than planned |
| Minimum pool depth | 10 times the order size | Avoids entering tokens you cannot exit |
| Stale-data pause | 5 seconds without a price update | Stops trading on old prices |
| Kill switch | Manual stop, plus auto-stop after 3 failed transactions | Limits repeated failures during outages |
Run it on a 1,000 USDC account. A 2% position cap is 20 USDC per trade, and the 5% daily limit is 50 USDC. Once that 50 is gone, the bot stops until a person clears it.
Why so tight on a chain this fast? Because activity on Solana launchpads can be manufactured at scale. A study of Solana meme-coin markets documents automated wash trading, creator-address obfuscation, coordinated selling and copycat tokens, and reports that wash-trading bots nearly doubled contemporaneous trader participation while comment bots pushed it up by more than 116%. Speed makes a bot faster at entering those markets, not safer.
When a resend doubles your position
Handle failures in a fixed order. Before any resend, fetch the signature of the first attempt and check it on-chain. Landed means don't send again. Dropped means you can replace it, with a fresh quote, not the old one.
During an RPC outage, queue instead of looping
A retry loop during an outage produces a pile of identical transactions that land the moment the connection returns. Queue the orders, stop new entries, and reconcile positions against the chain when the RPC comes back.
Write the reset procedure down: who clears the kill switch, which balance figure proves the account is flat, and which log line proves the daily limit fired. A stop nobody can restart cleanly becomes a manual override by lunchtime.
Spot Scams and Verify a Bot Provider
The pitch is nearly always the same. A hosted bot shows a strong monthly return on a clean dashboard, the testimonials are global, and the deposit goes to the provider's own wallet rather than your exchange account. Withdrawals take weeks. That combination is a warning sign, not proof of trading, and the difference matters because a dashboard is a picture, not a record.
What the regulators actually say
The CFTC's warning on AI trading bots states plainly that AI cannot turn trading bots into "money machines", and flags promoters who push arbitrage algorithms and signal systems with large or guaranteed profits. The SEC investor alert on crypto investment scams describes a platform whose founder allegedly promised profits from a proprietary Bitcoin trading bot and used incoming deposits to pay withdrawals instead of trading.
Screen every provider against four points:
- Funds stay with you. Your exchange account or your own wallet, never the vendor's.
- Keys trade but can't withdraw. Trading permission, no withdrawal scope, IP restricted.
- Every trade has a signature. Open it in an explorer and confirm the fill.
- Custody and execution are explained in writing. In plain language, before you deposit.
If you're weighing hosted options, Yield Seeker's crypto bot roundup surveys several platforms in one place. Read it with the four screens above next to you.
A bot you build and run on your own keys still carries software, market and counterparty risk, but it removes custody risk entirely. On the API side, the terms usually place the risk with the builder: Solana Tracker bears no responsibility or liability for any application, website, bot, service or product built using its APIs. That's not a reason to avoid APIs, it's a reason to own your own logging and reconciliation.
Go Live Small and Review Your First Week
Start live with about 5% of the capital you can afford to lose, and scale only after a week in which paper and live results agree. Four gates decide whether you scale:
- Fills stay inside the slippage cap you set, on every trade, not on average.
- Net PnL is positive after swap fees and priority fees.
- Every stale-feed pause was logged and handled, with a timestamp and a reason.
- The kill switch has been tested on purpose, not just written.
Then run the one-week review off your own logs: intended versus filled amount per trade, total fees and slippage paid, how many trades each filter blocked, and the largest single-trade loss against the 2% cap. Sixty planned buys of 20 USDC should produce 60 fills, a fee total you can state to the cent, and no fill more than 1% away from the quoted price. Any gap between planned and filled means the bot isn't ready to scale.
Keep, adjust or stop it on that evidence, and repeat the review after every parameter change. A bot that passed last month is a different bot once you touch the settings.
Solana Tracker gives you the pieces this whole workflow depends on: a data API with 70+ endpoints for prices, trades, wallets and risk scores, real-time WebSocket streams, low-latency RPC, and the free Raptor Swap API for routing swaps across 71 Solana DEXes. Rugcheck scores every token from 0 to 10 across 20+ risk factors, so the pre-trade filters you built have a number to gate on. Head to Solana Tracker and wire the execution and verification layer before you touch the strategy.