const axios = require("axios");
(() : {
const config = {
headers: {
"Content-Type": "application/json",
},
};
const data = {
jsonrpc: "2.0",
id: 1,
method: "qn_estimatePriorityFees",
params: {"last_n_blocks":100, "api_version":2},
};
axios
.post(
"https://YOUR_QUICKNODE_ENDPOINT_HERE.com",
data,
config
)
.then(function (response) {
// handle success
console.log(response.data);
})
.catch((err) : {
// handle error
console.log(err);
});
})();
from jsonrpcclient import request, parse, Ok
import logging
import requests
response = requests.post("https://YOUR_QUICKNODE_ENDPOINT_HERE.com", json=request("qn_estimatePriorityFees", {"last_n_blocks":100, "api_version":2}))
parsed = parse(response.json())
if isinstance(parsed, Ok):
print(parsed.result)
else:
logging.error(parsed.message)
curl https://YOUR_QUICKNODE_ENDPOINT_HERE.com \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"qn_estimatePriorityFees","params": {"last_n_blocks":100, "api_version":2},"id":1,"jsonrpc":"2.0"}'