> ## 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_gasPrice | Monad

> Monad API method that returns the current gas price in wei. This value is determined by the network and represents the median gas price of recent blocks.

Monad API method that returns the current gas price in wei. This value is determined by the network and represents the median gas price of recent blocks.

## Parameters

* `none`

## Response

* `result` — the current gas price in wei, encoded as hexadecimal.

## `eth_gasPrice` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function getGasPrice() {
    const feeData = await provider.getFeeData();
    console.log(`Gas price: ${ethers.formatUnits(feeData.gasPrice, "gwei")} gwei`);
  }

  getGasPrice();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))
  gas_price = web3.eth.gas_price
  print(f'Gas price: {web3.from_wei(gas_price, "gwei")} gwei')
  ```
</CodeGroup>

## Use case

A practical use case for `eth_gasPrice` is calculating transaction costs before sending transactions, allowing users to see estimated fees in their wallet or DApp interface.


## OpenAPI

````yaml openapi/monad_node_api/gas_data/eth_gasPrice.json POST /
openapi: 3.0.0
info:
  title: Monad Node API
  version: 1.0.0
  description: This is an API for interacting with a Monad node.
servers:
  - url: https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800
security: []
paths:
  /:
    post:
      tags:
        - Gas data
      summary: eth_gasPrice
      operationId: eth_gasPrice
      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_gasPrice
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The current gas price in wei.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````