# Multi-Chain Gas Fees API
> Live multi-chain EVM gas-fee oracle — the gas estimate every wallet, bridge and dApp needs — computed straight from each network's public JSON-RPC node. Using EIP-1559 fee history it derives the next block's base fee and slow, standard and fast priority-fee tiers from the recent reward percentiles, and returns per tier the priority fee, the suggested max fee and the resulting total gas price, all in gwei. It also estimates the cost of a transaction — a plain transfer or any gas limit you pass — in the chain's native coin. Supports Ethereum, Polygon, BSC, Arbitrum, Optimism, Base and Avalanche. Live, no key, no cache. Distinct from price, market-cap and on-chain TVL APIs — this is the real-time gas-price layer.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/gasfees-api/..."
```

## Pricing
- **Free** (Free) — 15,000 calls/Mo, 5 req/s
- **Starter** ($10/Mo) — 200,000 calls/Mo, 15 req/s
- **Pro** ($29/Mo) — 1,000,000 calls/Mo, 40 req/s
- **Scale** ($69/Mo) — 5,000,000 calls/Mo, 120 req/s

## Endpoints

### Gas

#### `GET /v1/gas` — Gas estimate for a chain

**Parameters:**
- `chain` (query, optional, string) — Chain: ethereum|polygon|bsc|arbitrum|optimism|base|avalanche Example: `ethereum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gasfees-api/v1/gas?chain=ethereum"
```

**Response:**
```json
{
    "data": {
        "name": "Ethereum",
        "chain": "ethereum",
        "tiers": {
            "fast": {
                "max_fee_gwei": 1.065,
                "gas_price_gwei": 0.937,
                "priority_fee_gwei": 0.809
            },
            "slow": {
                "max_fee_gwei": 0.264,
                "gas_price_gwei": 0.135,
                "priority_fee_gwei": 0.007
            },
            "standard": {
                "max_fee_gwei": 0.327,
                "gas_price_gwei": 0.198,
                "priority_fee_gwei": 0.07
            }
        },
        "native": "ETH",
        "fee_type": "eip1559",
        "base_fee_gwei": 0.128
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:38.832Z",
        "request_id": "ec343707-9b2e-43d7-9a52-b192c9cc5681"
    },
    "status": "ok",
    "message": "Gas fees retrieved successfully",
    "success": true
}
```

### Estimate

#### `GET /v1/estimate` — Transaction cost in native coin

**Parameters:**
- `chain` (query, optional, string) — Chain Example: `ethereum`
- `tier` (query, optional, string) — Speed: slow|standard|fast Example: `fast`
- `gas_limit` (query, optional, string) — Gas units (default 21000 transfer) Example: `21000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gasfees-api/v1/estimate?chain=ethereum&tier=fast&gas_limit=21000"
```

**Response:**
```json
{
    "data": {
        "name": "Ethereum",
        "note": "default = a plain native transfer (21000 gas)",
        "tier": "fast",
        "chain": "ethereum",
        "native": "ETH",
        "gas_limit": 21000,
        "cost_label": "0.000019679 ETH",
        "cost_native": 1.9679e-5,
        "gas_price_gwei": 0.937
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:38.958Z",
        "request_id": "e531b69a-2dde-4641-9c83-24cb03c01531"
    },
    "status": "ok",
    "message": "Estimate retrieved successfully",
    "success": true
}
```

### Chains

#### `GET /v1/chains` — List supported chains and aliases

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gasfees-api/v1/chains"
```

**Response:**
```json
{
    "data": {
        "count": 7,
        "chains": [
            {
                "key": "ethereum",
                "name": "Ethereum",
                "native": "ETH",
                "fee_type": "eip1559"
            },
            {
                "key": "polygon",
                "name": "Polygon",
                "native": "POL",
                "fee_type": "eip1559"
            },
            {
                "key": "bsc",
                "name": "BNB Smart Chain",
                "native": "BNB",
                "fee_type": "legacy"
            },
            {
                "key": "arbitrum",
                "name": "Arbitrum One",
                "native": "ETH",
                "fee_type": "eip1559"
            },
            {
                "key": "optimism",
                "name": "Optimism",
                "native": "ETH",
                "fee_type": "eip1559"
            },
            {
                "key": "base",
                "name": "Base",
                "native": "ETH",
                "fee_type": "eip1559"
            },
            {
                "key": "avalanche",
                "name": "Avalanche C-Chain",
                "native": "AVAX",
                "fee_type": "eip1559"
            }
        ],
        "aliases": {
            "op": "optimism",
            "arb": "arbitrum",
            "bnb": "bsc",
            "eth": "ethereum",
            "pol": "polygon",
            "avax": "avalanche",
            "matic": "polygon
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gasfees-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "chains": [
            "ethereum",
            "polygon",
            "bsc",
            "arbitrum",
            "optimism",
            "base",
            "avalanche"
        ],
        "source": "Public chain RPC (publicnode) eth_feeHistory + eth_gasPrice (live)",
        "service": "gasfees-api",
        "endpoints": {
            "GET /v1/gas": "Gas estimate for a chain (chain=ethereum|polygon|bsc|arbitrum|optimism|base|avalanche): base fee + slow/standard/fast tiers in gwei.",
            "GET /v1/meta": "This document.",
            "GET /v1/chains": "List supported chains and aliases.",
            "GET /v1/estimate": "Transaction cost in native coin (chain, gas_limit default 21000, tier=slow|standard|fast)."
        },
        "description": "Live multi-chain EVM gas-fee oracle from each network's public JSON-RPC: next-block base fee plus slow / standard / fast tiers (priority fee, suggested max fee, total gas price) in gwei, and a transaction cost estimate in the native coin. Supports Ethereum, Polygon, BSC, Arbitrum, Optimism, Base and Avalanche. Live, no key. The gas estimate every wallet, bridge and dApp needs.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:39.162Z",
        "request_id": "ad9f34d4-0de1-4dfc-9934-d7143122178d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/gasfees-api
OpenAPI spec: https://www.oanor.com/api/gasfees-api/openapi.json
