# Vanar Chain API
> Live on-chain data for Vanar Chain — an EVM Layer 1 for entertainment, gaming and brands — 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, validator and timestamp. The address endpoint returns any account's VANRY balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in VANRY, 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 VANRY, 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/vanar-api/..."
```

## Pricing
- **Free** (Free) — 4,200 calls/Mo, 2 req/s
- **Basic** ($27/Mo) — 128,000 calls/Mo, 8 req/s
- **Pro** ($82/Mo) — 755,000 calls/Mo, 20 req/s
- **Mega** ($275/Mo) — 4,250,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/vanar-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 7.01,
        "slow": 4.48,
        "unit": "gwei",
        "average": 7,
        "gas_used_today": "80741534"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:20.042Z",
        "request_id": "b181fee1-3a1d-4ec0-89c2-fb2998f4926d"
    },
    "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/vanar-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 7.01,
            "slow": 4.48,
            "average": 7
        },
        "total_blocks": 22972986,
        "coin_price_usd": null,
        "gas_used_today": "80741534",
        "market_cap_usd": 0,
        "total_addresses": "1683687",
        "total_transactions": "44580777",
        "transactions_today": "930",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:20.263Z",
        "request_id": "a90a5ca3-6385-4a20-89ee-e21009ad4e41"
    },
    "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: `22968766`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x6e6386599f599c0048b1e790f67781514d4c9e8a89d0bb2d5b6df311a688f648",
            "size": 2171,
            "miner": "0xCb342624F142e5FB42080c2457267CC400B79e00",
            "height": 22968766,
            "gas_used": 233224,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T06:18:04.000000Z",
            "burnt_fees": null,
            "difficulty": "2",
            "base_fee_per_gas": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:20.409Z",
        "request_id": "de394ed2-a7f6-4c59-a10f-4bcbde394515"
    },
    "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/vanar-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x51cd3f902ac604f5e6f64c061490a547f6b6b86f73121fb001621e8f9821307f",
                "size": 644,
                "miner": "0xCb342624F142e5FB42080c2457267CC400B79e00",
                "height": 22972990,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:49:18.000000Z",
                "burnt_fees": null,
                "difficulty": "2",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x3dc054bc79117a32ee1cb611b254c2542c5836933c76e288bd4908f41e8f5be5",
                "size": 644,
                "miner": "0x08086ceB34D63C39371cb3Eb35D815683A6ED447",
                "height": 22972989,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:49:15.000000Z",
                "burnt_fees": null,
                "difficulty": "1",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x1483201f697e66916eb7606d7a6a649b748c807d458fc44e21d51a9a245644e4",
                "size": 644,
                "miner": "0x979A606BA0bE116130fCb083F55F966573d169e2",
                "height": 22972988,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026
…(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: `0x9b23180f6AE8aD7862E4F6DF9Cc847dB47727b71`

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

**Response:**
```json
{
    "data": {
        "address": {
            "hash": "0x9b23180f6AE8aD7862E4F6DF9Cc847dB47727b71",
            "name": null,
            "token": null,
            "creator": null,
            "balance_wei": "238583622186122439413499",
            "is_contract": false,
            "is_verified": null,
            "balance_vanry": 238583.62218612243
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:20.827Z",
        "request_id": "3ae60e91-9dfa-48b3-94f0-c18e86f6a084"
    },
    "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: `0xd91635110462c8f899638ba99b4059f710d9b71a618b510d5dd5426e03d0ae42`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x41Ef42Ea477CA0c6adced91F0A2C2FA7C97CCD25",
            "from": "0x9b23180f6AE8aD7862E4F6DF9Cc847dB47727b71",
            "hash": "0xd91635110462c8f899638ba99b4059f710d9b71a618b510d5dd5426e03d0ae42",
            "type": 0,
            "block": 22968766,
            "nonce": 168515,
            "method": "setDelegatorRewards",
            "status": "ok",
            "fee_wei": "233224000000000",
            "gas_used": 233224,
            "fee_vanry": 0.000233224,
            "gas_price": "1000000000",
            "timestamp": "2026-06-08T06:18:04.000000Z",
            "value_wei": "0",
            "value_vanry": 0,
            "confirmations": 4225
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:21.512Z",
        "request_id": "1ea00526-a912-4e4f-9edd-5d6dda315695"
    },
    "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: `0x105EcA859656A3325DAd4412fb47636A93B4b463`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "The Vanar Chronicles",
            "type": "ERC-1155",
            "symbol": "TVC",
            "address": "0x105EcA859656A3325DAd4412fb47636A93B4b463",
            "holders": 3334228,
            "decimals": null,
            "total_supply": null,
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:21.658Z",
        "request_id": "01d3b6b0-a84b-4d24-839a-76ab01a05a6a"
    },
    "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: `TVC`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "TVC",
        "results": [
            {
                "name": "The Vanar Chronicles",
                "type": "token",
                "symbol": "TVC",
                "address": "0x105EcA859656A3325DAd4412fb47636A93B4b463"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:21.806Z",
        "request_id": "911b338a-e4c8-44c1-a2e7-ad284030d922"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "vanar-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 Vanar Chain 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. Vanar Chain is an EVM Layer 1 for entertainment and brands; gas, balances and fees are in VANRY. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:21.894Z",
        "request_id": "cebf0223-c55d-4e4d-93e5-9d22d1d2060c"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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