# RARI Chain API
> Live on-chain data for RARI Chain mainnet (an Arbitrum-Orbit NFT-focused Ethereum L3, native ETH) via Blockscout — no key. Read network stats (block height, total transactions, gas), a gas oracle in gwei, the most recent blocks and full block detail by height or hash, any address balance and contract info, full transaction detail, ERC-20 token detail by contract, and a universal search across addresses, tokens, blocks and transactions. Real chain data with the rotating proxy as automatic fallback — 9 endpoints. Ideal for wallets, explorers, NFT tooling, portfolio trackers and on-chain monitoring on RARI Chain.

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

## Pricing
- **Free** (Free) — 4,400 calls/Mo, 2 req/s
- **Basic** ($8/Mo) — 105,000 calls/Mo, 8 req/s
- **Pro** ($25/Mo) — 580,000 calls/Mo, 20 req/s
- **Mega** ($70/Mo) — 2,800,000 calls/Mo, 50 req/s

## Endpoints

### Network

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

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

**Response:**
```json
{
    "data": {
        "fast": 0.15,
        "slow": 0.15,
        "unit": "gwei",
        "average": 0.15,
        "gas_used_today": "166367093"
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:07.641Z",
        "request_id": "680b5a7e-6fac-4704-b6da-bef4d5287c30"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.15,
            "slow": 0.15,
            "average": 0.15
        },
        "total_blocks": 4027825,
        "coin_price_usd": null,
        "gas_used_today": "166367093",
        "market_cap_usd": 0,
        "total_addresses": "1838525",
        "total_transactions": "9280454",
        "transactions_today": "5379",
        "network_utilization_percent": 6.787901796201368e-9
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:07.942Z",
        "request_id": "c3b6af8e-73d5-4d6a-869b-82fadebcba7e"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

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

**Parameters:**
- `height` (query, optional, string) — Block height Example: `4027000`
- `hash` (query, optional, string) — Block hash (0x + 64 hex)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x273f5be5903c9ef24aee4af4105e8da89c251e886ae958b672ca30eecb604271",
            "size": 1007,
            "miner": "0xA4b000000000000000000073657175656e636572",
            "height": 4027000,
            "gas_used": 38307,
            "tx_count": 2,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T07:57:21.000000Z",
            "burnt_fees": "5746050000000",
            "difficulty": "1",
            "base_fee_per_gas": "150000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:08.247Z",
        "request_id": "22f31df4-fe1c-49b1-8c9f-6c7e97f7daab"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Most recent blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xa31f6da9287a04a72be53f98bcf872077656b0571ddc2ba082e43824d1906386",
                "size": 887,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 4027846,
                "gas_used": 25086,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T18:25:06.000000Z",
                "burnt_fees": "3762900000000",
                "difficulty": "1",
                "base_fee_per_gas": "150000000"
            },
            {
                "hash": "0x7f83ea44f64051fddb860e1c5bd69cb0ea3cd3dd4f53e8e3cf0b75caae2f5800",
                "size": 887,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 4027845,
                "gas_used": 25086,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T18:25:04.000000Z",
                "burnt_fees": "3762900000000",
                "difficulty": "1",
                "base_fee_per_gas": "150000000"
            },
            {
                "hash": "0xcdb8bb1998a5df0de7efa84f542fb12985ce536ad186f19180faa6d4b00096a3",
                "size": 887,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 4027844,
                "gas_used": 25086,
                "tx_count": 2,
            
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x339d413CCEfD986b1B3647A9cfa9CBbE70A30749",
            "name": null,
            "token": null,
            "creator": null,
            "balance_eth": 0.847228964407105,
            "balance_wei": "847228964407105000",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:09.229Z",
        "request_id": "1def9b21-d0c2-4744-9cb4-67f45da9d0e8"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x3c2269811836af69497E5F486A85D7316753cf62",
            "from": "0x339d413CCEfD986b1B3647A9cfa9CBbE70A30749",
            "hash": "0xb9bc0d01153237e336701357ee8feafa67ced6c975944228812fee586edcbaf5",
            "type": 0,
            "block": 4027354,
            "nonce": 1564668,
            "method": "0x3161b7f6",
            "status": "ok",
            "fee_eth": 5.745e-6,
            "fee_wei": "5745000000000",
            "gas_used": 38300,
            "gas_price": "150000000",
            "timestamp": "2026-06-08T11:37:32.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 493
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:15.789Z",
        "request_id": "e7c6fda1-a03a-4f15-bf5f-56a28d6c1cea"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

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

**Parameters:**
- `address` (query, required, string) — Token contract (0x + 40 hex) Example: `0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Bridged USDC (Stargate)",
            "type": "ERC-20",
            "symbol": "USDC.e",
            "address": "0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6",
            "holders": 16503,
            "decimals": 6,
            "total_supply": "27725586927",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:16.091Z",
        "request_id": "0c061b0a-e21c-4a48-a28f-247559724a11"
    },
    "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: `rari`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "rari",
        "results": [
            {
                "name": "Rarible",
                "type": "token",
                "symbol": "RARI",
                "address": "0xD9F3BfeD52ec008A13cF08C7382a917Eb364Cc32"
            },
            {
                "name": "Rarible OG",
                "type": "token",
                "symbol": "RFAR",
                "address": "0x2c57bD140e8E28a9A6aEd519c80510Db33cF4893"
            },
            {
                "name": "Rarible",
                "type": "token",
                "symbol": "RARI",
                "address": "0xBFb17500344bA3475d46091F5c8f1e33B31ed909"
            },
            {
                "name": "RARI",
                "type": "token",
                "symbol": "RARI",
                "address": "0xCf78572A8fE97b2B9a4B9709f6a7D9a863c1b8E0"
            },
            {
                "name": "Proud To Be Rariain&#39;s",
                "type": "token",
                "symbol": "PTBRS",
                "address": "0x366EC1F45151Bf60d613859f89D9D6eea72FE9D2"
            },
            {
                "name": "Discover RariChain On Dora",
                "type": "token",
                "symbol": "DROD",
                "address": "0x5018C2a3992cfdc651e6D036A9EEc2b978dc7A32"
            },
            {
                "name": "Rari LST",
                "type": "token",
                "symbol": "stRARI",
                "address": "0x6a74F6b4f468
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "rari-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 & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live RARI Chain (ETH) on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances, 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-08T18:26:16.744Z",
        "request_id": "2df61e30-f22d-43e6-90d1-8bb6e175a0cf"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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