exchange.IO("pump.*", ...)
Discover new coins on the pump.fun bonding curve, read the curve state, quote, buy and sell; graduated coins trade through Jupiter swaps automatically.
exchange.IO(k)
exchange.IO(k, options)
exchange.IO(k, mint)
exchange.IO(k, mint, side, amount)
exchange.IO(k, mint, solAmount)
exchange.IO(k, mint, solAmount, options)
exchange.IO(k, mint, amount, options)
exchange.IO(k, wallet)Examples
-
Discover new coins and quote them on the curve (read-only).
javascriptfunction main() { var coins = exchange.IO("pump.new", {limit: 10}) if (!coins) { Log("Query failed:", GetLastError()) return } for (var i = 0; i < coins.length; i++) { var c = coins[i] if (c.quote != "SOL") { continue } var info = exchange.IO("pump.info", c.mint) var q = exchange.IO("pump.quote", c.mint, "buy", 0.1) if (!info || !q) { continue } Log(_D(c.time), c.symbol, c.mint, "progress", info.progress.toFixed(2) + "%", "market cap", info.marketCap.toFixed(2), "SOL", "0.1 SOL buys", q.amountOut, "impact", q.priceImpactPct.toFixed(2) + "%") } } -
Poll for new coins, buy when the quote looks right, check the holdings, then sell everything.
javascriptfunction main() { var since = Date.now() var seen = {} while (true) { var coins = exchange.IO("pump.new", {limit: 20, since: since}) || [] for (var i = 0; i < coins.length; i++) { var c = coins[i] if (seen[c.mint] || c.quote != "SOL" || c.mayhem || c.cashback) { continue } seen[c.mint] = true if (c.devBuy && c.devBuy.quoteAmount > 1) { continue // the creator's first buy is too large } var q = exchange.IO("pump.quote", c.mint, "buy", 0.01) if (!q || q.priceImpactPct > 5) { continue } var r = exchange.IO("pump.buy", c.mint, 0.01, {slippage: 0.2, priorityFee: 0.0005}) if (!r) { Log("Buy failed:", GetLastError()) continue } Log("Bought", r.tokenAmount, c.symbol, "for", r.solAmount, "SOL", r.txHash) Sleep(30 * 1000) var h = exchange.IO("pump.holdings") || [] h.forEach(function(x) { Log("holding", x.mint, x.amount, "value", x.value, "SOL") }) var s = exchange.IO("pump.sell", c.mint, "all", {slippage: 0.2}) Log("Sold:", s ? s.solAmount + " SOL " + s.txHash : GetLastError()) return } Sleep(1000) } } -
Simulate a buy only, without signing or sending.
javascriptfunction main() { var coins = exchange.IO("pump.new", {limit: 5}) if (!coins || coins.length == 0) { Log("No new coins:", GetLastError()) return } var r = exchange.IO("pump.buy", coins[0].mint, 0.01, {dryRun: true}) if (!r) { Log("Simulation error:", GetLastError()) return } Log("simulation", r.ok ? "ok" : "failed", r.simulationError || "", "expected", JSON.stringify(r.expected), "compute units", r.unitsConsumed) }
Returns
| Type | Description |
object / array / null value |
|
Arguments
| Name | Type | Required | Description |
k | string | Yes | The command: |
mint | string | No | The coin's mint address ( |
side | string | No | Direction of |
amount | number / string | No |
|
solAmount | number | No | The SOL |
options | object | No |
|
wallet | string | No | The wallet |
See Also
Jupiter exchange.IO exchange.IO("route") exchange.IO("dexes") exchange.IO("priorityFee") exchange.IO("receipt") exchange.Buy
Remarks
Commands
| Command | Arguments | Purpose |
|---|---|---|
pump.new | [options] | Discover recently created coins on chain |
pump.info | mint | Bonding-curve state: reserves, price, market cap, progress, fees |
pump.quote | mint, side, amount | Local quote (no transaction) |
pump.buy | mint, solAmount[, options] | Buy for solAmount SOL |
pump.sell | mint, amount[, options] | Sell amount coins or all |
pump.holdings | [wallet] | pump.fun coins held by a wallet, valued on the curve |
These commands trade coins on the bonding curve of the pump.fun program (6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P) directly, not through Jupiter: the connector builds, simulates and signs the transactions itself, with the on-chain program's quote formula and fees.
pump.new
Lists the recent signatures of the pump.fun mint authority (TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM, which appears only in creation transactions) and parses each creation transaction's CreateEvent, newest first. options.limit is how many creation transactions to look at (20 by default, at most 100), options.since a millisecond timestamp: only coins created after it are returned. Parsed transactions are cached in the process, so polling fetches only new ones (one getSignaturesForAddress plus one getTransaction per new transaction). Creation transactions that failed on chain are not listed.
Each item is {signature, slot, time, mint, name, symbol, uri, creator, user, bondingCurve, tokenProgram, quote, quoteMint, mayhem, cashback, holderReward, devBuy}: time is the block time (milliseconds); user is the wallet that sent the creation (usually the creator); tokenProgram is spl-token or token-2022; quote is SOL, USDC or the quote token's mint; devBuy is the first buy in the same transaction, {tokens, quoteAmount} (quoteAmount includes fees), or null. name, symbol and uri are whatever the creator chose; rely on the mint address.
pump.info
One getMultipleAccounts reads the curve, mint, global config and fee table and returns {mint, bondingCurve, creator, tokenProgram, decimals, quote, quoteMint, complete, migrated, virtualTokenReserves, virtualQuoteReserves, realTokenReserves, realQuoteReserves, tokenTotalSupply, price, marketCap, progress, fees, mayhem, cashback, holderReward}: reserves and supply are in readable units; price is the quote (SOL) value of one coin and marketCap is price times the total supply; progress is the share of the curve sold (%), and at 100 the curve is complete (complete) and then migrates to PumpSwap (migrated, reserves zeroed, price, marketCap and fees null); fees is the current rate {protocolBps, creatorBps} in basis points. A coin that is not a pump.fun coin is an error.
pump.quote
Quotes locally with the on-chain program's formula and fees and returns {venue, mint, side, quote, amountIn, amountOut, price, spotPrice, priceAfter, priceImpactPct, fees, protocolFeeBps, creatorFeeBps, crossesCurve}: venue is pump; amountIn and amountOut are what is paid and received (SOL and coins for a buy, coins and SOL for a sell); price is the average fill price including fees (SOL per coin), spotPrice the current price and priceAfter the price after the trade; priceImpactPct is how far the average price before fees is from the current price (%); fees is the protocol plus creator fee (SOL); crossesCurve true means the buy goes past the end of the curve (see below). A sale is paid from the SOL on the curve (realQuoteReserves), and more than that is an error.
Once the curve is complete (graduated) the quote comes from Jupiter (exact input on MINT_SOL), with venue jupiter plus route (the liquidity sources used), priceImpactPct Jupiter's estimated price impact (%) and spotPrice, priceAfter, fees, protocolFeeBps and creatorFeeBps null; it fails when Jupiter has no route.
pump.buy and pump.sell
- A buy is exact input: it spends
solAmountSOL (fees included), creates the wallet's token account idempotently and sendsbuy_exact_quote_in_v3with a minimum output of the local quote × (1 −slippage). A sell sendssell_v3with a minimum SOL output of the local quote × (1 −slippage); selling more than the balance fails without sending. Both minimums are enforced on chain; when missed the whole transaction fails and only the network fee is paid. - The node simulates before sending, and a failed simulation is not sent and is reported (pump.fun error codes with their names, such as
BuySlippageBelowMinTokensOut). Waiting for confirmation follows the concentrated-liquidity rules: when it cannot be decided, the error saysoutcome is unknownwith the signature. - Result
{txHash, venue, mint, side, solAmount, tokenAmount, price, fee, slot}:solAmountis the SOL paid for a buy (protocol and creator fees included, network fee and account deposits excluded) or received for a sell (fees deducted);tokenAmountis the coins traded, from the on-chain events;feeis the network fee (SOL). Withwaitfalsethe result is{txHash, venue, mint, side, pending, lastValidBlockHeight, expected}(expectedis the local quote); withdryRunit is{dryRun, venue, mint, side, payer, ok, simulationError, logs, unitsConsumed, txBytes, solAmount, tokenAmount, price, expected}, with the fill taken from the simulated on-chain events.
| Order option | Description |
|---|---|
slippage | [0, 1), default 0.05 |
priorityFee | The transaction's total priority fee (SOL, 0 to 1); without it the 75th percentile of recent fees paid by transactions writing the same accounts, capped by exchange.IO("priorityFee") |
computeUnitLimit | The compute-unit limit; default: the simulated usage plus headroom |
dryRun | true simulates only, without signing or sending |
payer | Only with dryRun: simulate with this wallet paying |
wait | Default true waits for confirmation and reports the fill from the on-chain events; false returns right after the broadcast |
closeAccount | pump.sell only: selling all closes the wallet's token account in the same transaction and returns its deposit by default; false keeps it |
pump.holdings
The coins in the wallet's token balances that have a bonding curve, as [{mint, amount, quote, complete, price, value}]: value is the quote (fees deducted) that selling the whole balance on the curve would return now; price and value are null once the curve is complete or when the balance exceeds what the curve can buy back (value graduated coins with exchange.IO("route")).
Limits and graduation
- SOL-quoted coins only: coins quoted in USDC or another token (
quoteofpump.new) and cashback coins fail inpump.buyandpump.sell; cashback coins can be traded through Jupiter withexchange.Buyandexchange.SellonMINT_SOL. - Buying past the curve: when a buy exceeds what is left on the curve (except mayhem coins), the excess fills at the price of the PumpSwap pool it migrates to and
crossesCurveistrue; the curve then cannot trade until migration completes. A mayhem-coin buy beyond what is left is an error. - Graduation: for a coin whose curve is complete,
pump.buyandpump.sellswap at market through this exchange object's Jupiter swaps (pairMINT_SOL, protected by the order'sslippage, which Jupiter requires below 0.5), andvenueisjupiterwithroute; thepriorityFeeandcomputeUnitLimitoptions are then errors (the priority-fee cap isexchange.IO("priorityFee")), anddryRunis not supported (quote withpump.quote). For a short time after the curve completes and before migration, both paths may fail. - Fees: protocol and creator fees follow the Pump Fees program's tiers by market cap (
pump.infoandpump.quotereturn the actual rates), plus network and priority fees. The first buy of a coin creates a token account (about 0.002 SOL deposit); the wallet's first pump.fun trade also creates its volume account (about 0.0018 SOL, not returned). - Public nodes are rate-limited per second and slow; for sniping, configure your own paid node in the node address setting and pay enough
priorityFee, or transactions may expire during congestion.
Risks
- Most new coins go to zero quickly; creators or wallets bundled with them often buy in the creation transaction or the next few blocks and can dump at any time.
- Sniping bots and MEV are fierce: a wide slippage invites sandwich attacks that fill at the worst price.
- Names, symbols and metadata links can impersonate well-known projects; rely on the mint address.
- Protocol, creator, network and priority fees are paid on every trade, so frequent in-and-out trading is costly.