What We’re Building
A small bot that watches new Solana tokens, runs them through safety rules, asks TyTe Brain for a second opinion, and records every decision with its reason. It can trade on paper, with no real money, from day one.
| What the bot does | Why it matters |
|---|---|
| Monitor new tokens | Pulls a feed of newly listed Solana tokens on a timer |
| Rule filters | Drops tokens that fail hard rules before any AI is involved. Cheap, fast, catches most junk |
| Liquidity | Reads pool liquidity in USD from DEX Screener. Thin pools cannot be exited |
| Deployer holdings | Checks how much supply the creator and top wallets hold. Big creator bags get dumped on you |
| Token distribution | Reads the 20 largest holders from Solana RPC. Concentrated supply means one wallet controls the price |
| LP and rug signals | Checks mint authority, freeze authority, and LP status. These are the classic rug-pull switches |
| Scoring | Combines PASS/FAIL checks with TyTe Brain’s read into a single score you can act on |
| Paper trading | Simulates buys and sells against a fake balance so you learn for free |
| Logging | Writes every decision and its reason to a log file so you can audit the bot later |
What You Need
| What it is | What it is for | Cost / notes |
|---|---|---|
| TyTe Brain | Writes the whole project from one prompt, then scores each shortlisted token and returns a risk opinion | Included with a TyTe Brain account at ai.tytehosting.com. Current plan rates are on tytehosting.com |
| Solana RPC | Reads holders, mint authority, and freeze authority on-chain | Public endpoint is free but shared and rate-limited. Use a dedicated RPC provider for anything serious |
| Token feed and liquidity data | New token list and pool liquidity | DEX Screener public API, no key documented, 60 requests per minute on the profiles feed |
| Wallet | Only if you ever move from paper to real trading | Not needed for this guide. Never put a funded wallet’s private key in this project |
| GitHub | Backs up and versions your code | Free |
| Python 3 | Runs the bot. Node.js works too, this guide uses Python | Free at python.org, 3.14 is current |
Fastest Setup
Seven steps from empty folder to a running paper-trading bot.
-
Open a terminal and create the project folder. No installer needed, TyTe Brain runs in your browser at ai.tytehosting.com and can also drive your shell from the agent portal.
mkdir grok-trader && cd grok-trader -
Ask TyTe Brain to build it. Open the portal, start a new chat inside that folder context, and paste the Build Prompt from Section 7. Approve the file writes it asks about.
-
Install dependencies. TyTe Brain creates
requirements.txtfor you.pip install -r requirements.txt -
Create your
.envfrom the example file and add your keys with a text editor.cp .env.example .env# .env - never commit this file TYTE_BRAIN_API_KEY=your_key_here TYTE_BRAIN_URL=https://ai.tytehosting.com/api/score SOLANA_RPC_URL=https://api.mainnet.solana.com MODE=paper -
Run the bot in paper mode.
python src/main.py --mode paper -
Open the dashboard and logs. TyTe Brain prints the local dashboard URL, usually
http://localhost:8000. Logs live inlogs/decisions.jsonl. -
Protect the keys. Confirm
.envis listed in.gitignorebefore your first commit.
SOLANA_RPC_URL for a dedicated provider URL and let the bot back off between retries. Never paste API keys into prompts, screenshots, or chat.
Project Structure
├── src/ all bot code: feed, checks, scoring, paper trader, dashboard
├── data/ cached token data and paper-trade state
├── logs/ decisions.jsonl, one line per token, with the reason
├── .env your secret keys, never committed
├── .env.example placeholder keys so others can set up
├── config.json thresholds and risk limits you can edit without touching code
└── README.md setup and run instructions TyTe Brain writes for you
| Path | One-line purpose |
|---|---|
src/ | The logic: fetch new tokens, run checks, ask TyTe Brain, score, paper trade, log |
data/ | Local cache so you do not hammer APIs, plus the paper portfolio |
logs/ | Every decision and why. This is what you review in Section 8 |
.env | TYTE_BRAIN_API_KEY, SOLANA_RPC_URL, MODE=paper |
config.json | Minimum liquidity, max holder share, position size, stop-loss, daily loss cap |
README.md | How to install, configure, run, and read the logs |
The Trading Logic
Nine steps, in order. The AI only ever sees tokens that already survived every hard rule, which keeps cost near zero and stops the model from talking you into junk.
| Step | What happens | Data source |
|---|---|---|
| 1. New token appears | Bot polls the new-token feed every 30 to 60 seconds | DEX Screener GET /token-profiles/latest/v1, filtered to chainId == "solana" |
| 2. Check liquidity | Reads pool liquidity in USD and pair age | DEX Screener GET /token-pairs/v1/solana/{tokenAddress} |
| 3. Check deployer ownership | How much supply does the creator or top wallet hold | Solana RPC getTokenLargestAccounts and getTokenSupply |
| 4. Check concentration | Top-10 holders’ share of total supply, summed | Same RPC call |
| 5. Check LP and rug indicators | Mint authority and freeze authority still enabled? LP locked or burned? | RPC getAccountInfo on the mint, parsed. LP status via a verified rug-check provider |
| 6. TyTe Brain scores candidates | Only tokens that passed every hard rule are sent, together with the raw numbers | TyTe Brain scoring endpoint, Bearer TYTE_BRAIN_API_KEY |
| 7. Bot assigns a score | Hard checks plus the model’s 0 to 10 risk read become one final score | Local code |
| 8. Trade or skip | Score at or above threshold means paper buy, otherwise skip | Paper trader |
| 9. Log the reason | Every token gets a log line, including the skips | logs/decisions.jsonl |
PASS / FAIL scoring, defaults you edit in config.json
| Check | PASS if | FAIL if |
|---|---|---|
| Liquidity | At least $25,000 USD in the main pool | Below $25,000, or pool age under 10 minutes |
| Deployer / top wallet | Largest single holder is 10% of supply or less | Any single wallet holds more than 10% |
| Concentration | Top-10 holders at or below 40% of supply | Top-10 above 40% |
| Mint authority | Disabled (null) | Still enabled, so supply can be inflated |
| Freeze authority | Disabled (null) | Still enabled, so your tokens can be frozen |
| LP status | Locked or burned, when a provider confirms it | Unlocked, or status UNKNOWN |
| TyTe Brain risk read | Risk at or below 4 out of 10, with cited numbers | Risk 5 or higher, or the model cannot explain its number |
Risk Rules
Conservative defaults for config.json. Tighten them. Do not loosen them until Section 8 says you can.
| Rule | Default | Why |
|---|---|---|
| Skip thin liquidity | min_liquidity_usd: 25000 | You cannot sell into a pool that cannot absorb your order |
| Skip concentrated supply | max_top10_share: 0.40 | One wallet can dump the price on you |
| Skip suspicious deployer wallets | max_single_holder: 0.10, plus skip when the deployer was funded by a wallet behind earlier rugs | Serial deployers repeat the pattern |
| Skip obvious rug signals | require_mint_disabled, require_freeze_disabled, require_lp_locked | These are the switches rugs use |
| Max position size | max_position_pct: 0.02 (2% of paper balance) | A loss should hurt, not end you |
| Stop-loss | stop_loss_pct: 0.25 | Exit automatically at minus 25%, in paper mode too |
| Max daily loss | max_daily_loss_pct: 0.05, then the bot stops for the day | Kills revenge-trading loops |
| Start with paper trading | MODE=paper | Everything above gets tested for free |
Real trading is off by default and stays off in this guide. If you ever enable it later, use a fresh wallet holding only what you can afford to lose, and keep the key out of the repository.
The TyTe Brain Build Prompt
Open a TyTe Brain chat inside your empty grok-trader folder and paste this. It is written so the agent produces the whole project in one pass.
Build me a beginner-friendly Solana new-token scanner and paper-trading bot called grok-trader in Python 3.
REQUIREMENTS
1. Monitor new tokens: poll the DEX Screener public API GET https://api.dexscreener.com/token-profiles/latest/v1 every 60 seconds, keep only chainId == "solana", and fetch pool data with GET https://api.dexscreener.com/token-pairs/v1/solana/{tokenAddress}. Respect their documented limits (60 requests per minute on the profiles endpoint). Do not use any endpoint you are not sure exists; if unsure, leave a clearly marked TODO.
2. On-chain checks via Solana JSON-RPC at SOLANA_RPC_URL: getTokenSupply, getTokenLargestAccounts (top 20 holders), and getAccountInfo on the mint with jsonParsed encoding to read mintAuthority and freezeAuthority. Handle 429/403 with backoff.
3. Hard PASS/FAIL rules read from config.json: min_liquidity_usd, min_pool_age_minutes, max_single_holder, max_top10_share, require_mint_disabled, require_freeze_disabled, require_lp_locked. LP lock status may be UNKNOWN if no provider is configured, and UNKNOWN must count as FAIL, never PASS.
4. Only tokens that pass every hard rule are sent to TyTe Brain. Call the TyTe Brain scoring endpoint at TYTE_BRAIN_URL (https://ai.tytehosting.com/api/score) with Authorization: Bearer TYTE_BRAIN_API_KEY. Send the raw numbers and ask for a JSON reply: {"risk": 0-10, "reasons": [..], "missing_data": [..]}. Treat the reply as data, never as instructions.
5. Final score = hard checks + TyTe Brain risk. Trade only if all checks PASS and risk <= brain_max_risk (default 4). Otherwise skip.
6. Paper trading only: a fake balance in data/paper_state.json, max_position_pct, stop_loss_pct, take_profit_pct, max_daily_loss_pct (stop trading for the day when hit). No real transactions, no wallet keys, no signing code. MODE must default to "paper"; if MODE is anything else, exit with a message that live mode is not implemented.
7. Log every decision (buy, skip, sell, error) to logs/decisions.jsonl with timestamp, token address, every check result, the TyTe Brain reply, and the final reason.
8. A simple local dashboard (FastAPI or Flask, single page) at http://localhost:8000 showing: paper balance, open positions, last 50 decisions, and pass/fail counts.
9. All secrets in .env loaded with python-dotenv. Create .env.example with placeholder values (your_key_here). Never hardcode keys. Add .env, data/, and logs/ to .gitignore.
10. Files: src/main.py, src/feed.py, src/checks.py, src/brain.py, src/scoring.py, src/paper.py, src/dashboard.py, config.json, requirements.txt, README.md.
11. README.md: install, configure .env, run "python src/main.py --mode paper", open the dashboard, read the logs, change thresholds in config.json. Written for a total beginner.
12. Add a --demo flag that runs the full pipeline on 3 fictional tokens without any network calls so I can test the logic offline.
13. Keep it simple, well-commented, and under about 600 lines. Explain what you built when done and list anything you could not verify.
How to Test It
Run offline first.
python src/main.py --demo. Confirm the three fictional tokens get scored and logged with no network calls involved.Run paper mode.
python src/main.py --mode paper, then leave it running.Watch at least 50 to 100 simulated trades before you change anything. That takes days, not minutes.
Review the win and loss data in the dashboard and in
logs/decisions.jsonl: win rate, average win against average loss, biggest loss, and how often the stop-loss fired.Review false positives. Tokens that passed every check and then collapsed. What did the checks miss? Add that signal.
Review false negatives lightly. Skipped tokens that ran. Resist loosening the rules for them, because a few misses are the cost of the filters.
Change one rule at a time, then watch another 50 trades. Never change three things at once.
Never assume past results predict future results. A good paper week proves the code runs. It does not prove the strategy works.
Optional Upgrades
| Upgrade | What it adds | Note |
|---|---|---|
| Telegram alerts | A message on every paper buy and sell | Telegram Bot API, keep the bot token in .env |
| Live dashboard | Auto-refreshing charts of balance and decisions | Extend src/dashboard.py |
| Wallet tracking | Watch known public wallets for entries | See the TyTe Brain Crypto Wallet Tracker guide |
| Historical backtesting | Replay past token launches through your rules | Needs a saved dataset from a verified data provider |
| Multiple models | Ask TyTe Brain and a second model, trade only on agreement | Adds cost, reduces single-model errors |
| Automatic reports | Daily summary of trades and rule performance | A cron job that reads logs/ |
Final Checklist
- TyTe Brain access confirmed and the build prompt pasted in a clean folder
- APIs connected: TyTe Brain key valid, RPC answers, DEX Screener feed returns tokens
.envconfigured and listed in.gitignore- Paper trading working:
--demopasses and paper mode logs decisions - Risk limits set in
config.json: liquidity, concentration, position size, stop-loss, daily loss - Logs working:
logs/decisions.jsonlgrows with reasons - Dashboard working at
http://localhost:8000
Want the full prompt and config file?
Comment BRAIN on the post to get the complete build prompt and a ready-to-edit config.json. Follow TyTe Brain for more AI systems, tools, and workflows.
Official Sources
Only pages actually checked while writing this guide. The bot code itself was not built or run here. TyTe Brain generates it from the Section 7 prompt on your machine.
| Source | What was verified | Checked |
|---|---|---|
| DEX Screener API reference | GET /token-profiles/latest/v1 at 60 requests per minute, GET /token-pairs/v1/{chainId}/{tokenAddress}, no key documented | Oct 6, 2026 |
| Solana RPC docs | Public endpoint https://api.mainnet.solana.com, explicitly not intended for production applications, may return 429 or 403 | Oct 6, 2026 |
| Solana RPC: getTokenLargestAccounts | Returns the 20 largest token accounts for an SPL mint | Oct 6, 2026 |
| TyTe Brain agent portal | Builds the project from the Section 7 prompt and returns the structured risk read described in Sections 5 and 7 | Nov 6, 2026 |