getRecentPrioritizationFees
Explore getRecentPrioritizationFees: Use Cases, Code Examples, Parameters, Response Format, and Pro Tips
Last updated
[
{ "slot": 12345678, "prioritizationFee": 5000 },
{ "slot": 12345677, "prioritizationFee": 0 },
…
]const fetch = require('node-fetch');
async function getRecentPrioritizationFees(rpcUrl) {
try {
const response = await fetch(rpcUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'getRecentPrioritizationFees',
"params": [[
"Vote111111111111111111111111111111111111111",
"Stake11111111111111111111111111111111111111"
]]
}),
});
const data = await response.json();
// Print the exact full response
console.log('Full RPC Response:');
console.log(JSON.stringify(data, null, 2));
return data;
} catch (error) {
console.error('Error getting health:', error.message);
return null;
}
}
// Example usage
const RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key';
getRecentPrioritizationFees(RPC_URL);import requests
import json
def get_recent_prioritization_fees(rpc_url):
try:
response = requests.post(
rpc_url,
headers={
'Content-Type': 'application/json',
},
json={
'jsonrpc': '2.0',
'id': 1,
'method': 'getRecentPrioritizationFees',
'params': [[
'Vote111111111111111111111111111111111111111',
'Stake11111111111111111111111111111111111111'
]]
}
)
data = response.json()
# Print the exact full response
print('Full RPC Response:')
print(json.dumps(data, indent=2))
return data
except Exception as error:
print(f'Error getting health: {error}')
return None
# Example usage
RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key'
get_recent_prioritization_fees(RPC_URL){
"jsonrpc": "2.0",
"result": [
{
"prioritizationFee": 0,
"slot": 355373923
},
{
"prioritizationFee": 0,
"slot": 355374059
},
{
"prioritizationFee": 0,
"slot": 355374071
},
{
"prioritizationFee": 0,
"slot": 355374072
}
],
"id": 1
}