Reference

The Gas API supports the standard eth_gasPrice and eth_maxPriorityFeePerGas. In addition, it supports a new method called eth_getPrecisePriorityFee:

POST https://gas.merkle.io
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_getPrecisePriorityFee",
    "params": [
        {
            "from": "0x.....",
            "to": "0x.....",
            "value": "0x....",
            "data": "0x...."
        }
    ]
}

And returns the perfect priority fee per gas needed for this transaction:

{
    "id": 1,
    "result": {
        "priorityFeePerGas": "0x01"
    }
}

Last updated

Was this helpful?