# Flow (Cadence) On-Chain API
> The Flow blockchain's native Cadence layer, live from the official public Flow access REST API — no key, nothing cached. Flow runs two environments: an EVM layer and its own resource-oriented Cadence environment. The existing Flow reader covers the EVM side; this opens the Cadence layer it cannot see. Read a Cadence block by height — or the latest sealed block — with its id, parent block, timestamp and the number of collection guarantees and seals it carries. Look up any Cadence account for its FLOW balance, the number of account keys it holds and the Cadence smart contracts deployed under it. And read the live network status: the chain id, the access-node software version, the current spork id, the protocol state version and the compatible block-height range. The Cadence-on-chain layer for Flow wallets, explorers, dapp builders and analytics. Live from rest-mainnet.onflow.org.

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

## Pricing
- **Free** (Free) — 7,550 calls/Mo, 3 req/s
- **Starter** ($9/Mo) — 136,000 calls/Mo, 9 req/s
- **Pro** ($34/Mo) — 815,000 calls/Mo, 22 req/s
- **Business** ($90/Mo) — 5,150,000 calls/Mo, 55 req/s

## Endpoints

### Chain

#### `GET /v1/block` — A Cadence block by height: id, parent, timestamp, collections

**Parameters:**
- `height` (query, optional, string) — Block height (omit for the latest sealed block) Example: `154772077`

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

**Response:**
```json
{
    "data": {
        "id": "a74e6818616deb6baa4f694c6cccb72602125e0c9e96f952ae305b74d9b69b34",
        "note": "A Flow Cadence block: its height, id, parent block, timestamp and the number of collection guarantees (batched transaction sets) and block seals it carries. Omit height for the latest sealed block.",
        "height": 154772077,
        "source": "Flow access API",
        "parent_id": "c085cc2be1ddde7aa823ec78453570f416de8638456dd1e07ced34e6fae46d4a",
        "timestamp": "2026-06-14T09:01:54.368Z",
        "seal_count": null,
        "collection_count": null
    },
    "meta": {
        "timestamp": "2026-06-14T17:04:32.622Z",
        "request_id": "40f7d877-6be2-4a9c-937e-b9b03ab4ef64"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/network` — Live network status: chain id, node version, spork, protocol state version

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

**Response:**
```json
{
    "data": {
        "note": "Live Flow network status: the chain id, the access-node software version, the current spork id and the protocol state version, plus the block-height range the node is compatible with.",
        "source": "Flow access API",
        "chain_id": "flow-mainnet",
        "spork_id": "25c44a8f93f53074cc4ef043d381694b8b1f2d1a3a6ea844a9202cd0f9897733",
        "node_version": "v0.49.1",
        "protocol_version": 0,
        "compatible_end_height": 154808253,
        "protocol_state_version": 2,
        "compatible_start_height": 137390146
    },
    "meta": {
        "timestamp": "2026-06-14T17:04:32.762Z",
        "request_id": "d8092ce3-97ba-4538-99c9-570f2774ed3c"
    },
    "status": "ok",
    "message": "Network retrieved successfully",
    "success": true
}
```

### Accounts

#### `GET /v1/account` — A Cadence account: FLOW balance, key count, deployed contracts

**Parameters:**
- `address` (query, optional, string) — Flow account address (omit for the Flow service account) Example: `0xe467b9dd11fa00df`

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

**Response:**
```json
{
    "data": {
        "note": "A Flow Cadence account: its FLOW balance, the number of account keys it holds and the Cadence smart contracts deployed under it. Omit address for the Flow service account.",
        "source": "Flow access API",
        "address": "0xe467b9dd11fa00df",
        "contracts": [
            "AccountV2Migration",
            "Crypto",
            "DependencyAudit",
            "EVM",
            "FlowContractAudits",
            "FlowServiceAccount",
            "FlowStorageFees",
            "FlowTransactionScheduler",
            "FlowTransactionSchedulerUtils",
            "Migration",
            "NodeVersionBeacon",
            "RandomBeaconHistory",
            "RetrieveFraudulentTokensEvents"
        ],
        "key_count": 20,
        "balance_flow": 2340.09624664,
        "contract_count": 13
    },
    "meta": {
        "timestamp": "2026-06-14T17:04:32.893Z",
        "request_id": "2883734d-dc74-49d0-9dce-644ab02c73d0"
    },
    "status": "ok",
    "message": "Account retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "sealed_height": 154808249
        },
        "source": "official public Flow access REST API (rest-mainnet.onflow.org), keyless",
        "service": "flowcadence-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/block": "A Cadence block by height: id, parent, timestamp, collections (height; omit for latest sealed).",
            "GET /v1/account": "A Cadence account: FLOW balance, key count, deployed contracts (address; omit for service account).",
            "GET /v1/network": "Live network status: chain id, node version, spork, protocol state version."
        },
        "description": "Read the Flow blockchain's native Cadence layer live from the official public access REST API: read a Cadence block by height (or the latest sealed block) with its id, parent, timestamp and collection count; look up any Cadence account for its FLOW balance, key count and deployed contracts; and read the live network status (chain id, node version, spork, protocol state version). The Cadence-on-chain layer for Flow wallets, explorers and dapp builders. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T17:04:32.972Z",
        "request_id": "8d363601-5e8b-46a0-b685-55da8f3fd963"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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