> ## 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 | Tempo

> Tempo API method that returns the current maximum priority fee per gas. This is the fee tip that goes to validators on top of the base fee.

Tempo API method that returns the current maximum priority fee per gas. This is the fee tip that goes to validators on top of the base fee.

## Parameters

None.

## Response

* `result` — the current max priority fee per gas encoded as hexadecimal (in wei)

## `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 getMaxPriorityFee = async () => {
      const feeData = await provider.getFeeData();
      console.log(`Max Priority Fee: ${ethers.formatUnits(feeData.maxPriorityFeePerGas, "gwei")} gwei`);

      // Or using raw RPC
      const maxPriorityFee = await provider.send("eth_maxPriorityFeePerGas", []);
      console.log(`Raw response: ${maxPriorityFee}`);
      console.log(`In gwei: ${ethers.formatUnits(maxPriorityFee, "gwei")}`);
    };

  getMaxPriorityFee();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"
  web3 = Web3(Web3.HTTPProvider(node_url))

  # Get max priority fee
  max_priority_fee = web3.eth.max_priority_fee
  print(f"Max Priority Fee: {web3.from_wei(max_priority_fee, 'gwei')} gwei")

  # Using raw RPC
  result = web3.provider.make_request("eth_maxPriorityFeePerGas", [])
  print(f"Raw response: {result['result']}")
  ```

  ```bash cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/tempo_node_api/gas_data/eth_maxPriorityFeePerGas.json POST /
openapi: 3.0.0
info:
  title: eth_maxPriorityFeePerGas Tempo example
  version: 1.0.0
  description: This is an API example for eth_maxPriorityFeePerGas for Tempo.
servers:
  - url: https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf
security: []
paths:
  /:
    post:
      tags:
        - Gas data
      summary: eth_maxPriorityFeePerGas
      operationId: tempo-eth-maxPriorityFeePerGas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_maxPriorityFeePerGas
                params:
                  type: array
                  items: {}
                  default: []
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The max priority fee per gas
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    description: The max priority fee per gas in wei encoded as hexadecimal

````