# Ravencoin On-Chain API
> Live on-chain data from the Ravencoin (RVN) blockchain — a UTXO chain purpose-built for issuing and transferring digital assets and tokens, secured by the ASIC-resistant KAW-POW proof-of-work — via the public Trezor Blockbook explorer, clean JSON and no cache. Read the chain state (best block height, difficulty, sync status and node version); fetch a block by height or hash; look up an address's RVN balance, total received and sent and transaction count; or resolve a transaction's block, value, fee and confirmations. Read live from Ravencoin, nothing stored. This is Ravencoin's own KAW-POW asset-chain UTXO ledger — distinct from the Bitcoin, Dash, Decred, Nervos and other on-chain APIs and from price feeds: the RVN network built for tokenisation.

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

## Pricing
- **Free** (Free) — 850 calls/Mo, 3 req/s
- **Starter** ($10/Mo) — 30,000 calls/Mo, 12 req/s
- **Pro** ($27/Mo) — 155,000 calls/Mo, 28 req/s
- **Business** ($64/Mo) — 780,000 calls/Mo, 55 req/s

## Endpoints

### Network

#### `GET /v1/network` — Chain state — best block, difficulty, sync status, node version

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

**Response:**
```json
{
    "data": {
        "chain": "ravencoin",
        "model": "UTXO (asset chain)",
        "source": "Ravencoin (Blockbook)",
        "in_sync": true,
        "consensus": "KAW-POW (ASIC-resistant PoW)",
        "best_block": 4405363,
        "difficulty": 25510.37817996068,
        "native_token": "RVN",
        "node_version": "4060100",
        "backend_blocks": 4405371,
        "node_subversion": "/Ravencoin:4.6.1/"
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:17.946Z",
        "request_id": "d000ebf6-885d-478e-a1bf-f3dd71f8541f"
    },
    "status": "ok",
    "message": "Network state retrieved successfully",
    "success": true
}
```

### Block

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `4404000`
- `hash` (query, optional, string) — Block hash (64 hex)

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

**Response:**
```json
{
    "data": {
        "hash": "0000000000002a2880cef1fd9f00f847fb14f103809672ba17fd620401ecd9e8",
        "time": "2026-06-09T23:59:55.000Z",
        "nonce": "0",
        "height": 4404000,
        "source": "Ravencoin (Blockbook)",
        "version": 805306368,
        "difficulty": 22882.22316938028,
        "size_bytes": 319,
        "merkle_root": "fb2954284eb9f71d03d2666a11f17482beb8a0552750622aac2c9a248264b6d4",
        "confirmations": 1372,
        "transaction_count": 1,
        "previous_block_hash": "000000000001e5d49ea6f76acb00fcc4a9de06741d6517abcf255a1e2d68bc5b"
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:18.156Z",
        "request_id": "5cede15c-b24d-4822-8d42-e51e04954ce1"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

### Address

#### `GET /v1/address` — An address's RVN balance, received, sent and tx count

**Parameters:**
- `address` (query, required, string) — Ravencoin address (mainnet starts with R) Example: `RDxu6pcK5HwwRTk5z9eM8E6fXGRbBu3V88`

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

**Response:**
```json
{
    "data": {
        "source": "Ravencoin (Blockbook)",
        "address": "RDxu6pcK5HwwRTk5z9eM8E6fXGRbBu3V88",
        "sent_rvn": 3999859.23377731,
        "balance_rvn": 57992427.38055902,
        "received_rvn": 61992286.61433633,
        "transaction_count": 41169,
        "unconfirmed_balance_rvn": 0
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:18.349Z",
        "request_id": "419d7681-f106-4e2b-8eee-a1dd50773efc"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transaction

#### `GET /v1/transaction` — A transaction's value, fee, counts and confirmations

**Parameters:**
- `txid` (query, required, string) — Transaction id (64 hex) Example: `fb2954284eb9f71d03d2666a11f17482beb8a0552750622aac2c9a248264b6d4`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ravencoin-api/v1/transaction?txid=fb2954284eb9f71d03d2666a11f17482beb8a0552750622aac2c9a248264b6d4"
```

**Response:**
```json
{
    "data": {
        "txid": "fb2954284eb9f71d03d2666a11f17482beb8a0552750622aac2c9a248264b6d4",
        "source": "Ravencoin (Blockbook)",
        "fee_rvn": 0,
        "value_rvn": 1250,
        "block_time": "2026-06-09T23:59:55.000Z",
        "size_bytes": 198,
        "input_count": 1,
        "block_height": 4404000,
        "output_count": 2,
        "value_in_rvn": 0,
        "confirmations": 1364
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:18.531Z",
        "request_id": "b2c69fe1-133f-4733-a3bd-2158279fe0f2"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "model": "UTXO (asset chain)",
        "source": "Trezor Blockbook for Ravencoin (blockbook.ravencoin.org, live)",
        "service": "ravencoin-api",
        "consensus": "KAW-POW (ASIC-resistant PoW)",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/block": "A block by height or hash (height=4404000 or hash=64 hex).",
            "GET /v1/address": "An address's RVN balance, received, sent and tx count (address=R...).",
            "GET /v1/network": "Chain state — best block, difficulty, sync status, node version.",
            "GET /v1/transaction": "A transaction's value, fee, counts and confirmations (txid=64 hex)."
        },
        "best_block": 4405363,
        "description": "Live on-chain data from the Ravencoin (RVN) blockchain, a UTXO chain purpose-built for issuing and transferring digital assets/tokens, secured by the ASIC-resistant KAW-POW proof-of-work, via the public Trezor Blockbook explorer. The network endpoint returns the chain state (best block height, difficulty, sync status, node version); the block endpoint returns a block by height or hash; the address endpoint returns an address's RVN balance, total received and sent and transaction count; the transaction endpoint returns a transaction's block, value, fee and confirmations. Live, no key, nothing stored. Distinct from the Bitcoin, Dash, Decred, Nervos and other on-chain APIs and from price feeds — this is Ravencoin's own KAW-POW 
…(truncated, see openapi.json for full schema)
```


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