pump-swap-sdk docs
nirholas / pump-swap-sdk

pump-swap-sdk

TypeScript SDK for the Pump Swap AMM on Solana, synced to @pump-fun/pump-swap-sdk 2.1.0 and the October 2026 program.

v2.1.0MIT
npm install @pump-fun/pump-swap-sdk

What it does

The October 2026 PumpSwap upgrade, covered end to end.

Get started

Install it, then run your first command.

npm install @pump-fun/pump-swap-sdk
CommandRuns
npm run testjest over src/__tests__
npm run linteslint src --ext .ts
npm run typechecktsc --noEmit

Read the full getting started guide

Examples

A v2 buy, and a creator-fee sweep composed with the claim it feeds.

const state = await onlineSdk.swapSolanaState(poolKey, user);
const buy = await PUMP_AMM_SDK.buyQuoteInput(state, quoteAmount, 1, { v2: true });

const sweep = await onlineSdk.sweepCreatorFeeInstruction(poolKey, coinCreator);
const collectState = await onlineSdk.collectCoinCreatorFeeSolanaState(
  coinCreator, undefined, state.pool.quoteMint,
);
const claim = await PUMP_AMM_SDK.collectCoinCreatorFee(collectState, coinCreator);
const tx = new Transaction().add(sweep, ...claim);

More examples

Reference