# 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"
```

### 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"
```

### 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"
```

### 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"
```

### Meta

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

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


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