eth_suggestPriceOptions - AVAX

Example code for the eth_suggestPriceOptions JSON-RPC method. Complete guide on how to use eth_suggestPriceOptions JSON-RPC in GetBlock Web3 documentation.

Returns suggested gas price options for slow, normal, and fast confirmation tiers. Avalanche-specific extension that gives wallets a one-call replacement for building their own multi-tier fee oracle.

Parameters

  • None

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/C/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_suggestPriceOptions",
    "params": [],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "slow": {
            "maxFeePerGas": "0x5d21dba00",
            "maxPriorityFeePerGas": "0x3b9aca00"
        },
        "normal": {
            "maxFeePerGas": "0x77359400",
            "maxPriorityFeePerGas": "0x59682f00"
        },
        "fast": {
            "maxFeePerGas": "0x9502f9000",
            "maxPriorityFeePerGas": "0x77359400"
        }
    }
}

Response Parameters

Field
Type
Description

result.slow

object

Slow tier fee suggestion (~30s+ confirmation)

result.normal

object

Normal tier fee suggestion (~2s confirmation)

result.fast

object

Fast tier fee suggestion (next-block confirmation)

result..maxFeePerGas

string

Suggested max fee per gas (wei, hex)

result..maxPriorityFeePerGas

string

Suggested max priority fee per gas (wei, hex)

Use Cases

  • Wallet UX showing slow/normal/fast fee options

  • Single-call multi-tier fee oracle

  • Simplifying EIP-1559 fee construction in client libraries

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?