# Boba Network Chain API
> Real-time on-chain data for Boba Network (chain-id 288), an Optimistic-Rollup Ethereum Layer-2 scaling solution where gas is paid in ETH (the BOBA token is a separate ecosystem ERC-20). The status endpoint returns the chain id, network id, latest block height, native symbol and node client version so you can confirm the chain is live and synced. The block endpoint returns a block by decimal or 0x-hex height — or the latest block when no height is given — with its hash, parent hash, timestamp (raw and ISO), transaction count, gas used and limit, base fee and miner. The gas endpoint returns the current gas price in both wei and gwei at the latest block. The balance endpoint returns the native ETH balance (in wei and human-readable units) and the transaction count (nonce) for any 0x address. The meta endpoint documents the chain id, decimals and ecosystem. Reads a live Boba JSON-RPC node directly, so values are current to the latest block. Live, nothing stored. 5 endpoints. This serves native-coin and chain data; for ERC-20 token balances (including the BOBA token) or contract calls use a dedicated token/contract API.

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

## Pricing
- **Free** (Free) — 300 calls/Mo, 2 req/s
- **Basic** ($13/Mo) — 23,000 calls/Mo, 5 req/s
- **Pro** ($35/Mo) — 124,000 calls/Mo, 20 req/s
- **Mega** ($78/Mo) — 560,000 calls/Mo, 60 req/s

## Endpoints

### Chain

#### `GET /v1/block` — Block by height or latest

**Parameters:**
- `number` (query, optional, string) — Block height (decimal or 0x-hex) or 'latest'. Omit for the latest block. Example: `20000000`

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

**Response:**
```json
{
    "data": {
        "hash": "0x42ceaafae26c41d6c5c715f2cc85e610737913d8e32e2482bce442aa75444113",
        "miner": "0x4200000000000000000000000000000000000011",
        "number": 20000000,
        "gas_used": 43851,
        "gas_limit": 30000000,
        "timestamp": 1751004841,
        "size_bytes": 849,
        "parent_hash": "0x6fd3ef22244ccd60306e8a7c8575a425306f153d668da6be23038715fca08987",
        "timestamp_iso": "2025-06-27T06:14:01.000Z",
        "transaction_count": 1,
        "base_fee_per_gas_wei": "252"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:03.807Z",
        "request_id": "a4315d84-e123-4153-8c9d-aa5fac35fede"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/gas` — Current gas price

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

**Response:**
```json
{
    "data": {
        "at_block": 35275611,
        "gas_price_wei": "1000252",
        "native_symbol": "ETH",
        "gas_price_gwei": 0.001
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:04.359Z",
        "request_id": "7e387c53-69db-40c6-81cb-e921546a2d3e"
    },
    "status": "ok",
    "message": "Gas price retrieved successfully",
    "success": true
}
```

#### `GET /v1/status` — Chain status

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

**Response:**
```json
{
    "data": {
        "chain": "Boba Network",
        "chain_id": 288,
        "network_id": 288,
        "rpc_healthy": true,
        "latest_block": 35275611,
        "native_symbol": "ETH",
        "client_version": "Tenderly/1.0"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:04.938Z",
        "request_id": "81d7d0fe-3b5b-4a38-9f4f-5076e2d0e22b"
    },
    "status": "ok",
    "message": "Chain status retrieved successfully",
    "success": true
}
```

### Account

#### `GET /v1/balance` — Native ETH balance for an address

**Parameters:**
- `address` (query, required, string) — 0x-prefixed 40-hex EVM address Example: `0x000000000000000000000000000000000000dEaD`

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

**Response:**
```json
{
    "data": {
        "address": "0x000000000000000000000000000000000000dEaD",
        "balance": "0.000118988000940438",
        "balance_wei": "118988000940438",
        "native_symbol": "ETH",
        "transaction_count": 0
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:05.176Z",
        "request_id": "f957453f-91f2-4472-a45c-5baed99b4b5b"
    },
    "status": "ok",
    "message": "Balance retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Chain metadata

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

**Response:**
```json
{
    "data": {
        "type": "EVM Optimistic Rollup L2 (Ethereum)",
        "chain": "Boba Network",
        "network": "mainnet",
        "chain_id": 288,
        "decimals": 18,
        "ecosystem": "Boba Network — an Optimistic-Rollup Ethereum Layer-2 (gas paid in ETH); BOBA is the ecosystem ERC-20 token, hybrid compute via Turing.",
        "endpoints": [
            "/v1/status",
            "/v1/block",
            "/v1/gas",
            "/v1/balance",
            "/v1/meta"
        ],
        "description": "Boba Network is an Optimistic-Rollup Ethereum Layer-2 scaling solution. Gas is paid in ETH; the BOBA token is a separate ecosystem ERC-20 (this API serves the native ETH gas balance and chain data).",
        "documentation": "https://boba-api.oanor.dev",
        "native_symbol": "ETH"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:05.261Z",
        "request_id": "3c624e55-1b05-45aa-af50-761ea895894c"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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