Skip to main content

/pump-fun/swap REST API Endpoint - Swap API

Returns a transaction that you can use to swap on Pump.fun.

Updated on
Oct 14, 2026
Please note that this method is only available for paid subscribers of Swap API.
Solana Kit includes the ability to customize RPC methods and transports, allowing you to seamlessly integrate Quicknode add-ons into your applications. For more information on how to use Quicknode add-ons with Solana Kit, check out these guides: How to Use Quicknode Add-ons using Solana Kit (Part 1) and How to Use Quicknode Add-ons using Solana Kit (Part 2)

Query Parameters

wallet
string
REQUIRED

The wallet address of the user who wants to perform the swap

type
string
REQUIRED

The type of swap (BUY or SELL)

mint
string
REQUIRED

The pump.fun mint address of the token to swap

inAmount
string
REQUIRED

The input amount for the swap. For type = BUY, the input token is SOL and its being swapped for the provided pump.fun token (mint). For type = SELL, the input token is the pump.fun mint token being sold, which is provided in the mint field. Note: All Pump.fun mints have 6 decimals. Specified amount should include those decimals here, e.g. Selling 100 tokens should be passed as 100000000.

priorityFeeLevel
string

Priority fee level for the transaction (low, medium, high, extreme). If you set a priority fee level, the transaction will be simulated before returning a response. If the simulation fails, the method will throw.

slippageBps
string

Slippage tolerance in basis points (defaults to 100 if not provided)

commitment
string

The level of commitment required for the query. The options include: 'finalized', 'confirmed', and 'processed'. (default: 'confirmed')

feeAccount
string

The wallet address of the user who wants to collect a fee on the swap. Must use with platformFeeBps. This feature is only available for paid Swap API users.

platformFeeBps
integer

The fee in basis points the feeAccount will receive on the swap (i.e 100 = 1%). Must use with feeAccount. This feature is only available for paid Swap API users.

Returns

tx
string

The base-64 encoded transaction that can be signed and submitted to the network

Request
Response
1
{
2
"tx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDhFJfuBNlxQG5jMNW2cFlvP3ziXJSAcYZcZZprUoVohcr8dHxtVD0hC6gZsxjB5pMhsvU8f0Mjuy2j4Ta0vABAgIAAQwCAAAAZAAAAAAAAADZzs4JdOTfYpJfAAAAAAAA4R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