pump-swarm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pump.fun Swarm Trading

Pump.fun 多钱包集群交易

Coordinate up to 20 wallets to execute synchronized trades on Pump.fun tokens.
最多可协调20个钱包,在Pump.fun上同步执行代币交易。

Quick Start

快速开始

bash
undefined
bash
undefined

Set up wallets

配置钱包

export SOLANA_PRIVATE_KEY="your-main-wallet-key" # wallet_0 export SOLANA_SWARM_KEY_1="second-wallet-key" # wallet_1 export SOLANA_SWARM_KEY_2="third-wallet-key" # wallet_2
export SOLANA_PRIVATE_KEY="your-main-wallet-key" # 钱包_0 export SOLANA_SWARM_KEY_1="second-wallet-key" # 钱包_1 export SOLANA_SWARM_KEY_2="third-wallet-key" # 钱包_2

... up to SOLANA_SWARM_KEY_20

... 最多支持到 SOLANA_SWARM_KEY_20

Optional

可选配置

export SOLANA_RPC_URL="https://your-rpc.com" export PUMPPORTAL_API_KEY="your-api-key"
undefined
export SOLANA_RPC_URL="https://your-rpc.com" export PUMPPORTAL_API_KEY="your-api-key"
undefined

Commands

命令说明

Wallet Management

钱包管理

/swarm wallets              List all swarm wallets with addresses
/swarm balances             Fetch SOL balances from chain
/swarm enable <wallet_id>   Enable a wallet for trading
/swarm disable <wallet_id>  Disable a wallet
/swarm wallets              列出所有集群钱包及其地址
/swarm balances             从链上获取SOL余额
/swarm enable <wallet_id>   启用指定钱包用于交易
/swarm disable <wallet_id>  禁用指定钱包

Trading

交易操作

/swarm buy <mint> <sol> [options]      Buy with all enabled wallets
/swarm sell <mint> <amount|%> [opts]   Sell from wallets with positions
/swarm buy <mint> <sol> [options]      使用所有已启用钱包买入代币
/swarm sell <mint> <amount|%> [opts]   从持有该代币的钱包中卖出

Position Management

持仓管理

/swarm position <mint>      Show cached token positions
/swarm refresh <mint>       Fetch fresh positions from chain (required before sell)
/swarm position <mint>      查看缓存的代币持仓信息
/swarm refresh <mint>       从链上获取最新持仓信息(卖出前必须执行)

Execution Modes

执行模式

ModeFlagBest ForDescription
Parallel
--parallel
Speed (>5 wallets)All wallets execute simultaneously
Bundle
--bundle
Atomicity (≤5)Single Jito bundle, all-or-nothing
Multi-Bundle
--multi-bundle
Atomicity (6-20)Multiple Jito bundles in parallel
Sequential
--sequential
StealthStaggered 200-400ms delays
模式参数适用场景说明
Parallel(并行模式)
--parallel
速度优先(钱包数>5)所有钱包同时执行交易
Bundle(捆绑模式)
--bundle
原子性交易(钱包数≤5)单Jito捆绑包,要么全部成功要么全部失败
Multi-Bundle(多捆绑模式)
--multi-bundle
原子性交易(钱包数6-20)并行提交多个Jito捆绑包
Sequential(串行模式)
--sequential
隐秘交易交易间隔随机延迟200-400ms

Auto Mode Selection (Default)

自动模式选择(默认)

  • 1 wallet → Parallel (direct submit)
  • 2-5 wallets → Single Jito Bundle
  • 6-20 wallets → Multi-Bundle (chunks of 5)
  • 1个钱包 → 并行模式(直接提交)
  • 2-5个钱包 → 单Jito捆绑包
  • 6-20个钱包 → 多捆绑模式(按5个钱包为一组拆分)

Other Options

其他可选参数

OptionDescription
--preset <name>
Apply a saved preset
--wallets <id1,id2>
Use specific wallets only
--slippage <bps>
Slippage tolerance (default: 500 = 5%)
--pool <pool>
Pool: pump, raydium, auto (pumpfun only)
--dex <dex>
DEX: pumpfun (default), bags, meteora
--pool-address <addr>
Specific pool address (for Meteora)
参数说明
--preset <name>
应用已保存的预设配置
--wallets <id1,id2>
仅使用指定的钱包
--slippage <bps>
滑点容忍度(默认:500 = 5%)
--pool <pool>
交易池:pump, raydium, auto(仅支持Pump.fun)
--dex <dex>
去中心化交易所:pumpfun(默认), bags, meteora
--pool-address <addr>
指定交易池地址(适用于Meteora)

Examples

示例

bash
undefined
bash
undefined

Buy 0.1 SOL worth on each enabled wallet (auto mode)

每个已启用钱包买入0.1 SOL的代币(自动模式)

/swarm buy ABC123mint... 0.1
/swarm buy ABC123mint... 0.1

Buy with specific wallets only

仅使用指定钱包买入

/swarm buy ABC123mint... 0.2 --wallets wallet_0,wallet_1
/swarm buy ABC123mint... 0.2 --wallets wallet_0,wallet_1

Buy with a preset

使用预设配置买入

/swarm buy ABC123mint... 0.1 --preset stealth
/swarm buy ABC123mint... 0.1 --preset stealth

Sell 100% with multiple Jito bundles (for >5 wallets)

使用多Jito捆绑包卖出100%持仓(适用于钱包数>5)

/swarm sell ABC123mint... 100% --multi-bundle
/swarm sell ABC123mint... 100% --multi-bundle

Sell 50% with staggered timing (stealth mode)

使用串行模式卖出50%持仓(隐秘模式)

/swarm sell ABC123mint... 50% --sequential
/swarm sell ABC123mint... 50% --sequential

Sell with preset

使用预设配置卖出

/swarm sell ABC123mint... 100% --preset fast
/swarm sell ABC123mint... 100% --preset fast

Check positions before selling

卖出前检查持仓

/swarm refresh ABC123mint... /swarm position ABC123mint...
/swarm refresh ABC123mint... /swarm position ABC123mint...

Multi-DEX examples

多DEX交易示例

/swarm buy ABC123mint... 0.1 --dex bags # Buy on Bags.fm /swarm buy ABC123mint... 0.1 --dex meteora # Buy on Meteora DLMM /swarm sell ABC123mint... 100% --dex bags # Sell on Bags.fm
undefined
/swarm buy ABC123mint... 0.1 --dex bags # 在Bags.fm买入 /swarm buy ABC123mint... 0.1 --dex meteora # 在Meteora DLMM买入 /swarm sell ABC123mint... 100% --dex bags # 在Bags.fm卖出
undefined

Execution Modes Deep Dive

执行模式深入解析

Parallel (Default for >5 wallets)

并行模式(钱包数>5时默认)

  • Speed: All wallets submit simultaneously via
    Promise.all
  • Risk: No atomicity - some may succeed, others fail
  • Use when: Speed is priority, or bundles keep failing
  • 速度:所有钱包通过
    Promise.all
    同时提交交易
  • 风险:无原子性保障 - 部分钱包可能成功,部分失败
  • 适用场景:优先追求速度,或捆绑包交易持续失败时

Jito Bundle (Default for 2-5 wallets)

Jito捆绑包模式(钱包数2-5时默认)

  • Atomic: All transactions succeed or all fail together
  • MEV-protected: No front-running between your own wallets
  • Cost: ~10,000 lamports tip per bundle
  • Limit: Max 5 transactions per bundle (Jito constraint)
  • 原子性:所有交易要么全部成功要么全部失败
  • 防MEV:避免自己的钱包之间出现抢先交易
  • 成本:每个捆绑包约10,000 lamports小费(约0.002美元)
  • 限制:每个捆绑包最多支持5笔交易(Jito限制)

Multi-Bundle (Recommended for 6-20 wallets)

多捆绑模式(推荐钱包数6-20时使用)

  • Chunked: Splits wallets into groups of 5
  • Parallel bundles: All chunks submit simultaneously
  • Partial atomicity: Each chunk is atomic, but chunks are independent
  • Example: 12 wallets → 3 bundles of [5, 5, 2] wallets
  • 分组处理:将钱包按5个一组拆分
  • 捆绑包并行提交:所有分组同时提交
  • 部分原子性:每个分组内的交易是原子性的,但分组之间相互独立
  • 示例:12个钱包 → 拆分为3个捆绑包,分别包含[5,5,2]个钱包

Sequential (Stealth mode)

串行模式(隐秘模式)

  • Staggered: 200-400ms random delay between wallets
  • Amount variance: ±5% to avoid detection patterns
  • Rate limited: 5 seconds minimum between trades per wallet
  • Use when: Want to avoid pattern detection
  • 延迟执行:钱包之间的交易间隔随机延迟200-400ms
  • 金额波动:交易金额存在±5%的差异,避免被检测到交易模式
  • 速率限制:每个钱包两次交易之间至少间隔5秒
  • 适用场景:希望避免交易模式被识别时

How It Works

工作原理

Buy Flow

买入流程

  1. Refreshes SOL balances from chain
  2. Filters wallets with sufficient balance (≥0.01 SOL + amount)
  3. Builds transaction for each wallet via PumpPortal API
  4. Signs all transactions locally
  5. Submits via selected execution mode
  6. Reports results per wallet
  1. 从链上刷新SOL余额
  2. 筛选出余额充足的钱包(≥0.01 SOL + 买入金额)
  3. 通过PumpPortal API为每个钱包构建交易
  4. 本地签署所有交易
  5. 通过选定的执行模式提交交易
  6. 按钱包返回交易结果

Sell Flow

卖出流程

  1. Fetches actual token balances from chain (critical!)
  2. Filters wallets with positions
  3. Calculates sell amount (% of position or exact)
  4. Builds and signs transactions
  5. Submits via selected execution mode
  6. Reports results per wallet
  1. 从链上获取实际代币余额(这一步非常关键!)
  2. 筛选出持有该代币的钱包
  3. 计算卖出金额(持仓百分比或精确金额)
  4. 构建并签署交易
  5. 通过选定的执行模式提交交易
  6. 按钱包返回交易结果

Safety Features

安全特性

  • Balance check: Verifies sufficient SOL before buy
  • Position check: Fetches real token balances before sell
  • Max amount: Rejects buy amounts > 10 SOL per wallet
  • Confirmation timeout: 60 second timeout per transaction
  • Error reporting: Shows detailed errors per wallet
  • Bundle fallback: Failed bundles automatically retry as parallel
  • 余额校验:买入前验证钱包是否有足够的SOL
  • 持仓校验:卖出前获取真实的代币余额
  • 金额上限:拒绝每个钱包买入金额超过10 SOL的请求
  • 确认超时:每笔交易的确认超时时间为60秒
  • 错误报告:显示每个钱包的详细错误信息
  • 捆绑包降级:失败的捆绑包会自动重试并行模式

Configuration

配置说明

Env VariableDescription
SOLANA_PRIVATE_KEY
Main wallet (wallet_0)
SOLANA_SWARM_KEY_1..20
Additional swarm wallets
SOLANA_RPC_URL
Custom RPC endpoint (faster = better)
PUMPPORTAL_API_KEY
PumpPortal API key (optional, for pumpfun)
BAGS_API_KEY
Bags.fm API key (required for bags DEX)
环境变量说明
SOLANA_PRIVATE_KEY
主钱包(wallet_0)
SOLANA_SWARM_KEY_1..20
额外的集群钱包
SOLANA_RPC_URL
自定义RPC端点(速度越快越好)
PUMPPORTAL_API_KEY
PumpPortal API密钥(可选,用于Pump.fun)
BAGS_API_KEY
Bags.fm API密钥(使用Bags DEX时必填)

Multi-DEX Support

多DEX支持

The swarm system supports trading across multiple DEXes:
DEXFlagBest ForRequires
Pump.fun
--dex pumpfun
(default)
Memecoins, new launches
PUMPPORTAL_API_KEY
(optional)
Bags.fm
--dex bags
Bags-launched tokens
BAGS_API_KEY
Meteora
--dex meteora
DLMM pools, concentrated liquidity-
该集群系统支持在多个去中心化交易所进行交易:
DEX参数适用场景所需条件
Pump.fun
--dex pumpfun
(默认)
模因币、新上线代币
PUMPPORTAL_API_KEY
(可选)
Bags.fm
--dex bags
Bags上线的代币
BAGS_API_KEY
Meteora
--dex meteora
DLMM池、集中流动性池

Multi-DEX Examples

多DEX示例

bash
undefined
bash
undefined

Buy on Pump.fun (default)

在Pump.fun买入(默认)

/swarm buy ABC123... 0.1
/swarm buy ABC123... 0.1

Buy on Bags.fm

在Bags.fm买入

/swarm buy ABC123... 0.1 --dex bags
/swarm buy ABC123... 0.1 --dex bags

Buy on Meteora with specific pool

在Meteora的指定交易池买入

/swarm buy ABC123... 0.1 --dex meteora --pool-address <pool_address>
/swarm buy ABC123... 0.1 --dex meteora --pool-address <pool_address>

Sell on Bags.fm with stealth preset

使用隐秘预设在Bags.fm卖出

/swarm sell ABC123... 100% --dex bags --preset stealth
undefined
/swarm sell ABC123... 100% --dex bags --preset stealth
undefined

Notes

注意事项

  • Default DEX is
    pumpfun
    for backward compatibility
  • Bags requires
    BAGS_API_KEY
    - will error if missing
  • Meteora can auto-discover pools or use a specific
    --pool-address
  • All execution modes (parallel, bundle, sequential) work with all DEXes
  • Presets work with all DEXes
  • 默认DEX为
    pumpfun
    ,以保持向后兼容
  • 使用Bags需要
    BAGS_API_KEY
    ,如果缺失会报错
  • Meteora可以自动发现交易池,也可以指定
    --pool-address
  • 所有执行模式(并行、捆绑、串行)均支持所有DEX
  • 预设配置适用于所有DEX

Agent Tools (12)

Agent工具(共12个)

ToolDescription
swarm_wallets
List all swarm wallets
swarm_balances
Refresh SOL balances from chain
swarm_buy
Coordinated buy across wallets (supports
preset
param)
swarm_sell
Coordinated sell across wallets (supports
preset
param)
swarm_position
Get cached positions
swarm_refresh
Fetch fresh positions from chain
swarm_enable
Enable a wallet
swarm_disable
Disable a wallet
swarm_preset_save
Save a trading preset
swarm_preset_list
List saved presets
swarm_preset_get
Get preset details
swarm_preset_delete
Delete a preset
工具说明
swarm_wallets
列出所有集群钱包
swarm_balances
从链上刷新SOL余额
swarm_buy
跨钱包协同买入(支持
preset
参数)
swarm_sell
跨钱包协同卖出(支持
preset
参数)
swarm_position
获取缓存的持仓信息
swarm_refresh
从链上获取最新持仓信息
swarm_enable
启用指定钱包
swarm_disable
禁用指定钱包
swarm_preset_save
保存交易预设
swarm_preset_list
列出所有预设
swarm_preset_get
查看预设详情
swarm_preset_delete
删除预设

Scaling Notes

扩展说明

  • Max wallets: 20 (wallet_0 + SOLANA_SWARM_KEY_1..20)
  • Jito bundle limit: 5 txs per bundle (handled automatically)
  • Multi-bundle parallel: All bundles submit simultaneously
  • RPC recommendation: Use dedicated RPC for best performance
  • Tip amount: 10,000 lamports per bundle (~$0.002)
  • 最大钱包数:20个(wallet_0 + SOLANA_SWARM_KEY_1..20)
  • Jito捆绑包限制:每个捆绑包最多5笔交易(Jito限制)
  • 多捆绑包并行:所有捆绑包同时提交
  • RPC建议:使用专用RPC以获得最佳性能
  • 小费金额:每个捆绑包10,000 lamports(约0.002美元)

Presets

预设配置

Save and reuse trading configurations across tokens and strategies.
可以保存并重复使用交易配置,适用于不同代币和策略。

Preset Commands

预设命令

bash
/swarm preset save <name> [options]   Save a preset
/swarm preset list [type]             List presets
/swarm preset show <name>             Show preset details
/swarm preset delete <name>           Delete a preset
bash
/swarm preset save <name> [options]   保存预设
/swarm preset list [type]             列出预设
/swarm preset show <name>             查看预设详情
/swarm preset delete <name>           删除预设

Preset Save Options

预设保存参数

OptionDescription
--type <type>
Preset type: strategy, token, wallet_group
--desc "..."
Preset description
--mint <addr>
Token address (for token presets)
--amount <sol>
Default SOL per wallet
--slippage <bps>
Slippage in basis points
--pool <pool>
Pool: pump, raydium, auto
--mode <mode>
parallel, bundle, multi-bundle, sequential
--wallets <ids>
Wallet IDs (for wallet_group presets)
参数说明
--type <type>
预设类型:strategy, token, wallet_group
--desc "..."
预设描述
--mint <addr>
代币地址(适用于token类型预设)
--amount <sol>
每个钱包的默认SOL金额
--slippage <bps>
滑点(基点)
--pool <pool>
交易池:pump, raydium, auto
--mode <mode>
执行模式:parallel, bundle, multi-bundle, sequential
--wallets <ids>
钱包ID(适用于wallet_group类型预设)

Built-in Presets

内置预设

NameModeSlippagePoolUse Case
fast
parallel5%autoSpeed priority
atomic
multi-bundle5%autoAll-or-nothing execution
stealth
sequential3%autoPattern avoidance
aggressive
parallel10%pumpHigh volatility tokens
safe
bundle2%autoConservative trading
名称模式滑点交易池适用场景
fast
parallel5%auto优先追求速度
atomic
multi-bundle5%auto全成或全败的原子性交易
stealth
sequential3%auto避免交易模式被识别
aggressive
parallel10%pump高波动代币
safe
bundle2%auto保守型交易

Preset Examples

预设示例

bash
undefined
bash
undefined

Create a custom strategy preset

创建自定义策略预设

/swarm preset save my_stealth --type strategy --mode sequential --slippage 300
/swarm preset save my_stealth --type strategy --mode sequential --slippage 300

Create a token preset for BONK

创建BONK代币的预设

/swarm preset save bonk_entry --type token --mint DezXAZ... --slippage 1000 --amount 0.1
/swarm preset save bonk_entry --type token --mint DezXAZ... --slippage 1000 --amount 0.1

Create a wallet group preset

创建钱包组预设

/swarm preset save top5 --type wallet_group --wallets wallet_0,wallet_1,wallet_2,wallet_3,wallet_4
/swarm preset save top5 --type wallet_group --wallets wallet_0,wallet_1,wallet_2,wallet_3,wallet_4

List all presets

列出所有预设

/swarm preset list
/swarm preset list

List only strategy presets

仅列出策略类型预设

/swarm preset list strategy
/swarm preset list strategy

Use preset in trade

使用预设进行交易

/swarm buy ABC... 0.1 --preset my_stealth /swarm sell ABC... 100% --preset fast
/swarm buy ABC... 0.1 --preset my_stealth /swarm sell ABC... 100% --preset fast

Delete a preset

删除预设

/swarm preset delete old_preset
undefined
/swarm preset delete old_preset
undefined

Preset Types

预设类型

TypePurpose
strategy
Reusable trading settings (mode, slippage, pool)
token
Token-specific settings with saved mint address
wallet_group
Named wallet combinations for specific trades
类型用途
strategy
可重复使用的交易设置(模式、滑点、交易池)
token
代币专属设置,包含保存的代币地址
wallet_group
用于特定交易的钱包组合

Troubleshooting

故障排除

IssueSolution
Bundle keeps failingTry
--parallel
or check network congestion
Positions not showingRun
/swarm refresh <mint>
first
Insufficient balanceCheck with
/swarm balances
Slow executionUse dedicated RPC via
SOLANA_RPC_URL
Some wallets skippedWallet disabled or insufficient balance
Preset not foundCheck name with
/swarm preset list
问题解决方案
捆绑包持续失败尝试使用
--parallel
模式,或检查网络拥堵情况
持仓信息不显示先执行
/swarm refresh <mint>
余额不足使用
/swarm balances
检查钱包余额
执行速度慢通过
SOLANA_RPC_URL
使用专用RPC
部分钱包被跳过钱包已禁用或余额不足
预设找不到使用
/swarm preset list
检查预设名称