# Energi Chain API
> Live on-chain data for Energi — a self-funding EVM Layer 1 — via its public Blockscout explorer (no wallet, no key). The stats endpoint returns chain-wide totals (blocks, transactions, addresses, average block time, gas used); gas gives the current gas-price oracle (slow/average/fast). Blocks lists the latest blocks, and a single block resolves by height or by hash with its transaction count, gas, miner and timestamp. The address endpoint returns any account's NRG balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in NRG, fee, status and block. The token endpoint returns an ERC-20 token's metadata (name, symbol, decimals, total supply, holders) by contract address, and search runs a universal lookup across addresses, tokens, blocks and transactions. Gas, balances, values and fees are denominated in NRG, the native coin. Real on-chain data straight from the explorer, refreshed every call — no key. 9 endpoints. For multi-chain coverage combine with the other oanor chain APIs (Ethereum, Base, Arbitrum and more).

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

## Pricing
- **Free** (Free) — 3,400 calls/Mo, 2 req/s
- **Basic** ($23/Mo) — 112,000 calls/Mo, 8 req/s
- **Pro** ($70/Mo) — 695,000 calls/Mo, 20 req/s
- **Mega** ($235/Mo) — 3,850,000 calls/Mo, 50 req/s

## Endpoints

### Chain

#### `GET /v1/gas` — Gas-price oracle

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

**Response:**
```json
{
    "data": {
        "fast": 3.59,
        "slow": 1.38,
        "unit": "gwei",
        "average": 1.99,
        "gas_used_today": "10110621671"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:31.004Z",
        "request_id": "074c6a04-c648-436a-bc3c-30d457e69f94"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Chain stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 3.59,
            "slow": 1.38,
            "average": 1.99
        },
        "total_blocks": 3282747,
        "coin_price_usd": null,
        "gas_used_today": "10110621671",
        "market_cap_usd": 0,
        "total_addresses": "108640",
        "total_transactions": "62822686",
        "transactions_today": "68997",
        "network_utilization_percent": 15.7563829
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:31.265Z",
        "request_id": "744dcc31-5e5c-4ae9-bb6c-176e46e1d62d"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `3282514`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xdb1f3c1891e6c230ab36b265cd0e19621b39004ad3b0ad81aa4974462d65033c",
            "size": 50293,
            "miner": "0x8CaBc1306E2f9F1e27AB55A97A0B8B09ddE01A6d",
            "height": 3282514,
            "gas_used": 15285040,
            "tx_count": 206,
            "gas_limit": 40000000,
            "timestamp": "2026-06-08T05:48:32.000000Z",
            "burnt_fees": "0",
            "difficulty": "414091791",
            "base_fee_per_gas": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:31.513Z",
        "request_id": "c3e06463-8f81-49c8-b20d-b6abd21d3b9b"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Latest blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x56552b96b0162dc91f803634b66e433b7df1344c4c5f7d316440d82a0c0b2e4a",
                "size": 18117,
                "miner": "0x7DBdF5bfb4d95A782bcf31A20459e6F56E77151b",
                "height": 3282753,
                "gas_used": 7530799,
                "tx_count": 43,
                "gas_limit": 40000000,
                "timestamp": "2026-06-08T09:47:38.000000Z",
                "burnt_fees": "0",
                "difficulty": "424991062",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x00c8c5db5af6c6c5221c75efe530434fac6841574d3efe79e4dc5053da1e0642",
                "size": 22760,
                "miner": "0x47e9C3aB71654A17aE63D851fdca0eCc192D9f87",
                "height": 3282752,
                "gas_used": 7111620,
                "tx_count": 69,
                "gas_limit": 40000000,
                "timestamp": "2026-06-08T09:46:12.000000Z",
                "burnt_fees": "0",
                "difficulty": "424586105",
                "base_fee_per_gas": null
            },
            {
                "hash": "0xa6c974ca56c89b7490b53bc76dee59796275863bce2f95f33cf33dac21fe5652",
                "size": 16327,
                "miner": "0x7DBdF5bfb4d95A782bcf31A20459e6F56E77151b",
                "height": 3282751,
                "gas_used": 5202500,
                "tx_count": 37,
                "gas_limit": 400000
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Account balance & holdings

**Parameters:**
- `address` (query, required, string) — Account address (0x + 40 hex) Example: `0x2f4454AD6b870548F4D01c6e2fC6326753adC2Bb`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x2f4454AD6b870548F4D01c6e2fC6326753adC2Bb",
            "name": null,
            "token": null,
            "creator": null,
            "balance_nrg": 0,
            "balance_wei": "0",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:32.114Z",
        "request_id": "c00c193c-567b-42f8-92a1-c5de5394ce7c"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

#### `GET /v1/transaction` — A transaction by hash

**Parameters:**
- `hash` (query, required, string) — Transaction hash (0x + 64 hex) Example: `0xf3e2c800afb4c32f764a70702aa585451ba740b2b11c60461a11ee36f941313d`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x0000000000000000000000000000000000000302",
            "from": "0x2f4454AD6b870548F4D01c6e2fC6326753adC2Bb",
            "hash": "0xf3e2c800afb4c32f764a70702aa585451ba740b2b11c60461a11ee36f941313d",
            "type": null,
            "block": 3282514,
            "nonce": 2813,
            "method": "0x91ceac96",
            "status": "ok",
            "fee_nrg": 0,
            "fee_wei": "0",
            "gas_used": 59660,
            "gas_price": "0",
            "timestamp": "2026-06-08T05:48:32.000000Z",
            "value_nrg": 0,
            "value_wei": "0",
            "confirmations": 240
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:32.463Z",
        "request_id": "ed48dda4-d591-45e7-a0ec-5561024c848f"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

#### `GET /v1/token` — ERC-20 token metadata

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

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Ether",
            "type": "ERC-20",
            "symbol": "ETH",
            "address": "0x78B050d981d7f6E019Bf6E361D0d1167de6B19dA",
            "holders": 374,
            "decimals": 18,
            "total_supply": "52867796485205082407",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:32.688Z",
        "request_id": "e31724f5-f3db-4a33-92be-d8a082211a58"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal search

**Parameters:**
- `q` (query, required, string) — Address, token, block or tx Example: `ETH`

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

**Response:**
```json
{
    "data": {
        "count": 16,
        "query": "ETH",
        "results": [
            {
                "name": "Ether",
                "type": "token",
                "symbol": "ETH",
                "address": "0x78B050d981d7f6E019Bf6E361D0d1167de6B19dA"
            },
            {
                "name": "Ether @ Energi",
                "type": "token",
                "symbol": "ETH",
                "address": "0xb7051d4D603E86A964f58fE2FbC37F9a4e533D01"
            },
            {
                "name": "Ether",
                "type": "token",
                "symbol": "ETH",
                "address": "0x8f79B85C092679A1df647293553f1e7d860568eb"
            },
            {
                "name": "NRG-GMI Ethnic Collection",
                "type": "token",
                "symbol": "ETHNIC",
                "address": "0xc7c8DA23dF27a8615d2eFf5659E2F8607e953809"
            },
            {
                "name": "ETH/USDC Energiswap LP",
                "type": "token",
                "symbol": "ETH/USDC",
                "address": "0xdbD1CfB54bFB744F1EaD9aA82023A53DD306E738"
            },
            {
                "name": "THETA @ Energi",
                "type": "token",
                "symbol": "eTHETA",
                "address": "0x65622f8e8b569aDE3F684B5F2a189F78F98A75b0"
            },
            {
                "name": "Ethereum Classic",
                "type": "token",
                "symbol": "ETC",
                "address": "
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "service": "energi-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 Energi 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. Energi is an EVM Layer 1; gas, balances and fees are in NRG. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:33.030Z",
        "request_id": "d3442425-c61a-445c-82ab-b9d7805213f0"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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