post https://api.zan.top/node/v1/solana/mainnet/
Estimate priority fee for a transaction on the Solana blockchain.
Using the API
You can use the API in two ways:
transaction
: A serialized transaction. (recommended)
accountKeys
: A list of account keys involved in the transaction.
1. With a Serialized Transaction
Here’s how to get an estimated fee for a transaction:
{
"jsonrpc": "2.0",
"id": "fee-example",
"method": "getPriorityFeeEstimate",
"params": [
{
"transaction": "LxzhDW7TapzziJVHEGPh1QjmZB6kjNqmvuJ9gmihBGEkzw2N8ospDq32UZdVmKWzRZqKuyvhp7xmLvsmmHa3MfxVKpYoLV9cPkw5isHnHgDUwLSMsDaZ4dLEULexXAvuV9k6fLD2LMhFKM6gqH6j69GQLAm1g4e3z5ZVZN6pmJdSmZ4PqKcwNn4sS7E3Abp1hV59uBJB9i4jEdEAh28rZ8WCeNizzEmrJZFhatFFFGSDsk23jDPEjbkMcoRWXKf1WthFScC2S6Wz284Dtjqp7kW8eybV3DpmN9DtBbcfFNQPtUwmiBZCKszdYym5AjJvRHiUKUdMwFpC3toPnMvTmKZ9iHQtzZRkg5xBufRtUN5eVYJfdw2DxzH6RfqhC2rAjfSbfJA4wmaq9f5eUe2iEjmqvne6r85PPcHBJzyqkVtAyUFtTc9DfU8UiM9rFhQ2UB71M6m5UCsC6EwowMw5k8iF8rL7iPCLdubVdy8S58DPLNG4E4rdosev1T63YdRWSgEwBZh7iX4zGBA9AKAm3B9itCSxLSL46Y6uZgVku9UXsMcWWz3URoa6hRbo55CYPLhrVeqjqX5DsXpaG6QkngbEaESQUnkakE1AFkYXmNXEd2m3sLRTYB2o5UTkwkJS2u5sJHyYqAvXr3vFZr7qAYFLD3LwS5tsdb45ZQVQwsbnNddMHgkpmSqLHS6Fv1epxqHbzpRCU1tgMsriApVWC3pj2LLD41HxkV8aKvkVyHgJFACUtbvRBZAasHf1F71Gz3qZNTdh3efWsZJRXnfxKPbATU7NTMaMUL8JjknfoVwp3",
"options": {
"recommended": true
}
}
]
}
Response:
{
"jsonrpc": "2.0",
"result": {
"priorityFeeEstimate": 10000.0
},
"id": "fee-example"
}
2. With Account Keys
Here’s how to request all priority fee levels for Jup v6:
{
"jsonrpc": "2.0",
"id": "1",
"method": "getPriorityFeeEstimate",
"params": [
{
"accountKeys": ["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],
"options": {
"includeAllPriorityFeeLevels": true
}
}
]
}
Response:
{
"jsonrpc": "2.0",
"result": {
"priorityFeeLevels": {
"min": 0.0,
"low": 0.0,
"medium": 1.0,
"high": 26824.0,
"veryHigh": 1124014.0,
"unsafeMax": 530175841.0
}
},
"id": "1"
}
Here’s how to request the recommended priority level for Jup v6:
{
"jsonrpc": "2.0",
"id": "1",
"method": "getPriorityFeeEstimate",
"params": [
{
"accountKeys": ["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],
"options": {
"recommended": true
}
}
]
}
Response:
{
"jsonrpc": "2.0",
"result": {
"priorityFeeEstimate": 10000.0
},
"id": "1"
}
Here’s how to request the recommended priority fee excluding votes:
{
"jsonrpc": "2.0",
"id": "1",
"method": "getPriorityFeeEstimate",
"params": [
{
"accountKeys": ["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],
"options": {
"recommended": true
}
}
]
}
Response:
{
"jsonrpc": "2.0",
"result": {
"priorityFeeEstimate": 10000.0
},
"id": "1"
}