Swap Quote (Read-Only)
pumpfun_quote_swapRead-only price quote for a pump.fun AMM (PumpSwap) swap. No signing or tx sending. One of inputMint/outputMint must be wSOL (So11111111111111111111111111111111111111112). Only GRADUATED coins have an AMM pool; for a coin still on its bonding curve use get_bonding_curve instead. Pricing runs on the pool effective quote reserves (quote vault balance + pool.virtual_quote_reserves, a SIGNED i128 that is commonly negative because PumpSwap v2 trades keep waiting protocol and creator fees in the vault and subtract them there); the base side is the raw base vault balance. Returns amountOut, priceImpactBps, route, expiresAtMs, plus the reserves the quote was computed from so the number can be reproduced. Use this to size a trade on a graduated coin, or to measure its pool depth, before executing anywhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | mainnet | |
| amountIn | Yes | Input amount in raw base units (lamports for SOL). | |
| inputMint | Yes | Input token mint (base58). | |
| outputMint | Yes | Output token mint (base58). | |
| slippageBps | No | Slippage tolerance in basis points (default 100 = 1%). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| route | Yes | AMM pool address the quote routes through (base58) | |
| amountOut | Yes | Expected output amount in raw base units | |
| expiresAtMs | Yes | Epoch ms after which the quote is stale | |
| base_reserve | No | Raw base vault balance. Unchanged by the virtual-reserve rollout. | |
| quote_reserve | No | Raw quote vault balance, before virtual reserves are added. Includes protocol and creator fees waiting for a sweep, so it overstates liquidity on its own; price on effective_quote_reserve. | |
| priceImpactBps | Yes | Price impact in basis points | |
| virtual_quote_reserves | No | Pool.virtual_quote_reserves, a SIGNED i128 serialized as a decimal string. Positive values add depth held outside the vault; negative values remove fees that sit in the vault waiting for a sweep (common since the PumpSwap v2 trades). Parse it as a signed integer: never unsigned, never clamped to 0, never absolute-valued. | |
| effective_quote_reserve | No | quote_reserve + virtual_quote_reserves (signed addition). This is what the quote is priced against; the program guarantees it is never negative. |