Skip to content

Get Solana Priority Fee

GET
/v4/web3/solana-priority-fee

Retrieve the recommended priority fee for Solana transactions.

Authorizations

ApiKeyAuth
Type
API Key (header: X-Api-Key)

Responses

OK

application/json
JSON
{
"status": "ok",
"payload": {
"priorityFee": 5000
}
}

Playground

Authorization

Samples

Powered by VitePress OpenAPI

Code examples

bash
curl -X GET https://api.brrr.network/v4/web3/solana-priority-fee \
  -H "X-Api-Key: YOUR_API_KEY"
javascript
const response = await fetch('https://api.brrr.network/v4/web3/solana-priority-fee', {
  headers: {
    'X-Api-Key': process.env.BRRR_API_KEY,
  },
});

if (!response.ok) {
  const error = await response.json();
  throw new Error(`Priority fee request failed: ${error.errorCode}`);
}

const data = await response.json();
console.log('Priority fee:', data.payload.priorityFee);
python
import os
import httpx

response = httpx.get(
    'https://api.brrr.network/v4/web3/solana-priority-fee',
    headers={'X-Api-Key': os.environ['BRRR_API_KEY']},
)
response.raise_for_status()
print('Priority fee:', response.json()['payload']['priorityFee'])