# Nexus Chain API
> Live on-chain data for Nexus — a zkVM Layer 1 for verifiable compute — 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 NEX balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in NEX, 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 NEX, 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/nexus-api/..."
```

## Pricing
- **Free** (Free) — 1,750 calls/Mo, 2 req/s
- **Basic** ($13/Mo) — 82,000 calls/Mo, 8 req/s
- **Pro** ($41/Mo) — 545,000 calls/Mo, 20 req/s
- **Mega** ($135/Mo) — 2,850,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/nexus-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 1.21,
        "slow": 1.21,
        "unit": "gwei",
        "average": 1.21,
        "gas_used_today": "222630272"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:56.795Z",
        "request_id": "121c8cf2-8cb1-4fcf-95f3-6552bc3f1604"
    },
    "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/nexus-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 1.21,
            "slow": 1.21,
            "average": 1.21
        },
        "total_blocks": 4343860,
        "coin_price_usd": null,
        "gas_used_today": "222630272",
        "market_cap_usd": 0,
        "total_addresses": "307250",
        "total_transactions": "726248",
        "transactions_today": "10501",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:56.935Z",
        "request_id": "5a48ba04-971c-44cf-9ad7-829d69578b34"
    },
    "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: `4323116`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x999e97a6bd6ca610f73394884009afe1b72ea02a0f040eb0fca87cf8337bf133",
            "size": 752,
            "miner": "0x05e34FbeBa70fE2d022feDac61bcF4472A2FF257",
            "height": 4323116,
            "gas_used": 26418,
            "tx_count": 1,
            "gas_limit": 36000000,
            "timestamp": "2026-06-08T03:18:00.000000Z",
            "burnt_fees": "184926",
            "difficulty": "0",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:57.081Z",
        "request_id": "a9240665-c9d0-45e4-b89c-7f0eea7d0f02"
    },
    "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/nexus-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x21d46ca5f8f6792ee4c31a8ad71a15476c798434461ef3b3600b00155a8bb5d4",
                "size": 633,
                "miner": "0x05e34FbeBa70fE2d022feDac61bcF4472A2FF257",
                "height": 4345763,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 36000000,
                "timestamp": "2026-06-08T09:49:53.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x1392da9a47d0a16aab40e7c0e504406a101b56c21232c33de0cf8b7dca5a2608",
                "size": 633,
                "miner": "0x05e34FbeBa70fE2d022feDac61bcF4472A2FF257",
                "height": 4345762,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 36000000,
                "timestamp": "2026-06-08T09:49:52.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x9a3c9a8b73a6a7ad3c374aa3ca6870314d9b60a39c44785a2e789cd2665500b4",
                "size": 633,
                "miner": "0x05e34FbeBa70fE2d022feDac61bcF4472A2FF257",
                "height": 4345761,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 36000000,
                "timestamp": "2026-06-08T
…(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: `0x0703412cd0a20A4c03dD25DEa22B637cF6012b08`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x0703412cd0a20A4c03dD25DEa22B637cF6012b08",
            "name": null,
            "token": null,
            "creator": null,
            "balance_nex": 1259999.9994273577,
            "balance_wei": "1259999999427357596182384",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:57.682Z",
        "request_id": "b071b5e3-bd7d-4c34-a2a3-8d815516bd52"
    },
    "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: `0x941f6ed6a0b31b9451e6c644fde3ba10cc609b4b3e4158e788eb541a8c711ca0`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x170B9fFaBEF1d782a6358d14d9dC9cC6423BAa67",
            "from": "0x0703412cd0a20A4c03dD25DEa22B637cF6012b08",
            "hash": "0x941f6ed6a0b31b9451e6c644fde3ba10cc609b4b3e4158e788eb541a8c711ca0",
            "type": 0,
            "block": 4323116,
            "nonce": 6,
            "method": "deposit",
            "status": "ok",
            "fee_nex": 3.1701600211344e-5,
            "fee_wei": "31701600211344",
            "gas_used": 26418,
            "gas_price": "1200000008",
            "timestamp": "2026-06-08T03:18:00.000000Z",
            "value_nex": 1,
            "value_wei": "1000000000000000000",
            "confirmations": 22650
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:58.827Z",
        "request_id": "1a45c387-9095-48bb-ad6a-95cc5e4c6f0b"
    },
    "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: `0xdDaC01450aef1829A41E5e99297F85e4f5D88532`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Nexus Genesis Collection",
            "type": "ERC-1155",
            "symbol": "NEXGEN",
            "holders": null,
            "decimals": null,
            "total_supply": null,
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:58.941Z",
        "request_id": "3bd6f33c-e8a3-43cd-9ebc-3fe4dbb7f03d"
    },
    "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: `NEXGEN`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "NEXGEN",
        "results": [
            {
                "name": "Nexus Genesis Collection",
                "type": "token",
                "symbol": "NEXGEN",
                "address": "0xdDaC01450aef1829A41E5e99297F85e4f5D88532"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:59.288Z",
        "request_id": "7b6dd399-c784-4731-8dfe-1c61b0740f16"
    },
    "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/nexus-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "nexus-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 Nexus 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. Nexus is a zkVM Layer 1 for verifiable compute; gas and balances are in NEX. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:59.372Z",
        "request_id": "0d2aac66-62b1-4137-b727-f94704c6382a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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