# BOB API
> Live BOB on-chain data via Blockscout. BOB (Build on Bitcoin) is a hybrid Ethereum L2 bridging Bitcoin and Ethereum; gas and balances are in ETH. Network stats, gas prices, latest blocks, a block by height or hash, address detail with ETH balance, a transaction by hash, ERC-20 token metadata and a universal search across addresses, tokens, blocks and transactions. Real data, no key.

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

## Pricing
- **Free** (Free) — 1,800 calls/Mo, 1 req/s
- **Basic** ($10/Mo) — 78,000 calls/Mo, 10 req/s
- **Pro** ($33/Mo) — 520,000 calls/Mo, 20 req/s
- **Mega** ($110/Mo) — 2,600,000 calls/Mo, 50 req/s

## Endpoints

### Network

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

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

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "2372669758"
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:47.725Z",
        "request_id": "a2189fd2-2e3a-48f3-9419-177b255a7e51"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 34024950,
        "coin_price_usd": null,
        "gas_used_today": "2372669758",
        "market_cap_usd": 0,
        "total_addresses": "1417887",
        "total_transactions": "48957107",
        "transactions_today": "45982",
        "network_utilization_percent": 0.21820293333333332
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:48.035Z",
        "request_id": "aa246aea-e298-4b9d-a404-e12db9047340"
    },
    "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: `34009906`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x62367f74ac594197c411c0fd41ca851167814e124886b8abc38abe9f80dafc4e",
            "size": 907,
            "miner": "0x4200000000000000000000000000000000000011",
            "height": 34009906,
            "gas_used": 46302,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T01:23:19.000000Z",
            "burnt_fees": "11668104",
            "difficulty": "0",
            "base_fee_per_gas": "252"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:48.351Z",
        "request_id": "5531a640-f98f-4746-90f4-1fea6f8c2d8b"
    },
    "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/bob-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xb6ad2fb131ce2210a6510549392d18342db404b0c7abf24cba32a5d0d924ece9",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 34025160,
                "gas_used": 46302,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:47.000000Z",
                "burnt_fees": "11668104",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0x41316893264a8ec0a0f2e3ea473571a892ac116d338fc864dddeed3e88bb37af",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 34025159,
                "gas_used": 57490,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:45.000000Z",
                "burnt_fees": "14487480",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0x9ca234cc7e423bf07e216ba4930bbe35d72e7b4ecc4dfcc9bf61ea8e3c27f6c6",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 34025158,
                "gas_used": 46302,
                "tx_count": 1,
                "gas_limit": 30000000,
        
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address detail with ETH balance

**Parameters:**
- `address` (query, required, string) — Address hash Example: `0xe75D0fB2C24A55cA1e3F96781a2bCC7bdba058F0`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xe75D0fB2C24A55cA1e3F96781a2bCC7bdba058F0",
            "name": "Bridged USDC (BOB)",
            "token": {
                "name": "Bridged USDC (BOB)",
                "type": "ERC-20",
                "symbol": "USDC.e"
            },
            "creator": "0xe4E5e395E9efb3C1bB37D9c53Ad2F115c6f91FfB",
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:49.514Z",
        "request_id": "e41f7f47-16b3-49f0-a907-179bdb3a78e9"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

#### `GET /v1/transaction` — A transaction by hash

**Parameters:**
- `hash` (query, required, string) — Transaction hash Example: `0xcb03262037a84507bb4555c583ecc750ea965a83a695d92619ef11a99cfed1bd`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x4200000000000000000000000000000000000015",
            "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
            "hash": "0xcb03262037a84507bb4555c583ecc750ea965a83a695d92619ef11a99cfed1bd",
            "type": 126,
            "block": 34009906,
            "nonce": 34009909,
            "method": "setL1BlockValuesJovian",
            "status": "ok",
            "fee_eth": 1.5e-5,
            "fee_wei": "15000000000000",
            "gas_used": 46302,
            "gas_price": "0",
            "timestamp": "2026-06-08T01:23:19.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 15255
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:49.855Z",
        "request_id": "366b3b80-6b38-46f2-99f4-258f09b6d749"
    },
    "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: `0xe75D0fB2C24A55cA1e3F96781a2bCC7bdba058F0`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Bridged USDC (BOB)",
            "type": "ERC-20",
            "symbol": "USDC.e",
            "holders": null,
            "decimals": 6,
            "total_supply": "145076848325",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:50.137Z",
        "request_id": "151a8d91-3b2d-4057-ab0e-764acead5c16"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal on-chain search

**Parameters:**
- `q` (query, required, string) — Address, token, block or tx Example: `USDC`

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

**Response:**
```json
{
    "data": {
        "count": 22,
        "query": "USDC",
        "results": [
            {
                "name": "Bridged USDC (BOB)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0xe75D0fB2C24A55cA1e3F96781a2bCC7bdba058F0"
            },
            {
                "name": "sb USDC",
                "type": "token",
                "symbol": "sbUSDC",
                "address": "0x5D7723648daEc273f3EAD53C6472490bBd4f0a7c"
            },
            {
                "name": "Segment USDC",
                "type": "token",
                "symbol": "seUSDC",
                "address": "0xc344000a28F00E879c566f1Ec259da24D6279592"
            },
            {
                "name": "LayerBank USDC.e",
                "type": "token",
                "symbol": "lUSDC",
                "address": "0x462EBb8395b6c08661b3d9F0Ca8819527BCF3Db3"
            },
            {
                "name": "xWETH-USDCe3",
                "type": "token",
                "symbol": "xWETH-USDCe3",
                "address": "0x9616052273A598BC04BD1Ad7f7A753157C24f77E"
            },
            {
                "name": "MOCK_USDC",
                "type": "token",
                "symbol": "mUSDC",
                "address": "0xBd95925809F916eCFe140f6Ef70eA43185c0ECD9"
            },
            {
                "name": "MOCK2_USDC",
                "type": "token",
                "symbol": "m2USDC",
                "address": "0x
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "bob-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 BOB (Build on Bitcoin L2) 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. BOB (Build on Bitcoin) is a hybrid Ethereum L2; gas and balances are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:50.560Z",
        "request_id": "16adfbe5-a2a7-4aba-8706-05bf8686933d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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