Query Parameters
- walletstringREQUIRED
The wallet address of the user who wants to perform the swap
- typestringREQUIRED
The type of swap (BUY or SELL)
- mintstringREQUIRED
The pump.fun mint address of the token to swap
- inAmountstringREQUIRED
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.
- priorityFeeLevelstring
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.
- slippageBpsstring
Slippage tolerance in basis points (defaults to 100 if not provided)
- commitmentstring
The level of commitment required for the query. The options include: 'finalized', 'confirmed', and 'processed'. (default: 'confirmed')
- feeAccountstring
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.
- platformFeeBpsinteger
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
- txstring
The base-64 encoded transaction that can be signed and submitted to the network
1{2"tx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDhFJfuBNlxQG5jMNW2cFlvP3ziXJSAcYZcZZprUoVohcr8dHxtVD0hC6gZsxjB5pMhsvU8f0Mjuy2j4Ta0vABAgIAAQwCAAAAZAAAAAAAAADZzs4JdOTfYpJfAAAAAAAA4RYZ3L/KzD9qrYEF5yW/y4TzFRISsj4PQGLvdQMZ+p0MAgABBCiIaO9Iuvk8k5pmPtj5KwgJ/eBZCCQqrX/zPLggAgAAAQUEAgADDAIAAAABfSPXwQAAAACD95/iIr/AAAAAAAAATgIVOu7QpbJZ8nQLGxDTQJwpTuGUfQEvHAI+8GHReFYGwWxPDLEhFgMZ+p0MsMu71Gt9RhJBhOK6V2vBgiNu7zt2uVzEPILSN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