/pump-fun/swap REST API Endpoint
Please note that this method is available for Free and Paid subscribers of Metis - Jupiter V6 Swap API, along with jupiterapi.com users.
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 Metis 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 Metis users.
Returns
tx
string
The base-64 encoded transaction that can be signed and submitted to the network
Request
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free