Lightweight SDK for trading PumpSwap coins (Pump.fun migrated coins) with optional low-latency transaction landing for HFT/algo/sniping workflows.
- Buy/sell with a few RPC calls
- Fetch pool and price data
- Integrated low-latency transaction landing providers:
- Jito
- Nozomi (https://use.temporal.xyz/)
- 0slot (https://0slot.trade/)
- BlockRazor (https://www.blockrazor.io/)
- bloXroute (https://docs.bloxroute.com/)
This SDK can route signed transactions to one or more landing providers in parallel for faster inclusion.
Operational notes:
- Providers often require API keys and may expose health endpoints or WebSockets for tip data.
- For best latency, deploy close to your selected providers and use HTTP keep-alive every 60s.
- Warm up connections (health pings) before burst submissions.
- Use fresh recent blockhashes and avoid reusing expired ones.
- Prefer parallel submission for time-sensitive trades.
- Monitor provider responses and adjust routing in real time.
- Install
npm i- Configure
- Copy
.env.copyto.env - Fill in required keys:
- Private key (base58 or JSON array depending on your setup)
- RPC (Helius or any performant mainnet endpoint)
- Any provider API keys you plan to use (Jito/Nozomi/0slot/etc.)
- Build/Run
- Use the examples below in your own script or integrate the SDK in your app.
import { PublicKey } from '@solana/web3.js';
import { wallet_1 } from './constants';
import { PumpSwapSDK } from './pumpswap';
async function main() {
const mint = 'your-pumpfun-token-address';
const solAmt = 0.99; // buy ~1 SOL worth using WSOL
const sellPercentage = 0.5; // sell 50%
const sdk = new PumpSwapSDK();
await sdk.buy(new PublicKey(mint), wallet_1.publicKey, solAmt);
await sdk.sell_percentage(new PublicKey(mint), wallet_1.publicKey, sellPercentage);
await sdk.sell_exactAmount(new PublicKey(mint), wallet_1.publicKey, 1000); // sell exact tokens
}import { PublicKey } from '@solana/web3.js';
import { getPrice } from './pool';
async function main() {
const mint = new PublicKey('your-pumpfun-token-address');
console.log(await getPrice(mint));
}import { PublicKey } from '@solana/web3.js';
import { getPumpSwapPool } from './pool';
async function main() {
const mint = new PublicKey('your-pumpfun-token-address');
console.log(await getPumpSwapPool(mint));
}- Discord: https://discord.gg/dc3Kh3Y3yJ
- Pool logic adapted from: https://github.com/ElmTheDev/pumpswap (see
pool.ts)