# Conflux On-Chain API
> Live on-chain data from the Conflux (CFX) network — a high-throughput Layer-1 that orders blocks with the Tree-Graph DAG consensus (not a single chain) and runs two spaces: the native Core space (cfx: addresses) and an EVM-compatible eSpace. Served live from a public Conflux Core-space JSON-RPC node as clean JSON. Conflux is distinctive for its storage-collateral model and a built-in proof-of-stake interest rate. Read the chain state (chain id, current epoch, block number, latest-finalized epoch, pending-tx count and the PoS interest rate); the supply (circulating, issued, staked and storage-collateral CFX); a block (the pivot block of an epoch) by epoch number or hash; or a Core-space address's CFX balance and staked balance. Read live from Conflux, nothing cached. This is Conflux's own Tree-Graph, storage-collateral and PoS layer — distinct from the Bitcoin, Decred, Ergo, Nervos and other on-chain APIs and from price feeds.

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

## Pricing
- **Free** (Free) — 950 calls/Mo, 3 req/s
- **Starter** ($11/Mo) — 34,000 calls/Mo, 12 req/s
- **Pro** ($29/Mo) — 175,000 calls/Mo, 28 req/s
- **Business** ($68/Mo) — 880,000 calls/Mo, 55 req/s

## Endpoints

### Network

#### `GET /v1/network` — Chain state — chain id, epoch, block number, finalized epoch, PoS interest

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

**Response:**
```json
{
    "data": {
        "chain": "conflux",
        "source": "Conflux",
        "chain_id": 1029,
        "consensus": "Tree-Graph DAG (GHAST)",
        "network_id": 1029,
        "block_number": 362695783,
        "epoch_number": 149585224,
        "native_token": "CFX",
        "pending_tx_count": 6,
        "latest_finalized_epoch": 149584980,
        "latest_checkpoint_epoch": 149520000,
        "pos_interest_rate_per_block": 2057282496000
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:22.031Z",
        "request_id": "ae4d1733-bf5a-41e0-bac4-a8d209892f4d"
    },
    "status": "ok",
    "message": "Network state retrieved successfully",
    "success": true
}
```

### Supply

#### `GET /v1/supply` — Circulating, issued, staked and storage-collateral CFX

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

**Response:**
```json
{
    "data": {
        "source": "Conflux",
        "native_token": "CFX",
        "total_issued_cfx": 5788447553.196771,
        "total_staking_cfx": 887692356.188266,
        "total_collateral_cfx": 3276375.27598517,
        "total_circulating_cfx": 5788447553.196771,
        "total_espace_tokens_cfx": 296154761.2741488
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:22.325Z",
        "request_id": "5605e696-e23c-4c9c-90d8-df8233bf111c"
    },
    "status": "ok",
    "message": "Supply retrieved successfully",
    "success": true
}
```

### Block

#### `GET /v1/block` — A block (epoch pivot) by epoch number, tag or hash

**Parameters:**
- `epoch` (query, optional, string) — Epoch number or tag (latest_state, latest_finalized) Example: `latest_state`
- `hash` (query, optional, string) — Block hash (0x + 64 hex)

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

**Response:**
```json
{
    "data": {
        "hash": "0x867105636372522ed45a25f8d07a4c92e42728daf0b082bd7b30f00886c0c840",
        "miner": "cfx:aamgvyzht7h1zxdghb9ee9w26wrz8rd3gj837392dp",
        "height": 149585220,
        "source": "Conflux",
        "gas_used": 0,
        "gas_limit": 54000000,
        "timestamp": "2026-06-10T22:58:12.000Z",
        "difficulty": 359067596443,
        "size_bytes": 0,
        "parent_hash": "0xf3d1644e03ec869676d7171491ab726fff747772a3045eb5f2bfe66ad6628b24",
        "pow_quality": "0xba4e8a9bd0",
        "block_number": 362695775,
        "epoch_number": 149585220,
        "transaction_count": 0
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:22.607Z",
        "request_id": "0d2d0863-cf1e-4524-8647-c199f747c869"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

### Balance

#### `GET /v1/balance` — A Core-space address's CFX balance and staked balance

**Parameters:**
- `address` (query, required, string) — Conflux Core-space address (cfx:...) Example: `cfx:aara421audx4ev6t7c40a3f6vzjwf5a3apxbm53nxc`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/conflux-api/v1/balance?address=cfx%3Aaara421audx4ev6t7c40a3f6vzjwf5a3apxbm53nxc"
```

**Response:**
```json
{
    "data": {
        "source": "Conflux",
        "address": "cfx:aara421audx4ev6t7c40a3f6vzjwf5a3apxbm53nxc",
        "balance_cfx": 53578.30923481,
        "staking_balance_cfx": 0,
        "storage_collateral_cfx": 0
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:23.286Z",
        "request_id": "a106ce78-146e-49d5-af2f-d5e87e65020f"
    },
    "status": "ok",
    "message": "Balance retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "source": "Conflux Core-space JSON-RPC (main.confluxrpc.com, live)",
        "service": "conflux-api",
        "consensus": "Tree-Graph DAG (GHAST)",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/block": "A block (epoch pivot) by epoch number or hash (epoch=149620000 or hash=0x…, or tag latest_state).",
            "GET /v1/supply": "Circulating, issued, staked and storage-collateral CFX.",
            "GET /v1/balance": "A Core-space address's CFX balance and staked balance (address=cfx:...).",
            "GET /v1/network": "Chain state — chain id, epoch, block number, finalized epoch, PoS interest."
        },
        "description": "Live on-chain data from the Conflux (CFX) network, a high-throughput Layer-1 that orders blocks with the Tree-Graph DAG consensus and runs a native Core space (cfx: addresses) plus an EVM-compatible eSpace, via a public Conflux Core-space JSON-RPC node. The network endpoint returns the chain state (chain id, epoch, block number, latest-finalized epoch, pending-tx count, PoS interest rate); the supply endpoint returns circulating, issued, staked and storage-collateral CFX; the block endpoint returns a block by epoch number or hash; the balance endpoint returns a Core-space address's CFX balance and staked balance. Live, no key, nothing stored. Distinct from the Bitcoin, Decred, Ergo, Nervos and other on-chain APIs and from price feeds — this is Conflux's own Tree-Graph, s
…(truncated, see openapi.json for full schema)
```


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