# LightLink Chain API
> Live on-chain data for LightLink — an Ethereum Layer 2 with gasless enterprise transactions — via its public Blockscout explorer (no wallet, no key). The stats endpoint returns chain-wide totals (blocks, transactions, addresses, average block time, gas used); gas gives the current gas-price oracle (slow/average/fast). Blocks lists the latest blocks, and a single block resolves by height or by hash with its transaction count, gas, miner and timestamp. The address endpoint returns any account's ETH balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in ETH, fee, status and block. The token endpoint returns an ERC-20 token's metadata (name, symbol, decimals, total supply, holders) by contract address, and search runs a universal lookup across addresses, tokens, blocks and transactions. Gas, balances, values and fees are denominated in ETH, the native coin. Real on-chain data straight from the explorer, refreshed every call — no key. 9 endpoints. For multi-chain coverage combine with the other oanor chain APIs (Ethereum, Base, Arbitrum and more).

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

## Pricing
- **Free** (Free) — 2,650 calls/Mo, 2 req/s
- **Basic** ($19/Mo) — 99,000 calls/Mo, 8 req/s
- **Pro** ($58/Mo) — 635,000 calls/Mo, 20 req/s
- **Mega** ($195/Mo) — 3,450,000 calls/Mo, 50 req/s

## Endpoints

### Chain

#### `GET /v1/gas` — Gas-price oracle

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

**Response:**
```json
{
    "data": {
        "fast": 0.12,
        "slow": 0.12,
        "unit": "gwei",
        "average": 0.12,
        "gas_used_today": "4020438057"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:43.111Z",
        "request_id": "0844c101-92be-42ea-8a83-caff754890a4"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Chain stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.12,
            "slow": 0.12,
            "average": 0.12
        },
        "total_blocks": 210588206,
        "coin_price_usd": 1658.65,
        "gas_used_today": "4020438057",
        "market_cap_usd": 200173330989.52188,
        "total_addresses": "5689210",
        "total_transactions": "86721980",
        "transactions_today": "66932",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:43.271Z",
        "request_id": "4b48bf20-c311-42bf-8cd9-3cb9d30642fa"
    },
    "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: `210563303`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xc51d075618d08026e128f2fcc1b23d64d1f8dde85fcc8d0c2cc4450bdbf09202",
            "size": 804,
            "miner": "0x4AD422d61174e9660bE6914B2F6fD799361300C5",
            "height": 210563303,
            "gas_used": 34230,
            "tx_count": 1,
            "gas_limit": 15000000,
            "timestamp": "2026-06-08T05:22:22.000000Z",
            "burnt_fees": "0",
            "difficulty": "500",
            "base_fee_per_gas": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:43.440Z",
        "request_id": "85db52d2-6669-4086-a309-5759456d6952"
    },
    "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/lightlink-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x930074c19a4490f10f9de28a481617ed038500180007edb214a8b07628237547",
                "size": 614,
                "miner": "0x4AD422d61174e9660bE6914B2F6fD799361300C5",
                "height": 210595110,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 15000000,
                "timestamp": "2026-06-08T09:49:41.000000Z",
                "burnt_fees": "0",
                "difficulty": "500",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x0b1d8ad0c10f7416f980e0a2e65fa718df0b06ee93ccdc684c76a6af31aec027",
                "size": 604,
                "miner": "0x4AD422d61174e9660bE6914B2F6fD799361300C5",
                "height": 210595109,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 15000000,
                "timestamp": "2026-06-08T09:49:40.000000Z",
                "burnt_fees": "0",
                "difficulty": "500",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x87c4921eb450a43cdb0ab41ced1a473eb7f6434973c32465b381cbd4b52b504a",
                "size": 600,
                "miner": "0x4AD422d61174e9660bE6914B2F6fD799361300C5",
                "height": 210595108,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 15000000,
                "timestamp": 
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Account balance & holdings

**Parameters:**
- `address` (query, required, string) — Account address (0x + 40 hex) Example: `0x4566ED6c7a7fFc90E2C7cfF7eB9156262afD2fDe`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x4566ED6c7a7fFc90E2C7cfF7eB9156262afD2fDe",
            "name": null,
            "token": null,
            "creator": null,
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:44.680Z",
        "request_id": "f8a563c1-79e5-4cf8-850d-a9e54cbd9bcb"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x0d2aFE7F72EabFaB68Edecc287893D9073863B6f",
            "from": "0x4566ED6c7a7fFc90E2C7cfF7eB9156262afD2fDe",
            "hash": "0x1da36071f2afc909907457f37c8cca18cbe8b01241dc3db89b11b90522cd39f0",
            "type": 0,
            "block": 210563303,
            "nonce": 40732331,
            "method": "workMyDirefulOwner",
            "status": "ok",
            "fee_eth": 0,
            "fee_wei": "0",
            "gas_used": 34230,
            "gas_price": "0",
            "timestamp": "2026-06-08T05:22:22.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 31813
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:45.963Z",
        "request_id": "72cb5213-ab3e-41bf-b564-02e47baff929"
    },
    "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: `0xbCF8C1B03bBDDA88D579330BDF236B58F8bb2cFd`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/39943/standard/USDC_Icon.png?1724885551",
            "name": "Bridged USDC (Stargate)",
            "type": "ERC-20",
            "symbol": "USDC.e",
            "holders": null,
            "decimals": 6,
            "total_supply": "44544164129",
            "exchange_rate_usd": 0.999151,
            "circulating_market_cap": "37135512.60088829"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:46.124Z",
        "request_id": "cac3ce22-bdab-458d-a85d-672d6d44db66"
    },
    "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: `USDC.e`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "USDC.e",
        "results": [
            {
                "name": null,
                "type": "metadata_tag",
                "address": "0x408A625596f47314e1FD4a6cBCE84C4A8695bA3f"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:46.493Z",
        "request_id": "9a5e90a2-f3bd-4e1e-a3e2-131319575b5e"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "lightlink-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 LightLink 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. LightLink is an Ethereum Layer 2 with gasless enterprise transactions; gas, balances and fees are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:46.607Z",
        "request_id": "8d74baf7-c632-42b0-b40e-204faf3e5ea3"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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