# Ethereum On-Chain API
> Live Ethereum mainnet on-chain data as an API, built on the open Blockscout explorer — a different layer from market-price feeds. Pull network stats (total blocks and transactions, ETH price, market cap and live gas usage), a gas oracle with slow, average and fast prices in gwei, the most recent blocks and full block detail by height or hash. Look up any address for its ETH balance, ENS name and contract status, any transaction by hash for its value, fee, status, sender and receiver, and any ERC-20 token by contract for its name, symbol, decimals, holders and USD exchange rate. A universal search resolves addresses, tokens, blocks and transactions in one call. Real on-chain data, no key needed upstream. Ideal for wallets, block explorers, gas trackers, DeFi dashboards and crypto analytics.

## 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/ethereum-api/..."
```

## Pricing
- **Free** (Free) — 8,000 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 110,000 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 600,000 calls/Mo, 25 req/s
- **Mega** ($72/Mo) — 3,000,000 calls/Mo, 50 req/s

## Endpoints

### Ethereum

#### `GET /v1/address` — Address balance, ENS & contract info

**Parameters:**
- `address` (query, required, string) — An Ethereum address (0x + 40 hex) Example: `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": "vitalik.eth",
            "hash": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "name": null,
            "token": null,
            "creator": null,
            "balance_eth": 5.688840446715981,
            "balance_wei": "5688840446715981478",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:45.995Z",
        "request_id": "b8f817ae-ec1c-47a7-add5-e90d8840fe60"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

#### `GET /v1/block` — Block detail by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height, e.g. 20000000 Example: `20000000`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xd24fd73f794058a3807db926d8898c6481e902b7edb91ce0d479d6760f276183",
            "size": 51097,
            "miner": "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
            "height": 20000000,
            "reward": "22210936792725994",
            "gas_used": 11089692,
            "tx_count": 134,
            "gas_limit": 30000000,
            "timestamp": "2024-06-01T22:36:47.000000Z",
            "burnt_fees": "54749340487463472",
            "difficulty": "0",
            "base_fee_per_gas": "4936957716"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:46.164Z",
        "request_id": "64510af4-59bd-4446-9b83-987fd43f4a57"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — The most recent blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xc49922111a6b6e63242a31f803cfe5c64f4ba4f590a52b20f67b4318ffa09c10",
                "size": 103530,
                "miner": "0x396343362be2A4dA1cE0C1C210945346fb82Aa49",
                "height": 25269360,
                "reward": "7743860736987449",
                "gas_used": 16697828,
                "tx_count": 150,
                "gas_limit": 60000000,
                "timestamp": "2026-06-08T01:19:35.000000Z",
                "burnt_fees": "2228446272644312",
                "difficulty": "0",
                "base_fee_per_gas": "133457254"
            },
            {
                "hash": "0x73cf1525ac08611d2d602da63d4322bded337ab9d54a871a5356433844629800",
                "size": 211679,
                "miner": "0x396343362be2A4dA1cE0C1C210945346fb82Aa49",
                "height": 25269359,
                "reward": "11237278857663170",
                "gas_used": 28742799,
                "tx_count": 172,
                "gas_limit": 60000000,
                "timestamp": "2026-06-08T01:19:23.000000Z",
                "burnt_fees": "3856134747381171",
                "difficulty": "0",
                "base_fee_per_gas": "134160029"
            },
            {
                "hash": "0xe7b229263e0fb8cdfb7ba9dccdd29d94eade4a98231af64d8a13118610bcd451",
                "size": 115115,
                "miner": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
         
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/gas` — Gas oracle (gwei)

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

**Response:**
```json
{
    "data": {
        "fast": 3.41,
        "slow": 0.39,
        "unit": "gwei",
        "average": 0.86,
        "gas_used_today": "217771930431"
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:46.777Z",
        "request_id": "1fbbf2e2-a662-410e-a177-fa0d4c8eef20"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Search addresses, tokens, blocks & txns

**Parameters:**
- `q` (query, required, string) — Search term, e.g. USDC Example: `USDC`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "USDC",
        "results": [
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
            },
            {
                "name": "Steakhouse USDC Morpho Vault",
                "type": "token",
                "symbol": "STEAKUSDC",
                "address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
            },
            {
                "name": "Gauntlet USDC PRIME V2",
                "type": "token",
                "symbol": "GTUSDCP",
                "address": "0x8c106EEDAd96553e64287A5A6839c3Cc78afA3D0"
            },
            {
                "name": "Steakhouse USDC V2",
                "type": "token",
                "symbol": "STEAKUSDC",
                "address": "0xbeef088055857739C12CD3765F20b7679Def0f51"
            },
            {
                "name": "Wrapped Aave Ethereum USDC",
                "type": "token",
                "symbol": "WAETHUSDC",
                "address": "0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E"
            },
            {
                "name": "Gauntlet USDC Prime Morpho Vault",
                "type": "token",
                "symbol": "GTUSDC",
                "address": "0xdd0f28e19C1780eb6396170735D45153D261490d"
            },
            {
                "name": "kpk USDC Prime V2 Morpho Vault (Ethereum)",
        
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/stats` — Network stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 3.54,
            "slow": 0.4,
            "average": 0.88
        },
        "total_blocks": 25269001,
        "coin_price_usd": 1688.58,
        "gas_used_today": "217771930431",
        "market_cap_usd": 203785462714.3398,
        "total_addresses": "649086843",
        "total_transactions": "3525345889",
        "transactions_today": "1587585",
        "network_utilization_percent": 50.98442132346185
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:47.722Z",
        "request_id": "8317b238-2f5b-49cc-b791-c57451520398"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

#### `GET /v1/token` — ERC-20 token detail by contract

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethereum-api/v1/token?address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
```

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/6319/small/USDC.png?1769615602",
            "name": "USDC",
            "type": "ERC-20",
            "symbol": "USDC",
            "holders": null,
            "decimals": 6,
            "total_supply": "51537976211468032",
            "exchange_rate_usd": 0.999792,
            "circulating_market_cap": "75586332730.52745"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:47.884Z",
        "request_id": "011c7709-a330-42b7-9b0b-267f92f35bc6"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

#### `GET /v1/transaction` — Transaction detail by hash

**Parameters:**
- `hash` (query, required, string) — A transaction hash (0x + 64 hex) Example: `0xbb4b3fc2b746877dce70862850602f1d19bd890ab4db47e6b7ee1da1fe578a0d`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethereum-api/v1/transaction?hash=0xbb4b3fc2b746877dce70862850602f1d19bd890ab4db47e6b7ee1da1fe578a0d"
```

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80",
            "from": "0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13",
            "hash": "0xbb4b3fc2b746877dce70862850602f1d19bd890ab4db47e6b7ee1da1fe578a0d",
            "type": 2,
            "block": 20000000,
            "nonce": 2756766,
            "method": "0x091a4fc4",
            "status": "ok",
            "fee_eth": 0.001584659750723964,
            "fee_wei": "1584659750723964",
            "gas_used": 320979,
            "gas_price": "4936957716",
            "timestamp": "2024-06-01T22:36:47.000000Z",
            "value_eth": 1.050180096e-9,
            "value_wei": "1050180096",
            "confirmations": 5269361
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:53.725Z",
        "request_id": "cc419713-333e-4aea-b9f2-af21d6134e63"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service description & endpoints

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

**Response:**
```json
{
    "data": {
        "service": "ethereum-api",
        "endpoints": {
            "GET /v1/gas": "Gas oracle (slow/average/fast in gwei).",
            "GET /v1/meta": "This document.",
            "GET /v1/block": "Block detail by height= or hash=.",
            "GET /v1/stats": "Network stats (blocks, txns, coin price, market cap, gas).",
            "GET /v1/token": "ERC-20 token detail by contract (address=).",
            "GET /v1/blocks": "The most recent blocks.",
            "GET /v1/search": "Search addresses, tokens, blocks & txns (q=).",
            "GET /v1/address": "Address balance, ENS & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live Ethereum mainnet on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances with ENS, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:53.829Z",
        "request_id": "47a33d7d-5924-499f-9fdc-4f5360f37988"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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