# Reya Chain API
> Live on-chain data for Reya Network — a trading-focused Ethereum Layer 2 — 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 ETH balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in ETH, 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 ETH, 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/reya-api/..."
```

## Pricing
- **Free** (Free) — 5,800 calls/Mo, 2 req/s
- **Basic** ($35/Mo) — 160,000 calls/Mo, 8 req/s
- **Pro** ($106/Mo) — 875,000 calls/Mo, 20 req/s
- **Mega** ($355/Mo) — 5,050,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/reya-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "399879085915"
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.886Z",
        "request_id": "c7c3fb2b-c2d0-428f-a2e4-71a53d72f48a"
    },
    "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/reya-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 153541894,
        "coin_price_usd": null,
        "gas_used_today": "399879085915",
        "market_cap_usd": 0,
        "total_addresses": "417151",
        "total_transactions": "376236280",
        "transactions_today": "393757",
        "network_utilization_percent": 4.1362851455062355e-7
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:54.040Z",
        "request_id": "f1b9eb49-b5c5-4968-8114-feaca0e9215a"
    },
    "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: `153533149`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xee9ac2c1b1ee36e4ee6c4e7eecffc6af7509f3d457639520b19e4ae782102609",
            "size": 47571,
            "miner": "0xA4b000000000000000000073657175656e636572",
            "height": 153533149,
            "gas_used": 3604746,
            "tx_count": 2,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T07:17:37.000000Z",
            "burnt_fees": "360474600000",
            "difficulty": "1",
            "base_fee_per_gas": "100000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:54.219Z",
        "request_id": "84395a9c-ba8d-49d5-8b88-20e1f9368fe7"
    },
    "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/reya-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xe7bd863d7df7186e697b93882a26da32a15f42fd7a181fdb632c84a97f217518",
                "size": 2005,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 153553441,
                "gas_used": 17667809,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:48:52.000000Z",
                "burnt_fees": "1766780900000",
                "difficulty": "1",
                "base_fee_per_gas": "100000"
            },
            {
                "hash": "0x7cdc97560e60e777c40cef9c12bee67d826fe2463222c390ea927db43b4ffc3e",
                "size": 2005,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 153553440,
                "gas_used": 17622380,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:48:52.000000Z",
                "burnt_fees": "1762238000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000"
            },
            {
                "hash": "0x8f9827274e03a3caaf78073c8508eb032eb194c0359742082c9c83f3ca797bad",
                "size": 47571,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 153553439,
                "gas_used": 3868487,
                "tx_count": 2,

…(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: `0xf9E50a2584CFBD3d23468A395114461E5154fD61`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xf9E50a2584CFBD3d23468A395114461E5154fD61",
            "name": null,
            "token": null,
            "creator": null,
            "balance_eth": 0.050205110887059694,
            "balance_wei": "50205110887059700",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:54.710Z",
        "request_id": "6e09b930-ff0d-4b3d-b2e3-d893b31b48d5"
    },
    "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: `0x1e923ad12ada5b5b06e3cdf08c10a86aaf8a09697dd4caa846f160b100fc9236`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0xED28d27dFcA47AD2513C9f2e2d3C098C2eA5A47F",
            "from": "0xf9E50a2584CFBD3d23468A395114461E5154fD61",
            "hash": "0x1e923ad12ada5b5b06e3cdf08c10a86aaf8a09697dd4caa846f160b100fc9236",
            "type": 1,
            "block": 153533149,
            "nonce": 26014341,
            "method": "tryAggregatePreservingError",
            "status": "ok",
            "fee_eth": 3.604746e-7,
            "fee_wei": "360474600000",
            "gas_used": 3604746,
            "gas_price": "100000",
            "timestamp": "2026-06-08T07:17:37.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 20297
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:55.477Z",
        "request_id": "7fee54dc-83fc-46a3-8bf0-7ec47141f798"
    },
    "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: `0x0354e71e0444d08e0Ce5E49EB91531A1Cac61144`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Reya Account NFT",
            "type": "ERC-721",
            "symbol": "REYA",
            "holders": null,
            "decimals": null,
            "total_supply": "246762",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:55.588Z",
        "request_id": "7f602844-d17a-4e81-869b-e5f71f459d69"
    },
    "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: `REYA`

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

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "REYA",
        "results": [
            {
                "name": "Reya Account NFT",
                "type": "token",
                "symbol": "REYA",
                "address": "0x0354e71e0444d08e0Ce5E49EB91531A1Cac61144"
            },
            {
                "name": "Reya OG SBT",
                "type": "token",
                "symbol": "REYAOG",
                "address": "0x14D7c1eFC024E118DF70B241afbD2447d37f1ed6"
            },
            {
                "name": "Reya USD",
                "type": "token",
                "symbol": "RUSD",
                "address": "0xa9F32a851B1800742e47725DA54a09A7Ef2556A3"
            },
            {
                "name": "ReyaCat",
                "type": "token",
                "symbol": "CAT",
                "address": "0x2D1f58bA8ffd9f26e5717d7a76db3D6E068b5D34"
            },
            {
                "name": "ReyaCat",
                "type": "token",
                "symbol": "CAT",
                "address": "0x1bbF1f0A51B0d2ff6650f16A673E9bE98A22c6Bb"
            },
            {
                "name": "Reya Amber LM",
                "type": "token",
                "symbol": "rAmber",
                "address": "0x63FC3F743eE2e70e670864079978a1deB9c18b76"
            },
            {
                "name": "Reya Exchange Pass",
                "type": "token",
                "symbol": "ReyaEPass",
                "address": "0x76e3f2667aC55d5
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "reya-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 Reya Network 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. Reya is a trading-focused Ethereum Layer 2; gas, balances and fees are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:56.088Z",
        "request_id": "b3caa576-f1f2-4fd6-b443-2e818771e92a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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