# Flare Chain API
> Live on-chain data for Flare (FLR) mainnet via Blockscout — no key. Read network stats (block height, total transactions, gas), a gas oracle in gwei, the most recent blocks and full block detail by height or hash, any address balance and contract info, full transaction detail, ERC-20 token detail by contract, and a universal search across addresses, tokens, blocks and transactions. Real Layer-1 chain data with the rotating proxy as automatic fallback — 9 endpoints. Ideal for wallets, explorers, portfolio trackers, analytics dashboards and on-chain monitoring on Flare.

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

## Pricing
- **Free** (Free) — 4,500 calls/Mo, 2 req/s
- **Basic** ($8/Mo) — 110,000 calls/Mo, 8 req/s
- **Pro** ($26/Mo) — 650,000 calls/Mo, 20 req/s
- **Mega** ($72/Mo) — 3,200,000 calls/Mo, 50 req/s

## Endpoints

### Network

#### `GET /v1/gas` — Gas oracle (gwei)

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

**Response:**
```json
{
    "data": {
        "fast": 49.35,
        "slow": 32.05,
        "unit": "gwei",
        "average": 40.65,
        "gas_used_today": "173944848020"
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:36.856Z",
        "request_id": "907fd86e-16c7-4d43-910f-abc96a50265a"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 49.35,
            "slow": 32.05,
            "average": 40.65
        },
        "total_blocks": 62517306,
        "coin_price_usd": null,
        "gas_used_today": "173944848020",
        "market_cap_usd": 0,
        "total_addresses": "8346546",
        "total_transactions": "424395465",
        "transactions_today": "655612",
        "network_utilization_percent": 9.738146794715673
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:37.001Z",
        "request_id": "baf4440c-9d99-4146-876c-5ee12384ab68"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — Block detail by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `62490000`
- `hash` (query, optional, string) — Block hash (0x + 64 hex)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x6b9ef2569333a8aa228680771041952ba7f82283468f7971dcef8d8d0f6e0ee1",
            "size": 5043,
            "miner": "0x0100000000000000000000000000000000000000",
            "height": 62490000,
            "gas_used": 1617193,
            "tx_count": 14,
            "gas_limit": 20019540,
            "timestamp": "2026-06-08T07:08:50.000000Z",
            "burnt_fees": "131122849380360",
            "difficulty": "1",
            "base_fee_per_gas": "81080520"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:37.161Z",
        "request_id": "68692dd9-1a6c-4777-9e1c-4cd5b6375ac6"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Most recent blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xc45ca74b6578582b90544b8845b3bc53878e167c2d278ed50070d7696fd45225",
                "size": 5022,
                "miner": "0x0100000000000000000000000000000000000000",
                "height": 62521014,
                "gas_used": 2406392,
                "tx_count": 4,
                "gas_limit": 20019540,
                "timestamp": "2026-06-08T18:26:32.000000Z",
                "burnt_fees": "570115575331464",
                "difficulty": "1",
                "base_fee_per_gas": "236917167"
            },
            {
                "hash": "0x84119581b5294d92cd4a506ecb39e678d669baa55fa67018b5baad50471f75aa",
                "size": 7080,
                "miner": "0x0100000000000000000000000000000000000000",
                "height": 62521013,
                "gas_used": 759425,
                "tx_count": 5,
                "gas_limit": 20019540,
                "timestamp": "2026-06-08T18:26:31.000000Z",
                "burnt_fees": "181208963828225",
                "difficulty": "1",
                "base_fee_per_gas": "238613377"
            },
            {
                "hash": "0x2998038016568d79f6595531995bfc8735a2c58f1dec15d38c5e7342c3ccb5b5",
                "size": 3967,
                "miner": "0x0100000000000000000000000000000000000000",
                "height": 62521012,
                "gas_used": 878072,
                "tx_count": 4,
              
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address balance & contract info

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x488887d02591DBb334867F04e560D83150111111",
            "name": null,
            "token": null,
            "creator": null,
            "balance_flr": 5616.05633038465,
            "balance_wei": "5616056330384649904419",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:37.787Z",
        "request_id": "1f3d2498-7e68-43da-aa5c-a4269d1b5250"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

#### `GET /v1/transaction` — Transaction detail

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0xD6D433DE0fCeA8693C7dE4a1a8c0C0401931aDc8",
            "from": "0x488887d02591DBb334867F04e560D83150111111",
            "hash": "0x23dc1784face45a3c93ccc351cf587c893b4eda3fd45c46c47ec13b9d4534c45",
            "type": 2,
            "block": 62500010,
            "nonce": 9300168,
            "method": "0x7577109d",
            "status": "ok",
            "fee_flr": 2.49032745815e-6,
            "fee_wei": "2490327458150",
            "gas_used": 66325,
            "gas_price": "37547342",
            "timestamp": "2026-06-08T10:45:44.000000Z",
            "value_flr": 0,
            "value_wei": "0",
            "confirmations": 21006
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:41.809Z",
        "request_id": "43d9bc31-68fa-4485-96cb-be688092f414"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

#### `GET /v1/token` — ERC-20 token detail

**Parameters:**
- `address` (query, required, string) — Token contract (0x + 40 hex) Example: `0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Wrapped Flare",
            "type": "ERC-20",
            "symbol": "WFLR",
            "address": "0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",
            "holders": 135920,
            "decimals": 18,
            "total_supply": "50964295888919249588457009895",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:42.065Z",
        "request_id": "1c47199e-62b4-4693-8952-49778bad5bf0"
    },
    "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: `flare`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "flare",
        "results": [
            {
                "name": "Wrapped Flare",
                "type": "token",
                "symbol": "WFLR",
                "address": "0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d"
            },
            {
                "name": "Reward Flare",
                "type": "token",
                "symbol": "rFLR",
                "address": "0x26d460c3Cf931Fb2014FA436a49e3Af08619810e"
            },
            {
                "name": "FlareFox",
                "type": "token",
                "symbol": "FLX",
                "address": "0x22757fb83836e3F9F0F353126cACD3B1Dc82a387"
            },
            {
                "name": "Flared.org • Flare Dollar",
                "type": "token",
                "symbol": "USDF",
                "address": "0x6760F01560b6a8391282cE528e3Fe4Dac27785Db"
            },
            {
                "name": "Flare Adopter Badge NFT",
                "type": "token",
                "symbol": "FLRNFT",
                "address": "0x273fF3E4037222adbB4869f1D0D8B2c8FC5238Eb"
            },
            {
                "name": "FlareFrog",
                "type": "token",
                "symbol": "FLRFROG",
                "address": "0x19cf770bBB7b71977b860E7FD8d32FA2513A743C"
            },
            {
                "name": "Flare Adopter Badge NFT",
                "type": "token",
                "symbol": "FLRNFT",
          
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "flare-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 & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live Flare (FLR) mainnet on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T18:26:43.231Z",
        "request_id": "3a7cfd92-b6ac-4bb5-bf5a-7357334499c4"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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