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

# Get Gas Oracle

> Get current gas price recommendations.

export const chain = '1';

<Badge color="yellow">Ethereum Mainnet</Badge> <Badge color="yellow">BNB Smart Chain Mainnet</Badge> <Badge color="yellow">Polygon Mainnet</Badge> <Badge color="yellow">Celo Mainnet</Badge> <Badge color="yellow">Gnosis</Badge> <Badge color="yellow">Linea Mainnet</Badge>

<ResponseExample>
  ```json Example response theme={null}
  {
    "status": "1",
    "message": "OK",
    "result": {
      "LastBlock": "23467872",
      "SafeGasPrice": "0.496839934",
      "ProposeGasPrice": "0.496840168",
      "FastGasPrice": "0.55411917",
      "suggestBaseFee": "0.496839934",
      "gasUsedRatio": "0.405942555555556,0.784013777777778,0.502624148542588,0.719479644444444,0.45673524947105"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi/api-reference/endpoint/gasoracle.json GET /v2/api
openapi: 3.1.0
info:
  title: Get Gas Oracle
  version: 2.0.0
  description: Get current gas price recommendations.
  license:
    name: Etherscan API Terms
    url: https://etherscan.io/terms
servers:
  - url: https://api.etherscan.io
    description: Etherscan API.
security:
  - apiKey: []
paths:
  /v2/api:
    get:
      summary: Get Gas Oracle
      description: Get current gas price recommendations.
      operationId: getGasoracle
      parameters:
        - name: chainid
          in: query
          required: true
          description: >-
            Chain ID to query, eg 1 for Ethereum, 42161 for Arbitrum from our
            [supported chains](/supported-chains).
          schema:
            type: string
          example: '1'
        - name: module
          in: query
          required: true
          description: Set to gastracker for this endpoint.
          schema:
            type: string
            default: gastracker
          example: gastracker
        - name: action
          in: query
          required: true
          description: Set to gasoracle for this endpoint.
          schema:
            type: string
            default: gasoracle
          example: gasoracle
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      1 if the request returned data, 0 otherwise. A status of 0
                      can indicate an error or a valid request that returned no
                      records.
                  message:
                    type: string
                    description: >-
                      OK on success, otherwise an error description such as
                      NOTOK. See [common error
                      messages](/common-error-messages).
                  result:
                    type: object
                    properties:
                      LastBlock:
                        type: string
                        description: Latest block number used for the gas estimates.
                      SafeGasPrice:
                        type: string
                        description: >-
                          Recommended gas price for a low-priority transaction,
                          in gwei.
                      ProposeGasPrice:
                        type: string
                        description: >-
                          Recommended gas price for a standard-priority
                          transaction, in gwei.
                      FastGasPrice:
                        type: string
                        description: >-
                          Recommended gas price for a high-priority transaction,
                          in gwei.
                      suggestBaseFee:
                        type: string
                        description: Base fee of the latest block, in gwei.
                      gasUsedRatio:
                        type: string
                        description: >-
                          Gas-used ratio of the last few blocks,
                          comma-separated, each between 0 and 1.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Enter your Etherscan API key, or [set one up](/set-up-your-api-key) if
        you don't have one.

````