Skip to main content

Commission Swap Webhook Payload

Specification of webhook for commission swaps.

Updated on
Aug 9, 2024

Commission Swap Webhook Payload

Please note that this method is only available for paid subscribers on the Navigator plan of Metis - Jupiter V6 Swap API.

Parameters

event_type
string
REQUIRED
The type of event we have detected. Must be `swap_tokens` for this webhook.
body
object
REQUIRED
The details for this event
tx
string
REQUIRED
The transaction as an unsigned encoded string.
tx_type
string
REQUIRED
The type of transaction we are sending you. Must be one of `versioned_transaction` or `transaction`.
amount_in
integer
REQUIRED
The amount of the token you were paid in commission we are going to swap.
quote
object
REQUIRED
The quote we used to generate this swap.
inputMint
string
REQUIRED
The source token's mint address
inAmount
string
REQUIRED
The amount of the source token being swapped
outputMint
string
REQUIRED
The destination token's mint address
outAmount
string
REQUIRED
The amount of the destination token received after the swap
otherAmountThreshold
string
REQUIRED
A threshold amount for the destination token
swapMode
string
REQUIRED
Indicates the swap mode
slippageBps
integer
REQUIRED
Slippage tolerance in basis points
platformFee
object
REQUIRED
The platform Fee object which contains the following fields:
amount
string
REQUIRED
The amount of the platform fee
feeBps
integer
REQUIRED
The fee percentage in basis points
priceImpactPct
string
REQUIRED
The percentage of price impact due to the swap
routePlan
array
REQUIRED
An array containing detailed information about each step of the swap process
swapInfo
object
REQUIRED
Detailed information about a specific swap step
ammKey
string
REQUIRED
The key identifying the Automated Market Maker (AMM) responsible for the swap
label
string
REQUIRED
A label or identifier for the AMM
inputMint
string
REQUIRED
The mint address of the token being swapped from in this step
outputMint
string
REQUIRED
The mint address of the token being received in this step
inAmount
string
REQUIRED
The amount of the token being swapped from in this step
outAmount
string
REQUIRED
The amount of the token being received after the swap in this step
feeAmount
string
REQUIRED
The amount of fee charged for this step of the swap
feeMint
string
REQUIRED
The mint address of the token used for paying fees in this step
percent
integer
REQUIRED
The percentage allocation of the swap for this step
contextSlot
integer
REQUIRED
A contextual identifier
wallet_pubkey
string
REQUIRED
The wallet pubkey we used to generate the unsigned transaction here.

Returns

This method returns nothing
Request
1
{
2
"event_type": "swap_tokens",
3
"body": {
4
"tx": "02c05c1500030417010000000000e517cb977ae3ad2a01000000076400014461df0c0000000003b3313008490000320000094461df0c000000000000000000000000A0Rh3wwAAAAAAAAAAAAAAAABAAAAAAAAAOR6TysAAAAA35fG5R6HSQWFUhNk7gAAAA7SiLHjSAAA",
5
"tx_type": "versioned_transaction",
6
"amount_in": 100000000,
7
"quote": {
8
"inputMint":"So11111111111111111111111111111111111111112",
9
"inAmount":"100000000",
10
"outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
11
"outAmount":"16288231",
12
"otherAmountThreshold":"16206790",
13
"swapMode":"ExactIn",
14
"slippageBps":50,
15
"platformFee":null,
16
"priceImpactPct":"0",
17
"routePlan": [
18
{
19
"swapInfo": {
20
"ammKey":"6tpEjdVoV7spGbE4RdXNxmRXbw4wb5ouLupDWpLYZyNH",
21
"label":"Raydium CLMM",
22
"inputMint":"So11111111111111111111111111111111111111112",
23
"outputMint":"KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS",
24
"inAmount":"100000000",
25
"outAmount":"394619527",
26
"feeAmount":"210000",
27
"feeMint":"So11111111111111111111111111111111111111112"
28
},
29
"percent":100
30
},
31
{
32
"swapInfo": {
33
"ammKey":"3kMz4sh9M5NHctkKFRsfxqgyrKnJAszSnno7XxATK5Q3",
34
"label":"Meteora DLMM",
35
"inputMint":"KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS",
36
"outputMint":"85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ",
37
"inAmount":"394619527",
38
"outAmount":"47724606",
39
"feeAmount":"1183975",
40
"feeMint":"KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS"
41
},
42
"percent":100
43
},
44
{
45
"swapInfo": {
46
"ammKey":"8dFTCTAbtGuHsdDL8WEPrTU6pXFDrU1QSjBTutw8fwZk",
47
"label":"Phoenix",
48
"inputMint":"85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ",
49
"outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
50
"inAmount":"47724606",
51
"outAmount":"16288231",
52
"feeAmount":"8149",
53
"feeMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
54
},
55
"percent":100
56
}
57
],
58
"contextSlot":277930679,
59
"timeTaken":0.910655469
60
},
61
"wallet_pubkey": "CL4KcMhPpEeNmR7rK7RHsLSTqshoYpasSxHHhduamfe6"
62
}
63
}
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free