APIs & SDKs
Log In
APIs & SDKs

suggestedGasFees

Fetches recommended EIP-1559 compliant gas fees, broken down into low, medium, and fast options, along with the base fee.

💰 Contextualizing suggestedGasFees

  • suggestedGasFees returns an object containing tiered gas fee suggestions under EIP-1559 regulations for a chain derived from a given chainId.

It provides gas fee options for low, medium, and fast transaction speeds, complete with estimated wait times and the current base fee. It takes no parameters, although, as usual with Particle's enhanced RPC, it still requires basic authentication.


Query example

const axios = require('axios');

(async () => {
    const response = await axios.post('https://rpc.particle.network/evm-chain', {
        chainId: 42,
        jsonrpc: '2.0',
        id: 1,
        method: 'particle_suggestedGasFees',
        params: [],
    }, {
        auth: {
            username: 'Your Project Id',
            password: 'Your Project Server Key',
        }
    });

    console.log(response.data);
})();
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!