# Karak Chain API
> Live on-chain data for Karak mainnet (the universal restaking Ethereum L2, 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 Layer-2 chain data with the rotating proxy as automatic fallback — 9 endpoints. Ideal for wallets, explorers, restaking dashboards, portfolio trackers and on-chain monitoring on Karak.

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

## Pricing
- **Free** (Free) — 4,900 calls/Mo, 2 req/s
- **Basic** ($9/Mo) — 118,500 calls/Mo, 8 req/s
- **Pro** ($28/Mo) — 645,000 calls/Mo, 20 req/s
- **Mega** ($78/Mo) — 3,350,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/karak-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "2599026292"
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:58.022Z",
        "request_id": "936e9f18-72ba-4332-a77a-278a3c20c0ce"
    },
    "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/karak-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 38770700,
        "coin_price_usd": null,
        "gas_used_today": "2599026292",
        "market_cap_usd": 0,
        "total_addresses": "113103",
        "total_transactions": "39074894",
        "transactions_today": "43261",
        "network_utilization_percent": 0.20209213333333334
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:58.302Z",
        "request_id": "2947a733-d2e8-457f-b973-39b18e016482"
    },
    "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: `38760000`
- `hash` (query, optional, string) — Block hash (0x + 64 hex)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x1d74b1109318210f53b249b313a3f197b1b5418f682d1e53994d6bdd578e2c2e",
            "size": 903,
            "miner": "0x4200000000000000000000000000000000000011",
            "height": 38760000,
            "gas_used": 54814,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T10:43:35.000000Z",
            "burnt_fees": "13813128",
            "difficulty": "0",
            "base_fee_per_gas": "252"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:58.593Z",
        "request_id": "fe16b79f-d374-4a41-b762-4f079c39f6a6"
    },
    "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/karak-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x7b78a617d34e8996e6d3f498d7418e41ce33be73ae08a54ecdcf73a810d449c6",
                "size": 904,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 38773871,
                "gas_used": 71914,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T18:25:57.000000Z",
                "burnt_fees": "18122328",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0x6ba7ac681b2993ff4392139f18b6c1f0191d2aa58e6f44d7c30be33973b2c1c8",
                "size": 904,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 38773870,
                "gas_used": 70028,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T18:25:55.000000Z",
                "burnt_fees": "17647056",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0x2ec4a07cb5e78a39415c0420eb61700bcf2b0e0c0a875ba564523733c051745a",
                "size": 903,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 38773869,
                "gas_used": 54814,
                "tx_count": 1,
                "gas_limit": 30000000,
        
…(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: `0x0C8A4800Eb0e189F1540Fdf9cA3718764c26A9a8`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x0C8A4800Eb0e189F1540Fdf9cA3718764c26A9a8",
            "name": null,
            "token": null,
            "creator": null,
            "balance_eth": 0.2961483916658086,
            "balance_wei": "296148391665808556",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:59.464Z",
        "request_id": "3582bf8b-fa36-4061-a558-1fe6024fd13d"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0xd6034F9147CF7528e857403Dea93bc45743295eb",
            "from": "0x0C8A4800Eb0e189F1540Fdf9cA3718764c26A9a8",
            "hash": "0x1b32c763d539ac6e9a8530a6c226760d929529f70c74f91c4878ae422a855ca3",
            "type": 2,
            "block": 38762301,
            "nonce": 47611,
            "method": "0xe420e3db",
            "status": "ok",
            "fee_eth": 5.8011615244e-8,
            "fee_wei": "58011615244",
            "gas_used": 57997,
            "gas_price": "1000252",
            "timestamp": "2026-06-08T12:00:17.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 11572
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:02.786Z",
        "request_id": "a3c99072-61cf-4bc8-90a2-023490db609f"
    },
    "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: `0x4200000000000000000000000000000000000006`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Wrapped Ether",
            "type": "ERC-20",
            "symbol": "WETH",
            "address": "0x4200000000000000000000000000000000000006",
            "holders": 1169,
            "decimals": 18,
            "total_supply": "1607508163611153649615",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:03.011Z",
        "request_id": "3d518371-7885-4614-9ab5-d24c89bfcdf3"
    },
    "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: `karak`

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

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "karak",
        "results": [
            {
                "name": "Bridged USDC (Karak)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D"
            },
            {
                "name": "Karak-Wrapped ETH",
                "type": "token",
                "symbol": "kWETH",
                "address": "0x848B647FE1b809718A90af3701Fbab9b87BA9499"
            },
            {
                "name": "Bridged USDC (Karak)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0xeeA2B0a0f8343E328EF90acb8820275e4E5e60a2"
            },
            {
                "name": "Bridged USDC (Karak)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0xd121147d7e34b59A70a1FC4a05854697C3c009D0"
            },
            {
                "name": "Bridged USDC (Karak)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0x0EaB45314b0b4597e305b347f92C8DBD6084Cc9B"
            },
            {
                "name": "Karak-Restaked Swell ETH",
                "type": "token",
                "symbol": "krswETH",
                "address": "0xf00f6bD49F210E4Bc85dfd4Ea26B1dB3FF8Ac648"
            },
            {
                "name": "Karak-USD Coin",
                "type": "token",
                "s
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "karak-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 Karak (ETH) L2 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:03.453Z",
        "request_id": "64d8571c-53a9-4bc6-b56b-cab9d737813f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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