[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76285":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},76285,"solana-trading-bot","trdx\u002Fsolana-trading-bot","trdx","solana trading bot, an automated Solana sniping bot that trades newly-listed tokens on Raydium AMM v4 and pump.fun bonding curves. Listens to on-chain events in real time, applies configurable safety filters, buys with your chosen quote token (WSOL \u002F USDC), and auto-sells on take-profit \u002F stop-loss.","",null,"TypeScript",155,3279,102,1,0,51,55.1,"Microsoft Public License",false,"main",true,[24,25,26,27,28,29,30],"bot","dex","rust","solana","solana-memecoin-sniper-bot","solana-trading-platform","trading-bot","2026-06-12 04:01:21","# Warp Solana Bot working on pumpfun\u002Fraydium\n\nAn automated **Solana sniping bot** that trades newly-listed tokens on **Raydium AMM v4** and **pump.fun** bonding curves. Listens to on-chain events in real time, applies configurable safety filters, buys with your chosen quote token (WSOL \u002F USDC), and auto-sells on take-profit \u002F stop-loss.\n\n> ⚠️ **Disclaimer.** This software is provided **as-is** for educational purposes. Sniping memecoins is extremely risky — rug pulls, honeypots, sandwiching, and total loss are common outcomes. Use only funds you can afford to lose. You are solely responsible for every transaction this bot signs with your private key.\n\n---\n\n## Features\n\n- 🦅 **Raydium AMM v4 sniper** — listens for newly-opened liquidity pools and buys within the same block window.\n- 🚀 **pump.fun integration** — detects new token creations on the pump.fun bonding-curve program and buys early; sells via bonding curve until graduation.\n- ⚡ **Three transaction executors** — `default` (regular RPC), `warp` (warp.id bundled relay), `jito` (Jito bundle fan-out to five block-engine regions).\n- 🛡️ **Pool filters** — burn check, mint renounced, freeze authority, metadata mutability, socials, pool size range.\n- 🎯 **Snipe list** — restrict buys to a whitelist of mint addresses refreshed from `snipe-list.txt`.\n- 📈 **Auto-sell** — take-profit \u002F stop-loss polling against live pool state for both Raydium and pump.fun.\n- 🔒 **Concurrency guard** — `ONE_TOKEN_AT_A_TIME` mode via mutex to avoid fighting yourself across new pools.\n- 🔁 **Retries** — configurable retry counts for buy and sell transactions.\n\n---\n\n## Architecture\n\n```\n┌────────────────┐    ┌────────────────┐    ┌────────────────┐\n│   Listeners    │───▶│      Bot       │───▶│   Transaction  │\n│ (WS subscrs.)  │    │  (buy \u002F sell)  │    │    Executor    │\n└────────────────┘    └────────────────┘    └────────────────┘\n        │                     │                     │\n        │                     │                     ├─ default RPC\n        │                     │                     ├─ warp.id\n        │                     │                     └─ Jito bundles\n        │                     │\n        │                     ├─ PoolFilters (burn \u002F renounced \u002F socials \u002F size)\n        │                     ├─ SnipeListCache\n        │                     ├─ MarketCache \u002F PoolCache\n        │                     └─ PumpFunCache\n        │\n        ├─ OpenBook markets      (quoteMint memcmp)\n        ├─ Raydium AmmV4 pools   (status=6, quoteMint memcmp)\n        ├─ pump.fun logs         (Create instruction)\n        └─ Wallet SPL changes    (token balance deltas → auto-sell)\n```\n\nKey modules:\n\n| Path | Purpose |\n|------|---------|\n| `index.ts` | Entry point — wires `Connection`, `Listeners`, `Bot`, event handlers. |\n| `bot.ts` | `Bot` class — Raydium `buy`\u002F`sell` + pump.fun `buyPumpFun`\u002F`sellPumpFun`, filter & price matching. |\n| `listeners\u002F` | WebSocket subscriptions (OpenBook, Raydium, pump.fun logs, wallet). |\n| `cache\u002F` | In-memory stores for markets, Raydium pools, pump.fun bonding curves, snipe list. |\n| `filters\u002F` | Pluggable safety filters applied before a buy. |\n| `transactions\u002F` | Pluggable executors (`default`, `warp`, `jito`). |\n| `helpers\u002F` | Env loader, logger, wallet parser, Raydium\u002Fpump.fun helpers & pricing. |\n\n---\n\n## Requirements\n\n- **Node.js ≥ 18**\n- A funded **Solana wallet** (keep a **dedicated** keypair for the bot — never use your main one).\n- A **reliable RPC** — public `api.mainnet-beta.solana.com` will throttle; use Helius, QuickNode, Triton, Shyft, etc.\n- The quote token account must already exist in your wallet (e.g. WSOL ATA). You can create a WSOL ATA by wrapping a tiny amount of SOL first.\n\n---\n\n## Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Ftrdx\u002Fsolana-trading-bot.git\ncd solana-trading-bot\nnpm install\ncp .env.copy .env\n```\n\nEdit `.env` (see [Configuration](#configuration)) and then:\n\n```bash\nnpm start\n```\n\n---\n\n## Configuration\n\nAll settings live in `.env`. Copy from `.env.copy` and edit.\n\n### Wallet & Connection\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `PRIVATE_KEY` | `base58 \u002F [n,...] \u002F mnemonic` | Three accepted formats. Keep secret. |\n| `RPC_ENDPOINT` | `https:\u002F\u002F...` | HTTPS RPC. Use a paid provider. |\n| `RPC_WEBSOCKET_ENDPOINT` | `wss:\u002F\u002F...` | WebSocket RPC. |\n| `COMMITMENT_LEVEL` | `confirmed` | `processed`, `confirmed`, or `finalized`. |\n\n### Bot\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `LOG_LEVEL` | `trace` | pino log level. |\n| `ONE_TOKEN_AT_A_TIME` | `true` | Mutex to process one token at a time. |\n| `PRE_LOAD_EXISTING_MARKETS` | `false` | Bulk-fetch OpenBook markets at start (slow). |\n| `CACHE_NEW_MARKETS` | `false` | Subscribe to OpenBook markets live. |\n| `TRANSACTION_EXECUTOR` | `default` | `default` \\| `warp` \\| `jito`. |\n| `COMPUTE_UNIT_LIMIT` | `101337` | `default` executor only. |\n| `COMPUTE_UNIT_PRICE` | `421197` | micro-lamports, `default` executor only. |\n| `CUSTOM_FEE` | `0.006` | SOL; for `warp` \u002F `jito` executors. |\n\n### Buy\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `QUOTE_MINT` | `WSOL` | `WSOL` or `USDC` (Raydium side). |\n| `QUOTE_AMOUNT` | `0.001` | How much quote token to spend per buy. |\n| `AUTO_BUY_DELAY` | `0` | ms delay before sending buy. |\n| `MAX_BUY_RETRIES` | `10` | Retry count on confirmation failure. |\n| `BUY_SLIPPAGE` | `20` | Percent. |\n\n### Sell\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `AUTO_SELL` | `true` | Enable auto-sell on wallet balance changes. |\n| `AUTO_SELL_DELAY` | `0` | ms delay before sending sell. |\n| `MAX_SELL_RETRIES` | `10` | |\n| `PRICE_CHECK_INTERVAL` | `2000` | ms between price polls. |\n| `PRICE_CHECK_DURATION` | `600000` | ms total TP\u002FSL monitoring window. |\n| `TAKE_PROFIT` | `40` | Percent gain. |\n| `STOP_LOSS` | `20` | Percent loss. |\n| `SELL_SLIPPAGE` | `20` | Percent. |\n\n### Filters (Raydium)\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `USE_SNIPE_LIST` | `false` | When `true`, all filters are bypassed and only mints in `snipe-list.txt` are bought. |\n| `SNIPE_LIST_REFRESH_INTERVAL` | `30000` | ms. |\n| `FILTER_CHECK_INTERVAL` | `2000` | ms. |\n| `FILTER_CHECK_DURATION` | `60000` | ms — total filter monitoring window. |\n| `CONSECUTIVE_FILTER_MATCHES` | `3` | Required matches in a row before buying. |\n| `CHECK_IF_MUTABLE` | `false` | Reject if token metadata is mutable. |\n| `CHECK_IF_SOCIALS` | `true` | Require non-empty socials in metadata URI. |\n| `CHECK_IF_MINT_IS_RENOUNCED` | `true` | Require mint authority = null. |\n| `CHECK_IF_FREEZABLE` | `false` | Reject if freeze authority set. |\n| `CHECK_IF_BURNED` | `true` | Require LP supply = 0 (burned). |\n| `MIN_POOL_SIZE` | `5` | In quote token. |\n| `MAX_POOL_SIZE` | `50` | In quote token. Set both to `0` to disable. |\n\n### pump.fun\n\n| Var | Example | Notes |\n|-----|---------|-------|\n| `ENABLE_RAYDIUM` | `true` | Master toggle for the Raydium sniper. |\n| `ENABLE_PUMP_FUN` | `false` | Master toggle for pump.fun. |\n| `PUMP_FUN_BUY_AMOUNT_SOL` | `0.001` | Native SOL per pump.fun buy. |\n| `PUMP_FUN_MAX_CURVE_PROGRESS` | `50` | Percent; skip if bonding curve is already filled past this. |\n\nNotes on pump.fun:\n\n- Trades use **native SOL** through the pump.fun bonding curve (no WSOL \u002F Raydium pool). `QUOTE_MINT` \u002F `QUOTE_AMOUNT` do **not** apply.\n- A 1% protocol fee is assumed in price calculations; `BUY_SLIPPAGE` and `SELL_SLIPPAGE` are applied on top.\n- Once a pump.fun token's bonding curve graduates (`complete = true`), it migrates to Raydium. The bot stops selling via pump.fun at that point; the wallet listener will then route to the Raydium sell path if a pool is known.\n- Pool filters (burn, socials, pool size, etc.) **do not** apply to pump.fun — only `PUMP_FUN_MAX_CURVE_PROGRESS` and the snipe list.\n\n---\n\n## Snipe list\n\nCreate \u002F edit `snipe-list.txt` with one mint address per line. Set `USE_SNIPE_LIST=true`. Refreshes every `SNIPE_LIST_REFRESH_INTERVAL` ms.\n\n```\n# snipe-list.txt\nSo11111111111111111111111111111111111111112\nEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\n```\n\nWorks for both Raydium and pump.fun paths.\n\n---\n\n## Running\n\n```bash\nnpm start        # ts-node index.ts\nnpm run tsc      # type-check only\n```\n\nStop with `Ctrl+C`. Logs print to stdout via pino-pretty.\n\n---\n\n## Transaction executors\n\n### `default`\nStandard `sendRawTransaction` + confirmation. You pay priority via `COMPUTE_UNIT_PRICE` × `COMPUTE_UNIT_LIMIT` micro-lamports.\n\n### `warp`\nBundled through `https:\u002F\u002Ftx.warp.id\u002Ftransaction\u002Fexecute`. A tip of `CUSTOM_FEE` SOL is sent to the warp fee wallet in a leading transfer.\n\n### `jito`\nSends a Jito bundle to all 5 block-engine regions (mainnet, amsterdam, frankfurt, ny, tokyo). Tip of `CUSTOM_FEE` SOL is sent to a randomly-chosen Jito tip account. Compute-budget instructions are skipped since Jito priority is set via the tip.\n\n---\n\n## Safety checklist\n\n- [ ] Use a **dedicated wallet** funded only with what you're willing to lose.\n- [ ] Keep `.env` out of version control (`.gitignore` already excludes it).\n- [ ] Start with tiny amounts (`QUOTE_AMOUNT=0.001`, `PUMP_FUN_BUY_AMOUNT_SOL=0.001`).\n- [ ] Use a paid RPC; free endpoints will miss fills.\n- [ ] Test `ENABLE_RAYDIUM=false ENABLE_PUMP_FUN=true` or vice versa in isolation first.\n- [ ] Monitor logs actively — `LOG_LEVEL=trace` is verbose but informative.\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause |\n|---------|--------------|\n| `PRIVATE_KEY is not set` | `.env` missing \u002F path wrong. |\n| `... token account not found in wallet` | You haven't created a WSOL (or USDC) ATA yet. Wrap a tiny amount of SOL first. |\n| No pools detected | RPC too slow \u002F filters too strict \u002F wrong `COMMITMENT_LEVEL`. |\n| Buys never confirm | Priority fee too low or RPC drops txs; try `warp` \u002F `jito` executor. |\n| `Curve progress too high` | Increase `PUMP_FUN_MAX_CURVE_PROGRESS` or loosen. |\n| `Bonding curve complete` | Token already graduated to Raydium; pump.fun path can't trade it. |\n\n---\n\n## Project layout\n\n```\n.\n├── bot.ts                       Core Bot (buy\u002Fsell for both DEXes)\n├── index.ts                     Entry point & event wiring\n├── cache\u002F\n│   ├── market.cache.ts\n│   ├── pool.cache.ts\n│   ├── pumpfun.cache.ts         pump.fun bonding curve state cache\n│   └── snipe-list.cache.ts\n├── filters\u002F                     PoolFilters + individual filters\n├── helpers\u002F\n│   ├── constants.ts             Env var parsing\n│   ├── liquidity.ts             createPoolKeys for Raydium\n│   ├── logger.ts\n│   ├── market.ts                MinimalMarketLayoutV3\n│   ├── pumpfun.ts               pump.fun program + layout + ix builders + pricing\n│   ├── promises.ts\n│   ├── token.ts                 WSOL \u002F USDC\n│   └── wallet.ts\n├── listeners\u002Flisteners.ts       WebSocket subscriptions\n├── transactions\u002F\n│   ├── default-transaction-executor.ts\n│   ├── warp-transaction-executor.ts\n│   └── jito-rpc-transaction-executor.ts\n├── .env.copy                    Template\n├── snipe-list.txt               Whitelist (optional)\n└── tsconfig.json\n```\n\n---\n\n## License\n\nMIT — see `LICENSE.md`.\n\n## Credits\n\n- Original Raydium sniper by Filip Dundjer \u002F warp.id.\n- pump.fun integration layered on top.\n- Built on `@solana\u002Fweb3.js`, `@solana\u002Fspl-token`, `@raydium-io\u002Fraydium-sdk`, `@metaplex-foundation\u002Fmpl-token-metadata`.\n","这是一个自动化Solana狙击机器人，专门用于在Raydium AMM v4和pump.fun绑定曲线上交易新上市的代币。项目的核心功能包括实时监听链上事件、应用可配置的安全过滤器、使用指定报价代币（如WSOL或USDC）购买，并根据设定的止盈\u002F止损条件自动卖出。技术特点方面，它支持三种交易执行方式（默认RPC、warp.id捆绑中继和Jito扇出至五个区块引擎区域），并且具备池过滤、狙击列表管理及并发保护等功能。适合希望在Solana网络上快速捕捉新上线代币投资机会并进行自动交易的用户使用。",2,"2026-05-19 02:31:40","CREATED_QUERY"]