# EdgenChain API
> Live EdgenChain on-chain data via Blockscout. EdgenChain is an AI-focused EVM Layer 1; gas and balances are in EDGEN. Network stats, gas prices, latest blocks, a block by height or hash, address detail with EDGEN balance, a transaction by hash, ERC-20 token metadata and a universal search across addresses, tokens, blocks and transactions. Real data, no key.

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

## Pricing
- **Free** (Free) — 1,450 calls/Mo, 1 req/s
- **Basic** ($10/Mo) — 69,500 calls/Mo, 10 req/s
- **Pro** ($33/Mo) — 490,500 calls/Mo, 20 req/s
- **Mega** ($102/Mo) — 2,560,000 calls/Mo, 50 req/s

## Endpoints

### Network

#### `GET /v1/gas` — Current gas prices

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

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "59853570"
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:16.988Z",
        "request_id": "bd810f43-4eef-4436-8ed4-e878412e67f0"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 6045918,
        "coin_price_usd": null,
        "gas_used_today": "59853570",
        "market_cap_usd": 0,
        "total_addresses": "554053",
        "total_transactions": "1751764",
        "transactions_today": "234",
        "network_utilization_percent": 0.023658933333333333
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:17.271Z",
        "request_id": "4de6723d-61cf-4d22-b0db-d889a97493ab"
    },
    "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: `6041077`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x7287294ecd84f09c1f29a6befc2bb64329be61f4c9da41a119a48eea9cc55462",
            "size": 1601,
            "miner": "0x3d4bF7CaD2452D8Ec29F228806B034d9222715A2",
            "height": 6041077,
            "gas_used": 331928,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T02:10:00.000000Z",
            "burnt_fees": "165964000000",
            "difficulty": "0",
            "base_fee_per_gas": "500000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:17.549Z",
        "request_id": "36059aab-76e8-480a-bc4d-cf497f091293"
    },
    "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/edgen-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xc52968cb8066ec34e9ef085385f4bd639fe25fa93330eb8c43cce4dc067cd0c6",
                "size": 905,
                "miner": "0x3d4bF7CaD2452D8Ec29F228806B034d9222715A2",
                "height": 6046235,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:50:11.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "500000"
            },
            {
                "hash": "0x976ce09a880d4b02e62ace99a3664ac75b09333b32eb8f8fe22d551db0e906e2",
                "size": 910,
                "miner": "0x8e2932A839F2F12d5E1ECCa73a79B2514f1fc487",
                "height": 6046234,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:50:05.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "500000"
            },
            {
                "hash": "0x418bb1f4602273951875cf3dd557212b8a482f8a30a9674c9783a21151344749",
                "size": 1632,
                "miner": "0x3d4bF7CaD2452D8Ec29F228806B034d9222715A2",
                "height": 6046233,
                "gas_used": 354884,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestam
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address detail with EDGEN balance

**Parameters:**
- `address` (query, required, string) — Address hash Example: `0x975f740d383B9bECBd69189D40390149C8951932`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x975f740d383B9bECBd69189D40390149C8951932",
            "name": "WETH9",
            "token": {
                "name": "Wrapped Edgen",
                "type": "ERC-20",
                "symbol": "WEDGEN"
            },
            "creator": "0xa62162A652dE844510a694AE1F666930B3224CCA",
            "balance_wei": "18195796258029077300116446",
            "is_contract": true,
            "is_verified": true,
            "balance_edgen": 18195796.258029077
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:18.451Z",
        "request_id": "16199aee-1125-41a9-a53c-903bfaf4c82f"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

**Parameters:**
- `hash` (query, required, string) — Transaction hash Example: `0x5e07f6d6ddad898a3f6b31f907aadf94941623fd391f8ce950544bab2eec5c78`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x57bEBD1b51dF9F221F763a708591c1E72D2379D6",
            "from": "0xd063e10a2Da1aC0471476CD2b3c70755C7933953",
            "hash": "0x5e07f6d6ddad898a3f6b31f907aadf94941623fd391f8ce950544bab2eec5c78",
            "type": 0,
            "block": 6041077,
            "nonce": 35689,
            "method": "storeTree",
            "status": "ok",
            "fee_wei": "186709500000",
            "gas_used": 331928,
            "fee_edgen": 1.867095e-7,
            "gas_price": "562500",
            "timestamp": "2026-06-08T02:10:00.000000Z",
            "value_wei": "0",
            "value_edgen": 0,
            "confirmations": 5159
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:18.735Z",
        "request_id": "a541f468-6b0b-4660-94f7-5fbdd54b7552"
    },
    "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: `0x975f740d383B9bECBd69189D40390149C8951932`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Wrapped Edgen",
            "type": "ERC-20",
            "symbol": "WEDGEN",
            "holders": null,
            "decimals": 18,
            "total_supply": "18195796258029077300116446",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:18.981Z",
        "request_id": "47614356-58b9-4290-9b9d-f2e0d6135939"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal on-chain search

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

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

**Response:**
```json
{
    "data": {
        "count": 7,
        "query": "Edgen",
        "results": [
            {
                "name": "Wrapped Edgen",
                "type": "token",
                "symbol": "WEDGEN",
                "address": "0x975f740d383B9bECBd69189D40390149C8951932"
            },
            {
                "name": "Edgen Sample Token",
                "type": "token",
                "symbol": "EST",
                "address": "0x5a057D0a115D4f004Fd58a3faAe75eeBfb6aD414"
            },
            {
                "name": "Edgen Sample Token",
                "type": "token",
                "symbol": "EST",
                "address": "0x795e55668b050cb366305595e601b603B12eabeE"
            },
            {
                "name": "Wrapped Edgen",
                "type": "token",
                "symbol": "WEDGEN",
                "address": "0x7d54BD069D6E09860c49779ee99a98f8bC5f4e70"
            },
            {
                "name": "EdgenDeposit",
                "type": "contract",
                "address": "0xDd9aD0F4cE629B53419545480021f141DEfD16A1"
            },
            {
                "name": "EdgenSwapFactory",
                "type": "contract",
                "address": "0x4e7eb33C3297Bdce7417Cd033eA0BC289a4Fa513"
            },
            {
                "name": "EdgenSwapRouter",
                "type": "contract",
                "address": "0x1bb6f318C0805E4d2917544e2cD0BDF628eB516e"
            }
        ]
    },
    "meta": {
 
…(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/edgen-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "edgen-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 EdgenChain 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. EdgenChain is an AI-focused EVM Layer 1; gas and balances are in EDGEN. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:19.352Z",
        "request_id": "12ae18eb-999a-4b82-871b-deae281bf573"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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