# Shape API
> Live Shape on-chain data via Blockscout. Shape is a creator- and NFT-focused Ethereum L2 built on the OP Stack; 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/shape-api/..."
```

## Pricing
- **Free** (Free) — 1,400 calls/Mo, 1 req/s
- **Basic** ($12/Mo) — 76,000 calls/Mo, 10 req/s
- **Pro** ($37/Mo) — 510,000 calls/Mo, 20 req/s
- **Mega** ($122/Mo) — 2,450,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/shape-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.02,
        "slow": 0.02,
        "unit": "gwei",
        "average": 0.02,
        "gas_used_today": "2350373981"
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:35.965Z",
        "request_id": "7d241aa1-123d-448c-a841-e38ae44667ff"
    },
    "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/shape-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.02,
            "slow": 0.02,
            "average": 0.02
        },
        "total_blocks": 29581171,
        "coin_price_usd": null,
        "gas_used_today": "2350373981",
        "market_cap_usd": 0,
        "total_addresses": "831761",
        "total_transactions": "41727996",
        "transactions_today": "43996",
        "network_utilization_percent": 0.21077666666666667
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:36.140Z",
        "request_id": "168c9a09-66af-4dc0-8058-117b0c88e892"
    },
    "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: `29569054`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x6594d2f7e105e4bb1ad70a9b94068fef5f40880140ebba047235387087bd4461",
            "size": 909,
            "miner": "0x4200000000000000000000000000000000000011",
            "height": 29569054,
            "gas_used": 46242,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T01:36:19.000000Z",
            "burnt_fees": "462420000000",
            "difficulty": "0",
            "base_fee_per_gas": "10000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:36.345Z",
        "request_id": "e2e1aa9a-f1db-4174-b044-ea208d214ea5"
    },
    "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/shape-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x1eadb0c9a69da07a6e03b75f0c0a7e4eb572e6a42b152c67824dfab7804c57b5",
                "size": 909,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 29583912,
                "gas_used": 46230,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:35.000000Z",
                "burnt_fees": "462300000000",
                "difficulty": "0",
                "base_fee_per_gas": "10000000"
            },
            {
                "hash": "0x88cd512473dafbbcc6f50807aee240066f5d44125e674732d60ea793d5867278",
                "size": 909,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 29583911,
                "gas_used": 57418,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:33.000000Z",
                "burnt_fees": "574180000000",
                "difficulty": "0",
                "base_fee_per_gas": "10000000"
            },
            {
                "hash": "0xff4352f996fb42f634709b7578d695aa7437bbbf335bb32c3c3ac3f51dcd1cc2",
                "size": 909,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 29583910,
                "gas_used": 46242,
                "tx_count": 1,
                "gas_limit": 
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xdb7DD8B00EdC5778Fe00B2408bf35C7c054f8BBe",
            "name": "FiatTokenProxy",
            "token": {
                "name": "Shape Bridged USDC (Shape)",
                "type": "ERC-20",
                "symbol": "USDC.E"
            },
            "creator": "0xc326A6157a5A66A968689aE13EEE0C8078062886",
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:38.075Z",
        "request_id": "27e5c8d5-5d22-4723-bc99-bb0896a4112e"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x4200000000000000000000000000000000000015",
            "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
            "hash": "0x71f24aa2768e5d140304802b5d7dc53106f7053d732b75a8fb257eb327455481",
            "type": 126,
            "block": 29569054,
            "nonce": 29569056,
            "method": "setL1BlockValuesJovian",
            "status": "ok",
            "fee_eth": 0,
            "fee_wei": "0",
            "gas_used": 46242,
            "gas_price": "0",
            "timestamp": "2026-06-08T01:36:19.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 14859
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:38.570Z",
        "request_id": "73817d92-c33e-4515-86f5-9a6d39cc8ff6"
    },
    "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: `0xdb7DD8B00EdC5778Fe00B2408bf35C7c054f8BBe`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/102172930/small/usdc_normal.png?1776672447",
            "name": "Shape Bridged USDC (Shape)",
            "type": "ERC-20",
            "symbol": "USDC.E",
            "holders": null,
            "decimals": 6,
            "total_supply": "218029894389",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:38.724Z",
        "request_id": "16991471-b8eb-4f7c-8bef-a01b5994f812"
    },
    "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: `USD`

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

**Response:**
```json
{
    "data": {
        "count": 2,
        "query": "USD",
        "results": [
            {
                "name": "Shape Bridged USDC (Shape)",
                "type": "token",
                "symbol": "USDC.E",
                "address": "0xdb7DD8B00EdC5778Fe00B2408bf35C7c054f8BBe"
            },
            {
                "name": null,
                "type": "metadata_tag",
                "address": "0x2859a4eBcB58c8Dd5cAC1419C4F63A071b642B20"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:39.127Z",
        "request_id": "1e9525ec-35aa-4822-b3fe-fe1d30716516"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "shape-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 Shape (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. Shape is a creator- and NFT-focused Ethereum L2 (OP Stack); gas and balances are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:39.245Z",
        "request_id": "3d64a5a1-e101-4e7e-b11c-23654e78a5ee"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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