buy, sell, and create. Use this when building web3.js clients, Anchor integrations, or instruction parsers.
For graduated tokens on PumpSwap, see the Pump.fun AMM program. For indexed market data without raw instruction building, use the Pump.fun API guide.
Prefer not to hand-build instructions? Raptor Swap API routes buys and sells across Pump.fun bonding curves and PumpSwap automatically.
Official program IDs
Base58 is case-sensitive. The official bonding-curve ID uses a lowercase
r after EF8 (6EF8rrecth…), not 6EF8rRecth….
Well-known PDAs
Solana Tracker market filters:
pumpfun (bonding curve), pumpfun-amm (graduated / PumpSwap).
Anchor IDL
Download the official Anchor IDL (mirrored from pump-fun/pump-public-docs):- JSON IDL: /idl/pump.json
- Upstream: idl/pump.json
@coral-xyz/anchor (Program, BorshInstructionCoder) for typed buy/sell calls, or keep using raw discriminators with @solana/web3.js as shown below.
Instruction discriminators
Anchor discriminators are the first 8 bytes ofsha256("global:<instruction_name>"). Match these when parsing transactions or building instructions manually.
buy / sell on the AMM reuse the same sighashes — always check the program ID (6EF8rrecth… vs pAMMBay…) when classifying trades.
On mainnet, many curve swaps use buy_exact_sol_in (0x38fc74089edfcd5f) rather than classic buy. Parsers should handle both.
Detect buy vs sell in Rust
buy instruction
Args
Accounts
Read
fee_recipient (and the fee_recipients array) from the global account. Pass fee_program = pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.
sell instruction
Args
Accounts
create instruction
Args: name: string, symbol: string, uri: string, creator: pubkeyDiscriminator:
[24, 30, 200, 40, 5, 28, 7, 119]
Newer launches often use create_v2 (Token-2022 / Mayhem / cashback fields). Prefer matching live transactions or the IDL when integrating creation flows.
Buy / sell with @solana/web3.js
Encode the Anchor discriminator, then little-endian u64 args. OptionBool is a single byte (0 or 1).
Easier path: Raptor Swap API
Stream & index with Solana Tracker
Skip running your own indexer — use Solana Tracker products that already decode Pump.fun and PumpSwap:
Docs:
- Pump.fun & bonding curves — lifecycle with Data API + Datastream
- gRPC buy/sell detection — decode with the IDL
- gRPC account streaming — bonding curve state
- Pump.fun AMM program — PumpSwap
buy/sell
Pump.fun AMM
PumpSwap program ID, IDL, and buy/sell discriminators.
Pump.fun lifecycle
Discover, track curves, graduations, and swap via Solana Tracker.
Yellowstone buy/sell
Real-time instruction parsing over gRPC.
Raptor Swap
Execute Pump.fun and PumpSwap swaps without building IXs.