# Story API
> Live Story on-chain data via Blockscout. Story is a purpose-built Layer 1 for intellectual property (IP); gas and balances are in IP. Network stats, gas prices, latest blocks, a block by height or hash, address detail with IP 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/story-api/..."
```

## Pricing
- **Free** (Free) — 1,150 calls/Mo, 1 req/s
- **Basic** ($16/Mo) — 67,000 calls/Mo, 10 req/s
- **Pro** ($49/Mo) — 440,000 calls/Mo, 20 req/s
- **Mega** ($158/Mo) — 2,120,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/story-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.83,
        "slow": 0.61,
        "unit": "gwei",
        "average": 0.83,
        "gas_used_today": "7580081995"
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:09.282Z",
        "request_id": "b891deed-014f-4a96-9b23-e67bc2a11373"
    },
    "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/story-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.83,
            "slow": 0.61,
            "average": 0.83
        },
        "total_blocks": 18394930,
        "coin_price_usd": 0.305325,
        "gas_used_today": "7580081995",
        "market_cap_usd": 108506436.96789674,
        "total_addresses": "17546914",
        "total_transactions": "107019880",
        "transactions_today": "49251",
        "network_utilization_percent": 0.6823497777777778
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:09.444Z",
        "request_id": "3026bac1-2277-41fa-bba9-650c8fd89e8e"
    },
    "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: `18383795`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x6be008a62c2d9457572f778bdea8e84c013ce17e044fbff7864c0df6cbe4f884",
            "size": 1848,
            "miner": "0x6a55B4c324D6084f5ed85d31046a0dC9b3866F7f",
            "height": 18383795,
            "gas_used": 58698,
            "tx_count": 1,
            "gas_limit": 36000000,
            "timestamp": "2026-06-08T02:26:56.000000Z",
            "burnt_fees": "1350054",
            "difficulty": "0",
            "base_fee_per_gas": "23"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:09.598Z",
        "request_id": "4e9785a6-baa9-420b-ba27-123fdf56ced3"
    },
    "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/story-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xeaaa13120f142f99df24bf9faf34ac5b8634afc68bc221ffe03dfb14e5914b1a",
                "size": 1848,
                "miner": "0x6a55B4c324D6084f5ed85d31046a0dC9b3866F7f",
                "height": 18396094,
                "gas_used": 58686,
                "tx_count": 1,
                "gas_limit": 36000000,
                "timestamp": "2026-06-08T09:51:02.000000Z",
                "burnt_fees": "1349778",
                "difficulty": "0",
                "base_fee_per_gas": "23"
            },
            {
                "hash": "0xda8e67293783609c2cc8b4a70f6b79c2e81eb9676d84ba0ea97a4f302de21951",
                "size": 1973,
                "miner": "0x76706464f81c397A8EBD41fb95ae8C9e8E492FA0",
                "height": 18396093,
                "gas_used": 79686,
                "tx_count": 2,
                "gas_limit": 36000000,
                "timestamp": "2026-06-08T09:51:00.000000Z",
                "burnt_fees": "1832778",
                "difficulty": "0",
                "base_fee_per_gas": "23"
            },
            {
                "hash": "0x7d619c2ef9672aae45f41d83e2aec75b40967b1943f7cb824b50868ba470412e",
                "size": 1881,
                "miner": "0xa21DB8C1a286E0CF74AC0bcD6e273f799C77d4D0",
                "height": 18396092,
                "gas_used": 58686,
                "tx_count": 1,
                "gas_limit": 36000000,
         
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xF1815bd50389c46847f0Bda824eC8da914045D14",
            "name": "Stargate Bridged USDC",
            "token": {
                "name": "Stargate Bridged USDC",
                "type": "ERC-20",
                "symbol": "USDC.E"
            },
            "creator": "0x565786AbE5BA0f9D307AdfA681379F0788bEdEf7",
            "balance_ip": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:10.502Z",
        "request_id": "ec633b59-43bf-4a45-89b6-e2a73de971d3"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x74Aa6977536F498c5aD4F30C02718c6C1988a112",
            "from": "0x8878B54aE0C37a5319C0e639D308740C65e7368F",
            "hash": "0x47781130eff7bea23f660db17b206c7262723c1c07a2ca3a85bdceb74086d508",
            "type": 0,
            "block": 18383795,
            "nonce": 5696436,
            "fee_ip": 0.000353689640469738,
            "method": "0xdd10b14e",
            "status": "ok",
            "fee_wei": "353689640469738",
            "gas_used": 58698,
            "value_ip": 0,
            "gas_price": "6025582481",
            "timestamp": "2026-06-08T02:26:56.000000Z",
            "value_wei": "0",
            "confirmations": 12301
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:12.539Z",
        "request_id": "2171f5a4-f06e-4fc4-9441-e840a37f414a"
    },
    "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: `0xF1815bd50389c46847f0Bda824eC8da914045D14`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/69316/small/usdc.jpg?1758186473",
            "name": "Stargate Bridged USDC",
            "type": "ERC-20",
            "symbol": "USDC.E",
            "holders": null,
            "decimals": 6,
            "total_supply": "1043123411134",
            "exchange_rate_usd": 1.001,
            "circulating_market_cap": "37116523.52246963"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:12.705Z",
        "request_id": "e8704d24-85e4-4f4a-9e3a-e1b7cc9eadb5"
    },
    "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/story-api/v1/search?q=USD"
```

**Response:**
```json
{
    "data": {
        "count": 39,
        "query": "USD",
        "results": [
            {
                "name": "Stargate Bridged USDC",
                "type": "token",
                "symbol": "USDC.E",
                "address": "0xF1815bd50389c46847f0Bda824eC8da914045D14"
            },
            {
                "name": "Unleash Story USDC",
                "type": "token",
                "symbol": "uStoryUSDC",
                "address": "0xa9651875651Ff7F303605C23EF5c20C8f7BE8266"
            },
            {
                "name": "Bridged stgUSDT",
                "type": "token",
                "symbol": "USDT",
                "address": "0x674843C06FF83502ddb4D37c2E09C01cdA38cbc8"
            },
            {
                "name": "Unleash Story Variable Debt USDC",
                "type": "token",
                "symbol": "variableDebtStoryUSDC",
                "address": "0x43c19B3d7dF59CA773C5B41F867eb957bDf2F938"
            },
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0x49Fe4CbB645CfE997465CA9F70f03DD9c58d1acF"
            },
            {
                "name": "AI Dollar Alpha USDC",
                "type": "token",
                "symbol": "AIDaUSDC",
                "address": "0xd5255Cc08EBAf6D54ac9448822a18d8A3da29A42"
            },
            {
                "name": "Zeno Lend USDC",
                "type": "token",
              
…(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/story-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "story-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 Story (Story Protocol L1) 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. Story is a purpose-built L1 for intellectual-property (IP); gas and balances are in IP. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:13.302Z",
        "request_id": "288e134f-26f7-4ff2-82a2-c4469ddded71"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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