Skip to main content

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

Returns instructions that you can use to swap on Pump.fun.

Updated on
Aug 09, 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.

platformFeeBps
integer

The fee in basis points the feeAccount will receive on the swap (i.e 100 = 1%). Must use with feeAccount.

Returns

instructions
array

Array of instructions to execute the swap

keys
array

Array of account keys needed for the instruction

pubkey
string

Public key of the account

isSigner
boolean

Whether this account needs to sign the transaction

isWritable
boolean

Whether this account will be written to

programId
string

The program that will process this instruction

data
array

The instruction data as an array of numbers

Request
Response
1
{
2
"instructions": [
3
{
4
"keys": [
5
{
6
"pubkey": "6Cf7nWaodsE6vH4uctqURbEhJReYypifdhhB9Rn7NByU",
7
"isSigner": true,
8
"isWritable": true
9
},
10
{
11
"pubkey": "D5hjyQvdhkCHCLG9N9urDc4vQyY5bKoaQjAP9KH1EB6N",
12
"isSigner": false,
13
"isWritable": true
14
},
15
{
16
"pubkey": "2q7jMwWYFxUdxBqWbi8ohztyG1agjQMrasUXwqGCpump",
17
"isSigner": false,
18
"isWritable": true
19
},
20
{
21
"pubkey": "So11111111111111111111111111111111111111112",
22
"isSigner": false,
23
"isWritable": false
24
},
25
{
26
"pubkey": "97e6Yj6JhdN5DMKafQeYvyP6MQ9xHpd8TKUpCmzcPQnb",
27
"isSigner": false,
28
"isWritable": true
29
},
30
{
31
"pubkey": "11111111111111111111111111111111",
32
"isSigner": false,
33
"isWritable": false
34
},
35
{
36
"pubkey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
37
"isSigner": false,
38
"isWritable": false
39
},
40
{
41
"pubkey": "SysvarRent111111111111111111111111111111111",
42
"isSigner": false,
43
"isWritable": false
44
},
45
{
46
"pubkey": "ComputeBudget111111111111111111111111111111",
47
"isSigner": false,
48
"isWritable": false
49
}
50
],
51
"programId": "PumpFunuYiVXKEh6nkJulFPmqU6hQmzHME1Gxpn7U8y",
52
"data": [
53
2,
54
0,
55
0,
56
0,
57
0,
58
0,
59
0,
60
0,
61
100,
62
0,
63
0,
64
0,
65
0,
66
0,
67
0,
68
0,
69
0
70
]
71
},
72
{
73
"keys": [
74
{
75
"pubkey": "ComputeBudget111111111111111111111111111111",
76
"isSigner": false,
77
"isWritable": false
78
}
79
],
80
"programId": "ComputeBudget111111111111111111111111111111",
81
"data": [
82
2,
83
64,
84
158,
85
217,
86
0,
87
0,
88
0,
89
0,
90
0
91
]
92
}
93
]
94
}
1
{
2
"instructions": [
3
{
4
"keys": [
5
{
6
"pubkey": "6Cf7nWaodsE6vH4uctqURbEhJReYypifdhhB9Rn7NByU",
7
"isSigner": true,
8
"isWritable": true
9
},
10
{
11
"pubkey": "D5hjyQvdhkCHCLG9N9urDc4vQyY5bKoaQjAP9KH1EB6N",
12
"isSigner": false,
13
"isWritable": true
14
},
15
{
16
"pubkey": "2q7jMwWYFxUdxBqWbi8ohztyG1agjQMrasUXwqGCpump",
17
"isSigner": false,
18
"isWritable": true
19
},
20
{
21
"pubkey": "So11111111111111111111111111111111111111112",
22
"isSigner": false,
23
"isWritable": false
24
},
25
{
26
"pubkey": "97e6Yj6JhdN5DMKafQeYvyP6MQ9xHpd8TKUpCmzcPQnb",
27
"isSigner": false,
28
"isWritable": true
29
},
30
{
31
"pubkey": "11111111111111111111111111111111",
32
"isSigner": false,
33
"isWritable": false
34
},
35
{
36
"pubkey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
37
"isSigner": false,
38
"isWritable": false
39
},
40
{
41
"pubkey": "SysvarRent111111111111111111111111111111111",
42
"isSigner": false,
43
"isWritable": false
44
},
45
{
46
"pubkey": "ComputeBudget111111111111111111111111111111",
47
"isSigner": false,
48
"isWritable": false
49
}
50
],
51
"programId": "PumpFunuYiVXKEh6nkJulFPmqU6hQmzHME1Gxpn7U8y",
52
"data": [
53
2,
54
0,
55
0,
56
0,
57
0,
58
0,
59
0,
60
0,
61
100,
62
0,
63
0,
64
0,
65
0,
66
0,
67
0,
68
0,
69
0
70
]
71
},
72
{
73
"keys": [
74
{
75
"pubkey": "ComputeBudget111111111111111111111111111111",
76
"isSigner": false,
77
"isWritable": false
78
}
79
],
80
"programId": "ComputeBudget111111111111111111111111111111",
81
"data": [
82
2,
83
64,
84
158,
85
217,
86
0,
87
0,
88
0,
89
0,
90
0
91
]
92
}
93
]
94
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free