# Harmony Chain API
> Live on-chain data for Harmony — a sharded EVM Layer 1 — 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, validator and timestamp. The address endpoint returns any account's ONE balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in ONE, 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 ONE, 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/harmony-api/..."
```

## Pricing
- **Free** (Free) — 3,800 calls/Mo, 2 req/s
- **Basic** ($25/Mo) — 120,000 calls/Mo, 8 req/s
- **Pro** ($76/Mo) — 725,000 calls/Mo, 20 req/s
- **Mega** ($255/Mo) — 4,050,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/harmony-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 152.34,
        "slow": 152.34,
        "unit": "gwei",
        "average": 152.34,
        "gas_used_today": "205007697"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:25.365Z",
        "request_id": "bfe3ed77-fa59-48e4-9b8b-d9449fe278b2"
    },
    "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/harmony-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 152.34,
            "slow": 152.34,
            "average": 152.34
        },
        "total_blocks": 89949950,
        "coin_price_usd": 0.00152352,
        "gas_used_today": "205007697",
        "market_cap_usd": 22655064.511378318,
        "total_addresses": "8385663",
        "total_transactions": "809034675",
        "transactions_today": "3708",
        "network_utilization_percent": 0.0014
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:25.648Z",
        "request_id": "fa102c7d-8e2f-4d6a-ad51-49ef05c8f30b"
    },
    "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: `89945887`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x77b89330e0edca2f3e1f97f36c1c48489e5e60942f3b8e34efff4ad5bc323cbb",
            "size": 1825,
            "miner": "0x87D343b6b6EF215B960B528ed37500C329D4fF8E",
            "height": 89945887,
            "gas_used": 758961,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T06:03:43.000000Z",
            "burnt_fees": null,
            "difficulty": "0",
            "base_fee_per_gas": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:25.943Z",
        "request_id": "6d37d05c-8171-48d6-8fdb-ae8d634f1bb8"
    },
    "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/harmony-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x5cc8246e027dcc6dd90caa230a9fe463e2c70cbce0aaa8aa92dcacd3217829cb",
                "size": 1134,
                "miner": "0x89235Cc98AbbFFf24a8D9cBc3b3E866A574D3ee9",
                "height": 89952601,
                "gas_used": 21000,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:48:17.000000Z",
                "burnt_fees": null,
                "difficulty": "0",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x29ed3cb924e0f34b761ce2113ed115f31092dce1476bec9cd5dd2faa315d04e7",
                "size": 2255,
                "miner": "0x89235Cc98AbbFFf24a8D9cBc3b3E866A574D3ee9",
                "height": 89952539,
                "gas_used": 132016,
                "tx_count": 4,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:46:13.000000Z",
                "burnt_fees": null,
                "difficulty": "0",
                "base_fee_per_gas": null
            },
            {
                "hash": "0xd839118439b237a31aebe76a838c2f4cb009b81dcf23cf5b82cc727573d421b2",
                "size": 2565,
                "miner": "0x89235Cc98AbbFFf24a8D9cBc3b3E866A574D3ee9",
                "height": 89952537,
                "gas_used": 164993,
                "tx_count": 5,
                "gas_limit": 30000000,
                "
…(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: `0xBA5Af10D606e5f21f0aD83b7b3f53e920088f3dE`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xBA5Af10D606e5f21f0aD83b7b3f53e920088f3dE",
            "name": null,
            "token": null,
            "creator": null,
            "balance_one": 0,
            "balance_wei": "0",
            "is_contract": false,
            "is_verified": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:27.021Z",
        "request_id": "e817cd0e-ebfc-4956-861e-c87ad1fb051b"
    },
    "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: `0x2e5e72e5397bb1c9855396cdb293a095a83e073f41671cd95f1db73542ea75eb`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x5d229Bc02eaE8C46225425A1DD7D37047b61C148",
            "from": "0xBA5Af10D606e5f21f0aD83b7b3f53e920088f3dE",
            "hash": "0x2e5e72e5397bb1c9855396cdb293a095a83e073f41671cd95f1db73542ea75eb",
            "type": null,
            "block": 89945887,
            "nonce": 0,
            "method": "mint",
            "status": "ok",
            "fee_one": 0.0758961,
            "fee_wei": "75896100000000000",
            "gas_used": 758961,
            "gas_price": "100000000000",
            "timestamp": "2026-06-08T06:03:43.000000Z",
            "value_one": 0,
            "value_wei": "0",
            "confirmations": 6748
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:27.321Z",
        "request_id": "86a0745c-9812-47e1-8c7d-9d4327e50749"
    },
    "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: `0x3095c7557bCb296ccc6e363DE01b760bA031F2d9`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Wrapped BTC",
            "type": "ERC-20",
            "symbol": "1WBTC",
            "address": "0x3095c7557bCb296ccc6e363DE01b760bA031F2d9",
            "holders": 7941,
            "decimals": 8,
            "total_supply": "48527873676",
            "exchange_rate_usd": 54720,
            "circulating_market_cap": "8493354760.683142"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:27.579Z",
        "request_id": "13643246-f407-4529-987c-0c639c93be1d"
    },
    "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: `1WBTC`

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

**Response:**
```json
{
    "data": {
        "count": 31,
        "query": "1WBTC",
        "results": [
            {
                "name": "Wrapped BTC",
                "type": "token",
                "symbol": "1WBTC",
                "address": "0x3095c7557bCb296ccc6e363DE01b760bA031F2d9"
            },
            {
                "name": "Tranquil 1WBTC",
                "type": "token",
                "symbol": "tq1WBTC",
                "address": "0xd9c0D8Ad06ABE10aB29655ff98DcAAA0E059184A"
            },
            {
                "name": "Wrapped BTC",
                "type": "token",
                "symbol": "1WBTC",
                "address": "0x118f50d23810c5E09Ebffb42d7D3328dbF75C2c2"
            },
            {
                "name": "OpenSwap LP Token",
                "type": "token",
                "symbol": "1WBTC/BUSD",
                "address": "0xde1CbB28b2319b61C82CCa34C66c4D8A2E4D0050"
            },
            {
                "name": "OpenSwap LP Token",
                "type": "token",
                "symbol": "1WBTC-BUSD",
                "address": "0xCf13B1885C880251b83C30E245c8b313b329D02E"
            },
            {
                "name": "Hundred 1WBTC",
                "type": "token",
                "symbol": "h1WBTC",
                "address": "0xb1c4426C86082D91a6c097fC588E5D5d8dD1f5a8"
            },
            {
                "name": "OpenSwap LP Token",
                "type": "token",
                "symbol": "1WBTC/WONE",
      
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "harmony-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 Harmony 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. Harmony is a sharded EVM Layer 1; gas, balances and fees are in ONE. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:27.997Z",
        "request_id": "36078caa-d218-471c-8767-783528563bf4"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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