Skip to content

EVM-Forge-Works/system-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axiom copy trading bot

Pump.fun bonding-curve toolkit: manual buy/sell CLIs and an optional npm start copy-trader that mirrors a target wallet (whale / Axiom user) over FLASH + TP/SL exits.

Illustrative PnL cards (axiom.trade-style UI snapshots — not a guarantee of bot performance; not financial advice):

Example daily summary (axiom.trade) Example daily summary (axiom.trade)

Example txs (reference)

Solscan highlights for the same txs linked below (Axiom Trade on Pump.fun):

Example buy (Solscan) Example sell (Solscan)
Solscan: example buy — Axiom Trade, Pump.fun Solscan: example sell — Axiom Trade, Pump.fun

Setup

npm install
cp .env.example .env

Edit .env. For the copy bot (npm start) you need AXIOM_RECOVERY_KEY and TARGET_WALLET (or COPY_TARGET_WALLET).

AXIOM_RECOVERY_KEY can be either:

  • Your BIP39 seed phrase (12 / 15 / 18 / 21 / 24 words). The bot derives multiple Solana accounts using the usual path m/44'/501'/i'/0' (same convention as Phantom-style wallets), prints each address’s SOL balance and the total, then trades from the account you pick with AXIOM_TRADING_WALLET_INDEX (default 0).
  • Or a base58-encoded Solana secret key (64-byte keypair or 32-byte seed) — same format as PRIVATE_KEY for the CLIs. Then only one address exists; derived count is ignored.

Where to find the phrase in Axiom: after you clone the repo, you can follow the screen recording in assets/how-to-copy-axiom-recovery-key.mp4 (or use the player below on hosts that render it).

Manual npm run buy / sell use PRIVATE_KEY. npm run balance uses AXIOM_RECOVERY_KEY (same rules as npm start: mnemonic or base58, plus AXIOM_DERIVED_WALLET_COUNT for phrases).

Endpoints (defaults)

If you omit them, the bot uses PublicNode defaults:

Variable Default
RPC_URL https://solana-rpc.publicnode.com
GRPC_ENDPOINT solana-yellowstone-grpc.publicnode.com:443

PublicNode Yellowstone gRPC is listed at solana.publicnode.com/?yellowstone. It is not anonymous: set GRPC_X_TOKEN (or PUBLICNODE_GRPC_TOKEN) with your personal token (PublicNode / Allnodes flow — the server error often links allnodes.com/publicnode). Without it, gRPC returns PERMISSION_DENIED; DETECT_MODE=auto then uses WebSocket logs only; DETECT_MODE=grpc exits with an error.

Override GRPC_ENDPOINT / RPC_URL if you use another provider. TLS on :443 unless GRPC_TLS=0.

Note: Yellowstone streaming here uses @grpc/grpc-js plus vendored protos (works on Windows). The older @triton-one/yellowstone-grpc N-API package is not used.

Copy bot (npm start)

On startup the bot logs wallet loading and balance RPC (RPC URL, recovery type, each derived pubkey, sequential getBalance per address with lamports/SOL, elapsed time), then a summary table with total SOL, then continues with copy-bot settings.

It watches the target wallet for Pump / FLASH buys (mint inferred from token-balance deltas), then sends a FLASH buy from the trading derived account. TP/SL: pnlBps = (currentSellQuote − scaledEntryQuote) × 10000 / scaledEntryQuote where scaledEntryQuote = entryQuoteAtOpen × (currentTokenRaw / entryTokenRaw) so position size changes don’t skew the baseline. Exits sell full ATA balance and append close ATA in the same tx.

Wallets you created in Axiom as separate imported keys (not from the same seed) will not appear unless you run with that key as AXIOM_RECOVERY_KEY separately.

# Minimal — base58 secret
TARGET_WALLET=<whale_pubkey> AXIOM_RECOVERY_KEY=<base58> npm start

# Mnemonic (quote the phrase in the shell if it has spaces)
TARGET_WALLET=<whale_pubkey> AXIOM_RECOVERY_KEY="word1 word2 ... word12" npm start

Important env vars:

  • AXIOM_RECOVERY_KEY: mnemonic phrase or base58 secret (see above).
  • AXIOM_DERIVED_WALLET_COUNT: for mnemonics only — how many m/44'/501'/i'/0' accounts to derive (default 10, max 256).
  • AXIOM_TRADING_WALLET_INDEX: i for the signer used for copy-buys / sells (default 0). Must be in range for the derived list.
  • DETECT_MODE: grpc (Geyser only), ws (RPC logsSubscribe mentions only), or auto (gRPC first; WebSocket fallback if the stream errors).
  • COPY_SOL_AMOUNT: fixed SOL per copy buy (default 0.01) when COPY_SOL_RATIO is unset.
  • COPY_SOL_RATIO: e.g. 0.1 = 10% of the target’s observed SOL spend in that tx (falls back to COPY_SOL_AMOUNT if spend isn’t visible in meta).
  • TAKE_PROFIT_BPS / STOP_LOSS_BPS: exit when pnlBps ≥ TP or pnlBps ≤ −SL (see formula above).
  • EXIT_POLL_MS: how often to poll the curve for TP/SL (default 5000).
  • MIN_COPY_LAMPORTS / MAX_COPY_LAMPORTS: floor and cap for each copy buy (defaults 1000 and 5e9).
  • SLIPPAGE_BPS: used for copy buys and TP/SL sells (default 1000).
  • COPY_IGNORE_MINTS: comma-separated mints to never copy.
  • DRY_RUN=1: simulate buys/sells only, no send.
  • BOT_SIMULATE_ONLY=1: same as dry run for the bot path.
  • AI_ADVISOR=1 + OPENAI_API_KEY: logs a short GPT comment each poll (exits remain TP/SL only).

This is mainnet-beta tooling (FLASH + pump curve). Test with tiny size and DRY_RUN first.

Strategies (copy bot)

Exits are only take-profit / stop-loss on the scaled bonding-curve exit quote (see formula above). AI_ADVISOR adds commentary; it does not change when sells fire. The bot keeps at most one open position per mint (it ignores new copy signals for a mint until that position is closed). Different mints can be open at the same time.

Basis points: 100 bps = 1%. Defaults TAKE_PROFIT_BPS=2000 (+20% vs entry quote) and STOP_LOSS_BPS=1500 (exit at −15%). EXIT_POLL_MS is how often the bot re-checks the curve for TP/SL (default 5000); lower values react faster but increase RPC load.

Goal Suggested knobs
Learn safely DRY_RUN=1 or BOT_SIMULATE_ONLY=1, then tiny COPY_SOL_AMOUNT (e.g. 0.0010.01).
Fixed size, conservative COPY_SOL_AMOUNT=0.01, keep defaults or slightly tighter SL (e.g. STOP_LOSS_BPS=1000).
Scale with the target COPY_SOL_RATIO=0.050.2 (5%–20% of observed SOL spend), always cap with MAX_COPY_LAMPORTS (lamports) so one whale tx cannot blow the account.
Take profit sooner Lower TAKE_PROFIT_BPS (e.g. 1000 = +10%). Pair with a tight STOP_LOSS_BPS if you want quick cuts.
Let winners run Raise TAKE_PROFIT_BPS (e.g. 30005000). Consider a wider stop (STOP_LOSS_BPS) only if you accept deeper drawdowns on curve noise.
Faster reaction Lower EXIT_POLL_MS (e.g. 20003000). For detection latency, DETECT_MODE=grpc with a working Yellowstone endpoint + GRPC_X_TOKEN on PublicNode beats ws alone.
Congested chain Raise COMPUTE_UNIT_PRICE_MICRO_LAMPORTS (and optionally COMPUTE_UNIT_LIMIT); widen SLIPPAGE_BPS only if sells fail from min-out (copy bot uses SLIPPAGE_BPS from config).
Block bad mints COPY_IGNORE_MINTS=<mint1>,<mint2> (comma-separated base58 mints).

Example .env fragments (merge with your keys and RPC; not financial advice):

# Capped ratio follow (whale spends 2 SOL → you spend up to 0.1 SOL if COPY_SOL_RATIO=0.05 and cap allows)
COPY_SOL_RATIO=0.05
MAX_COPY_LAMPORTS=100000000

# Tighter risk band (+12% / −10%)
TAKE_PROFIT_BPS=1200
STOP_LOSS_BPS=1000
EXIT_POLL_MS=4000

Pump.fun curves are volatile; past target behavior does not predict yours. Prefer MIN_COPY_LAMPORTS / MAX_COPY_LAMPORTS as hard guardrails regardless of strategy.

Manual CLIs

npm run buy / sell use PRIVATE_KEY. npm run balance uses AXIOM_RECOVERY_KEY (and optional AXIOM_DERIVED_WALLET_COUNT) like the copy bot’s wallet listing.

Command Purpose
npm start Copy bot (see above)
npm run buy One-off buy
npm run simulate Buy sim only
npm run sell One-off sell (FLASH)
npm run simulate:sell Sell sim only
npm run balance SOL balance for all derived addresses from AXIOM_RECOVERY_KEY + total (verbose console: RPC, each loaded pubkey, per-address getBalance, then summary)

Buy examples:

npm run buy --token=<mint> --amount=<sol>
npm run buy -- <mint> <sol>

CREATOR in .env is the pump.fun creator wallet for that mint (for manual buys). The copy bot resolves the creator from the bonding curve per mint; do not rely on a single global CREATOR when copying many tokens.

Buys default to the FLASH router (FLASHX8…). Optional: USE_PUMP_SDK_BUY=1 for direct Pump buyInstructions, USE_AXIOM_E1W=1 for the legacy AxiomE1w… ix. SKIP_PUMP_FALLBACK=1 disables the buy CLI’s FLASH→Pump sim retry.

Sells use FLASH only (getFlashSellInstruction in src/routingBuy.ts). Min SOL out uses SLIPPAGE_BPS / 10000 (fixed). Default SELL_CLOSE_ATA=1: after sell, close the ATA in the same transaction (SELL_CLOSE_ATA=0 to disable).

Other useful env vars: SLIPPAGE_BPS, CREATE_ATA_IF_NEEDED, COMPUTE_UNIT_LIMIT, COMPUTE_UNIT_PRICE_MICRO_LAMPORTS, SKIP_PREFLIGHT, ADDRESS_LOOKUP_TABLES, SIMULATE_REPLACE_RECENT_BLOCKHASH.

Library usage

From another package:

"axiom-trading-bot": "file:../axiom-trading-bot"
import {
  buildAxiomBuyTransaction,
  sendAxiomBuy,
} from "axiom-trading-bot";

Disclaimer

This code can move real funds on Solana. Verify program IDs and PDAs on-chain if anything changes. Not financial advice.

Support

If this project helped you, you can send a tip on Ethereum, BNB Smart Chain (BSC), Arbitrum, Base, Polygon, or any other EVM chain where the same 0x… address is valid for your asset:

0xB18069AB30A044A6b8D3C3C183F396E90699639f

The address string is identical on each chain; pick the network in your wallet (e.g. Ethereum mainnet vs BSC) to match the token you send. Confirm the address before sending; tips are optional and not required to use the bot.

About

axiom trading bot axiom trading bot axiom trading bot axiom trading bot axiom copy trading bot axiom copy trading bot axiom copy trading bot axiom copy trading bot axiom copy trading bot axiom copytrading bot axiom copytrading bot axiom copytrading bot axiom copytrading bot axiom copytrading bot axiom copytrading bot axiom copytrade axiom copytrade

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%