# Lumia API
> Live Lumia on-chain data via Blockscout. Lumia is a real-world-asset (RWA) focused Ethereum L2; gas and balances are in LUMIA. Network stats, gas prices, latest blocks, a block by height or hash, address detail with LUMIA 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/lumia-api/..."
```

## Pricing
- **Free** (Free) — 1,850 calls/Mo, 1 req/s
- **Basic** ($11/Mo) — 81,000 calls/Mo, 10 req/s
- **Pro** ($36/Mo) — 535,000 calls/Mo, 20 req/s
- **Mega** ($114/Mo) — 2,720,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/lumia-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 1.01,
        "slow": 1.01,
        "unit": "gwei",
        "average": 1.01,
        "gas_used_today": "3946820786"
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:54.891Z",
        "request_id": "8bc69e7e-8618-43a1-acf0-2c5728a79ba9"
    },
    "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/lumia-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 1.01,
            "slow": 1.01,
            "average": 1.01
        },
        "total_blocks": 17555874,
        "coin_price_usd": null,
        "gas_used_today": "3946820786",
        "market_cap_usd": 0,
        "total_addresses": "1440664",
        "total_transactions": "9972480",
        "transactions_today": "51422",
        "network_utilization_percent": 0.6400414666666666
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:55.013Z",
        "request_id": "b0f643ce-9daf-4e40-b68e-41264d506db6"
    },
    "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: `17547574`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xc5ec50dce7a332b3508ec4c64bec6449a15243e2b23c312b8d7cfe26766bfb7b",
            "size": 664,
            "miner": "0xCe06F92A73e888a7eb8885Bf4741eF4E5490f8Fb",
            "height": 17547574,
            "reward": "27374000000000",
            "gas_used": 27374,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T02:50:42.000000Z",
            "burnt_fees": "191618",
            "difficulty": "0",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:55.183Z",
        "request_id": "33de0990-9e4c-4d44-be20-30fb7832f895"
    },
    "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/lumia-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x30040386f42fc4a3c49514f3596aab7b6f0db842c18ff5fc6153950b978a7be9",
                "size": 549,
                "miner": "0xCe06F92A73e888a7eb8885Bf4741eF4E5490f8Fb",
                "height": 17555915,
                "reward": "0",
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:50:51.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x97d0e114c205d303ae2bd2034a0ca07f0811bea08c38b452067897caf1f8122a",
                "size": 549,
                "miner": "0xCe06F92A73e888a7eb8885Bf4741eF4E5490f8Fb",
                "height": 17555914,
                "reward": "0",
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:50:48.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x262613e08ec64cdccbcd8a65447590ace20d29d482dbe93f686ea4be4749ff6b",
                "size": 549,
                "miner": "0xCe06F92A73e888a7eb8885Bf4741eF4E5490f8Fb",
                "height": 17555913,
                "reward": "0",
                "gas_used": 0,
               
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xFF297AC2CB0a236155605EB37cB55cFCAe6D3F01",
            "name": "USDC",
            "token": {
                "name": "USDC",
                "type": "ERC-20",
                "symbol": "USDC"
            },
            "creator": "0x3Fb137161365f273Ebb8262a26569C117b6CBAfb",
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true,
            "balance_lumia": 0
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:55.651Z",
        "request_id": "5f40c101-4801-4c1b-a05d-093539353630"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x7Bc4725aF5A40fBdee884BdE51baeA7aEcc10652",
            "from": "0x044A29248b4adbc4eE2Ba509C1558D3cE262AefF",
            "hash": "0x9dd33d7d1a4aca101bbcc3f3935cca34d7fa6670ef01994bb96acbc55234b062",
            "type": 0,
            "block": 17547574,
            "nonce": 3164554,
            "method": "0xd09de08a",
            "status": "ok",
            "fee_wei": "27374000191618",
            "gas_used": 27374,
            "fee_lumia": 2.7374000191618e-5,
            "gas_price": "1000000007",
            "timestamp": "2026-06-08T02:50:42.000000Z",
            "value_wei": "0",
            "value_lumia": 0,
            "confirmations": 8342
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:55.865Z",
        "request_id": "586a549f-f616-4f7e-b1f3-a553792b5a5a"
    },
    "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: `0xFF297AC2CB0a236155605EB37cB55cFCAe6D3F01`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "USDC",
            "type": "ERC-20",
            "symbol": "USDC",
            "holders": null,
            "decimals": 6,
            "total_supply": "9062026827",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:56.014Z",
        "request_id": "b456adf4-a658-43bf-945b-5127931f29f3"
    },
    "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: `USD`

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

**Response:**
```json
{
    "data": {
        "count": 13,
        "query": "USD",
        "results": [
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0xFF297AC2CB0a236155605EB37cB55cFCAe6D3F01"
            },
            {
                "name": "Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0xee7Fc418f5659a366b548b4E205d374C1F0B46e7"
            },
            {
                "name": "Tether USDt",
                "type": "token",
                "symbol": "USDT",
                "address": "0xd523474C9F8D5e6C0FBcc5FADEA961E6639147Bf"
            },
            {
                "name": "stage-Tether USDt",
                "type": "token",
                "symbol": "s-USDT",
                "address": "0x61a4D46868431953a34c005DF0324215b4ae6044"
            },
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0x078fE045ea01cdAcFE4476c657422EBA2C8F30A2"
            },
            {
                "name": "stage-USDC",
                "type": "token",
                "symbol": "s-USDC",
                "address": "0x09bF75380297ffC7AcCF418928Eaf112b1363Dca"
            },
            {
                "name": "Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0x1E4a5963aBFD975d8c9021ce480b42188
…(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/lumia-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "lumia-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 Lumia 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. Lumia is a real-world-asset (RWA) focused Ethereum L2; gas and balances are in LUMIA. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:57.068Z",
        "request_id": "750191bf-f9de-4643-9bba-350dcc1edbf1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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