# Pump.fun (/docs/nodes/defi/pump-fun)

Memecoin discovery, trading, launch, and fee claims on Pump.fun.



Pump.fun is Solana's memecoin launchpad. The Pump.fun node supports token discovery, price checks, on-chain buy/sell, new token launches, and creator-fee / cashback claims.

Prerequisites [#prerequisites]

* **Read operations**: No credential required
* **All on-chain operations** (buy, sell, createToken, claimFees, claimCashback): Connected Privy wallet (transactions are signed through your embedded wallet)

Operations [#operations]

| Operation        | Description                                                                                                                                           | Requires wallet |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| getCoin          | Frontend API metadata (name, image, socials, market cap)                                                                                              | No              |
| getTokenInfo     | On-chain protocol state (bonding progress, graduated flag, creator, mayhem/cashback, PumpSwap pool info when graduated)                               | No              |
| getTopRunners    | Raw top-runners list, flattened + enriched with `priceSol`/`bondingProgressPct`                                                                       | No              |
| getTrending      | Top-runners padded from the recommended pool, deduped by mint                                                                                         | No              |
| getRecommended   | Pump.fun-curated recommended tokens                                                                                                                   | No              |
| getNew           | Recently launched, sorted by `created_timestamp` desc                                                                                                 | No              |
| getGraduating    | Still on the bonding curve, sorted by `real_sol_reserves` desc (closest to graduation first)                                                          | No              |
| getCurrentlyLive | Tokens currently in the bonding curve phase                                                                                                           | No              |
| search           | Free-text filter against name/symbol/description across the top-300 recommended                                                                       | No              |
| getSolPrice      | Current SOL price in USD                                                                                                                              | No              |
| buy              | Buy a token with SOL                                                                                                                                  | Yes             |
| sell             | Sell tokens for SOL                                                                                                                                   | Yes             |
| createToken      | Launch a new token via `create_v2` (uploads metadata to pump.fun IPFS or accepts a pre-hosted URI, optionally includes an initial buy in the same tx) | Yes             |
| claimFees        | Collect accrued creator fees from both the pump.fun bonding-curve vault (SOL) and the PumpSwap AMM vault (WSOL)                                       | Yes             |
| claimCashback    | Claim accrued volume-based cashback from the pump.fun bonding-curve program                                                                           | Yes             |

All discovery ops return a **normalized token list** - each entry has at least
`mint`, `name`, `symbol`, `priceSol`, and `bondingProgressPct` so downstream
nodes can reference `{pumpfunResponse.data[0].name}` regardless of which op
produced the list. `priceSol` / `bondingProgressPct` may be `null` when the
upstream endpoint doesn't include reserve data.

Automatic routing [#automatic-routing]

Buy and sell operations transparently route based on the token's state:

* **Bonding curve** - while the token is still on the Pump.fun bonding curve
* **PumpSwap AMM** - once the token has graduated from the bonding curve

You don't need to configure the route; the node detects it at run time.

Configuration [#configuration]

Every numeric and boolean field below accepts either a literal value or a
`{varName.path}` template resolved at run time against upstream node
outputs - e.g. `solAmount: "{trigger.amount}"`,
`slippageBps: "{aiDecision.bps}"`, or `dryRun: "{gate.simulate}"`.
Boolean templates resolve `true`/`false`, `1`/`0`, and `yes`/`no`
(case-insensitive) after substitution. Each boolean field in the config UI
has a "Use {"{template}"}" toggle that swaps the checkbox for a template
input. Literal values are bounds-checked in the config UI; templates are
validated at run time after substitution.

| Field                          | Type                | Required                          | Description                                                                                                                                                                                             |
| ------------------------------ | ------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mintAddress                    | string              | For getCoin/getTokenInfo/buy/sell | Token mint address (template-aware)                                                                                                                                                                     |
| query                          | string              | For search                        | Case-insensitive substring match against name/symbol/description                                                                                                                                        |
| solAmount                      | number \| template  | For buy                           | SOL amount to spend                                                                                                                                                                                     |
| tokenAmount                    | number \| template  | For sell (unless sellAll)         | Token amount to sell (whole tokens)                                                                                                                                                                     |
| sellAll                        | boolean \| template | No                                | Sell the entire wallet balance; overrides tokenAmount. When templated, `tokenAmount` must also be set as a fallback for the case where the template resolves `false`                                    |
| dryRun                         | boolean             | No                                | Simulate the transaction against the RPC without broadcasting (no funds spent; for `createToken`, also skips the IPFS upload)                                                                           |
| slippageBps                    | number \| template  | No                                | Slippage in basis points (default: 1500, range: 0-10000; 0 enforces the exact min-out, 10000 = 100%). Values above 5000 are useful for illiquid pools but may fill far from the quoted price.           |
| priorityFee                    | number \| template  | No                                | microLamports/CU tip (0-10,000,000). Blank = venue default (buy: 200k · PumpSwap: 10k · launch: 500k · claim: 200k)                                                                                     |
| computeUnits                   | number \| template  | No                                | CU limit for the tx (10,000-1,400,000). Blank = venue default                                                                                                                                           |
| confirm                        | boolean             | No                                | Wait for on-chain confirmation (default: true)                                                                                                                                                          |
| limit                          | number \| template  | No                                | Results limit, 1-300 (default: 20)                                                                                                                                                                      |
| offset                         | number \| template  | No                                | Pagination offset (>= 0)                                                                                                                                                                                |
| includeNsfw                    | boolean             | No                                | Include NSFW tokens (default: false)                                                                                                                                                                    |
| name                           | string              | For createToken                   | Token display name (≤32 UTF-8 bytes, Metaplex cap)                                                                                                                                                      |
| symbol                         | string              | For createToken                   | Token ticker (≤10 UTF-8 bytes)                                                                                                                                                                          |
| description                    | string              | For createToken upload mode       | Description shown on pump.fun. Required unless `metadataUri` is supplied                                                                                                                                |
| imageUrl                       | string              | No                                | Remote image URL - fetched server-side and streamed into the pump.fun IPFS upload. Upload mode only                                                                                                     |
| metadataUri                    | string              | For createToken URI mode          | Pre-hosted metadata JSON URL (http/https, ≤200 bytes). When set, skips IPFS upload; `description`/`imageUrl`/socials are ignored. `name` + `symbol` are still required (stored on-chain by `create_v2`) |
| twitter \| telegram \| website | string              | No                                | Optional socials echoed into the IPFS form. Upload mode only                                                                                                                                            |
| initialBuySol                  | number \| template  | No                                | Optional SOL amount to spend immediately after creation in the same tx. No slippage control on a fresh curve - matches reference CLI semantics                                                          |
| isMayhem                       | boolean \| template | No                                | Launch in mayhem mode (affects fee recipient and cashback)                                                                                                                                              |
| isCashback                     | boolean \| template | No                                | Enable volume-based cashback on this token - buyers accrue claimable rewards                                                                                                                            |

Output (getCoin) [#output-getcoin]

```json
{
  "success": true,
  "operation": "getCoin",
  "mint": "TokenMintAddress123...",
  "data": {
    "mint": "TokenMintAddress123...",
    "name": "Example Token",
    "symbol": "EXT",
    "market_cap": 125000,
    "usd_market_cap": 125000
  }
}
```

Output (getTokenInfo) [#output-gettokeninfo]

On-chain protocol state. When the token has graduated, `priceSol` switches from
bonding-curve spot to PumpSwap pool spot, and pool fields are populated. If the
PumpSwap pool lookup fails on a graduated token, the bonding-curve snapshot is
returned with `pumpswapWarning` / `pumpswapError` attached.

```json
{
  "success": true,
  "operation": "getTokenInfo",
  "mint": "TokenMintAddress123...",
  "data": {
    "mint": "TokenMintAddress123...",
    "bondingCurve": "BondingCurvePda...",
    "priceSol": 0.00003,
    "bondingProgressPct": 23.5,
    "graduated": false,
    "realSolReserves": 20.0,
    "virtualSolReserves": 30.0,
    "virtualTokenReserves": "1000000000000",
    "creator": "CreatorPubkey...",
    "isMayhemMode": false,
    "isCashbackEnabled": false
  }
}
```

Output shape - all operations [#output-shape---all-operations]

Every Pump.fun operation (reads and trades) returns the same outer envelope:

```
{ success, operation, mint?, data }
```

Downstream nodes always reference fields via `{responseName.data.<field>}` -
e.g. `{pumpfunResponse.data.txHash}` on a trade, `{pumpfunResponse.data.name}`
on `getCoin`. `mint` is omitted on operations that don't take one
(`getTopRunners`, `getSolPrice`, `getRecommended`, `getCurrentlyLive`).

Output (buy) [#output-buy]

```json
{
  "success": true,
  "operation": "buy",
  "mint": "TokenMintAddress123...",
  "data": {
    "venue": "bonding_curve",
    "walletAddress": "UserWallet...",
    "solAmount": 0.1,
    "estimatedTokens": 3250.4,
    "minTokens": 2762.9,
    "slippageBps": 1500,
    "priceSol": 0.00003,
    "bondingProgressPct": 23.5,
    "confirmed": true,
    "txHash": "5Lbm..."
  }
}
```

For a graduated token, `venue` becomes `"pumpswap"` and `bondingProgressPct` is
replaced by `poolPrice`. `bondingProgressPct` is a 0–100 percent (one decimal),
matching `getTokenInfo`. Dry-run results additionally include `dryRun: true`,
`simulated: true`, `unitsConsumed`, `logs`, `error`, and `balanceWarning`.

Output (sell) [#output-sell]

```json
{
  "success": true,
  "operation": "sell",
  "mint": "TokenMintAddress123...",
  "data": {
    "venue": "pumpswap",
    "walletAddress": "UserWallet...",
    "tokensSold": 1000,
    "estimatedSol": 0.0312,
    "minSol": 0.0265,
    "slippageBps": 1500,
    "confirmed": true,
    "txHash": "5Lbm..."
  }
}
```

Preflight failures [#preflight-failures]

Both buy and sell preflight the wallet's SOL balance before broadcasting. A live
trade with insufficient SOL throws before spending any funds - `Insufficient SOL
for sell fees. Have X SOL, need ~Y SOL.` (or the `buy` equivalent). A dry-run
attaches the same information as `data.balanceWarning` instead of throwing so
the workflow can inspect it.

Output (createToken) [#output-createtoken]

```json
{
  "success": true,
  "operation": "createToken",
  "mint": "NewMintAddress...",
  "data": {
    "mint": "NewMintAddress...",
    "bondingCurve": "BondingCurvePda...",
    "name": "Example Coin",
    "symbol": "EXM",
    "metadataUri": "https://...",
    "uploadedMetadata": true,
    "isMayhem": false,
    "isCashback": false,
    "initialBuySol": 0.01,
    "walletAddress": "UserWallet...",
    "templateHint": "Use {pumpfunResponse.mint} in downstream nodes. Explorer: https://solscan.io/token/...",
    "pumpUrl": "https://pump.fun/coin/...",
    "explorer": "https://solscan.io/token/...",
    "confirmed": true,
    "bondingCurveVerified": true,
    "txHash": "5Lbm...",
    "txExplorer": "https://solscan.io/tx/..."
  }
}
```

`mint` is surfaced at the top level so downstream nodes can reference it as
`{pumpfunResponse.mint}` - the canonical way to chain follow-up work after a
launch (e.g. post to Telegram, set an alert, auto-buy more). `uploadedMetadata`
is `true` when we uploaded to pump.fun IPFS and `false` when you supplied a
pre-hosted `metadataUri`. On a dry run, `metadataUriPlaceholder: true` and a
`metadataNote` indicate a synthetic URI was used - **IPFS is not touched during
dry-run**, and balance/validation failures in live mode also skip the upload.

Signing + integrity [#signing--integrity]

`createToken` requires two signers: your Privy wallet (fee payer) and a fresh
mint keypair. The mint keypair is generated in-memory for one transaction and
never persisted. To avoid undocumented mutations to the transaction message,
the node calls Privy's `signTransaction` (not `signAndSendTransaction`), then
performs a byte-level integrity check on Privy's response before broadcasting:
serialized message bytes must be unchanged, the mint signature must survive the
round-trip, and Privy must have added at least one user signature. Any
discrepancy aborts before broadcast.

Output (claimFees) [#output-claimfees]

Collects accrued creator fees from both vaults (skips either when empty). When
neither vault has a balance, returns `success: false` with `error: "no_fees"`
so downstream conditions can branch cleanly.

```json
{
  "success": true,
  "operation": "claimFees",
  "data": {
    "walletAddress": "UserWallet...",
    "pumpRecoveredSol": 0.123,
    "pumpswapRecoveredSol": 0.045,
    "totalRecoveredSol": 0.168,
    "wsolNote": "PumpSwap fees land as WSOL in your Wrapped SOL ATA. Unwrap manually or via Jupiter to get native SOL.",
    "createdWsolAta": true,
    "confirmed": true,
    "txHash": "5Lbm...",
    "txExplorer": "https://solscan.io/tx/..."
  }
}
```

PumpSwap fees land as WSOL in your creator WSOL ATA - the node does not auto-unwrap
because that would require closing the ATA and could nuke any pre-existing WSOL
balance. Use the Jupiter node or any Solana wallet to unwrap when you're ready.

Output (claimCashback) [#output-claimcashback]

Claims accrued volume-based cashback. When the user's volume-accumulator PDA
doesn't exist, returns `success: false` with `error: "no_accumulator"`. Note:
an existing accumulator with zero claimable cashback is NOT detected
client-side - the on-chain program is the authoritative source and the tx
will revert at runtime if there's nothing to claim.

```json
{
  "success": true,
  "operation": "claimCashback",
  "data": {
    "walletAddress": "UserWallet...",
    "accumulator": "UserVolAccumulatorPda...",
    "confirmed": true,
    "txHash": "5Lbm...",
    "txExplorer": "https://solscan.io/tx/..."
  }
}
```

Common use cases [#common-use-cases]

* Monitor new token launches and filter by market cap
* Automate memecoin buys when conditions are met (combine with AI or Condition node)
* Track top runners and send alerts via Telegram

Next steps [#next-steps]

* [Jupiter](/docs/nodes/defi/jupiter) - swap on established tokens
* [Birdeye](/docs/nodes/data/birdeye) - deeper token analytics
