> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_maxPriorityFeePerGas | Cronos

> Cronos API method that returns an estimate of the current priority fee per gas. eth_maxPriorityFeePerGas on Cronos via Chainstack.

Cronos API method that returns an estimate of the current priority fee per gas. This fee is the tip that users may pay miners,post-merge, to validators on top of the base fee to incentivize the inclusion of their transactions in a block. This method helps users adjust their transaction fees in a dynamic market, ensuring transactions are processed promptly without overpaying.

## Parameters

* `none`

## Response

* `quantity` — the estimated priority fee per gas needed, represented as a hexadecimal string.

## `eth_maxPriorityFeePerGas` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const estimatePriorityFee = async () => {
    const priorityFeePerGas = await provider.getFeeData();
    console.log(`Estimated priority fee per gas: ${priorityFeePerGas.maxPriorityFeePerGas}`);
  };

  estimatePriorityFee();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3
  NODE_URL = "CHAINSTACK_NODE_URL"
  web3 = Web3(Web3.HTTPProvider(NODE_URL))

  eth_max_priority_fee_per_gas = web3.provider.make_request('eth_maxPriorityFeePerGas', [])
  print(eth_max_priority_fee_per_gas)
  ```
</CodeGroup>

## Use Case

A practical use case for `eth_maxPriorityFeePerGas` using `ethers.js` is to calculate transaction fees dynamically for applications and wallets to accurately estimate the cost of transactions, especially during periods of high network congestion. This method ensures transactions are confirmed promptly without overpaying. By fetching the current priority fee (`maxPriorityFeePerGas`) and the maximum fee per gas (`maxFeePerGas`), applications can dynamically calculate the total transaction fee required for prompt processing under the current network conditions.


## OpenAPI

````yaml openapi/cronos_node_api/eth_maxPriorityFeePerGas.json POST /b9b0fb92029d58b396139a9e89cf479b
openapi: 3.0.0
info:
  title: Cronos Node API
  version: 1.0.0
  description: This is an API for interacting with a Cronos node.
servers:
  - url: https://nd-907-114-772.p2pify.com
security: []
paths:
  /b9b0fb92029d58b396139a9e89cf479b:
    post:
      tags:
        - upload
      summary: eth_maxPriorityFeePerGas
      operationId: maxPriorityFeePerGas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_maxPriorityFeePerGas
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The estimated max priority fee per gas
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    format: byte

````