---
title: Get Blockchain Gas Prices and Transaction Fee API
slug: get-blockchain-gas-prices-transaction-fee
url: https://apyhub.com/corsair96/service/get-blockchain-gas-prices-transaction-fee
provider: API Forge
categories: [Finance]
tags: [gas-price, blockchain, evm, web3, rpc, transaction-fee]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 75
mcp: true
---

# Get Blockchain Gas Prices and Transaction Fee API

Get current gas price, block number, and source for Ethereum, Polygon, BSC, Arbitrum, Optimism, Base, and Avalanche.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/corsair96/get-blockchain-gas-prices-transaction-fee/crypto/gas` | What it does Returns a snapshot of gas pricing for the selected blockchain network. You can optiona… | 75 |

## Endpoint reference

### Multi-chain gas snapshot

`GET https://api.eu.apyhub.com/corsair96/get-blockchain-gas-prices-transaction-fee/crypto/gas` · 75 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `chain` | query | string | no | One of: ethereum, polygon, bsc, arbitrum, optimism, base, avalanche. Default: `ethereum`. |

#### Quickstart

Fetch the gas snapshot for the default chain (`ethereum`).

```bash
curl -X GET "https://api.eu.apyhub.com/corsair96/get-blockchain-gas-prices-transaction-fee/crypto/gas" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with these top-level fields: `chain` (`string`), `gasPriceGwei` (`number`), `blockNumber` (`integer`), and `source` (`string`). It may also include `baseFeeGwei` and `priorityFeeGwei`, which can be `number` or `null`.

```json
{
  "chain": "ethereum",
  "gasPriceGwei": 12.4,
  "blockNumber": 19654321,
  "source": "rpc.ankr.com",
  "baseFeeGwei": 11.8,
  "priorityFeeGwei": 0.6
}
```

## About

## What it does
Blockchain Gas Tracker gives you a current gas snapshot for a supported EVM chain. Send a `chain` value and get back the selected `chain`, the `gasPriceGwei`, the `blockNumber` it was observed on, and the `source` RPC host that answered. Depending on the network, the response can also include `baseFeeGwei` and `priorityFeeGwei`.

Use it when you need to estimate transaction costs before submitting a swap, mint, bridge, or contract call. The endpoint covers Ethereum, Polygon, BSC, Arbitrum, Optimism, Base, and Avalanche, so you can build fee-aware UX across multiple chains without hardcoding stale values.

The response is intentionally lightweight: one chain, one block height, and the gas data you need to make routing or pricing decisions. That makes it useful for dashboards, fee estimators, wallet flows, and backend jobs that need a live gas reading rather than historical analytics.

If you are normalising fees across chains, the fields are easy to consume directly in application logic or display in a user-facing estimate.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/corsair96/service/get-blockchain-gas-prices-transaction-fee
