# Rollux API
> Live EVM on-chain data for Rollux (chain id 570) — the Syscoin Layer-2 secured by Bitcoin merge-mining, whose gas token is SYS — served directly from public Layer-2 JSON-RPC nodes with multi-node failover. The status endpoint returns the chain and network id, the latest block height and the node client version. The block endpoint returns a block by number (or the latest) with its hash, parent hash, timestamp, transaction count, gas used and gas limit, miner and size. The gas endpoint returns the current gas price in both wei and gwei. The balance endpoint returns the SYS balance and outgoing transaction count for any address, converted from base wei (18 decimals) into whole SYS with exact big-integer scaling. Every figure is read live from the chain over JSON-RPC — nothing bundled or modelled — behind a short server-side cache with keep-warm so the feed stays fast and fresh. Ideal for explorers, wallet and dashboard tooling, gas trackers, address monitors and analytics apps across the Syscoin and Rollux ecosystem. Live keyless upstream. 5 endpoints.

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

## Pricing
- **Free** (Free) — 340 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 15,400 calls/Mo, 8 req/s
- **Pro** ($34/Mo) — 82,000 calls/Mo, 16 req/s
- **Mega** ($83/Mo) — 330,000 calls/Mo, 40 req/s

## Endpoints

### Rollux

#### `GET /v1/balance` — Address balance & tx count

**Parameters:**
- `address` (query, optional, string) — EVM address (0x + 40 hex) Example: `0x000000000000000000000000000000000000dEaD`

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

**Response:**
```json
{
    "data": {
        "chain": "Rollux",
        "symbol": "SYS",
        "address": "0x000000000000000000000000000000000000dEaD",
        "balance": 0.0001,
        "tx_count": 0,
        "balance_wei": "100000000000000"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:21.752Z",
        "request_id": "c5a0dcff-8f07-4053-88bb-c28951c4b617"
    },
    "status": "ok",
    "message": "Rollux balance retrieved",
    "success": true
}
```

#### `GET /v1/block` — Block by number (or latest)

**Parameters:**
- `number` (query, optional, string) — Block number; omit for latest Example: `5000000`

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

**Response:**
```json
{
    "data": {
        "hash": "0xfacd684f4e93b8c1618a387b1cc9afe22f2a9fdb15f07ba80014aeaf93f36660",
        "chain": "Rollux",
        "miner": "0x4200000000000000000000000000000000000011",
        "number": 5000000,
        "gas_used": 46841,
        "tx_count": 1,
        "gas_limit": 30000000,
        "timestamp": 1697365241,
        "size_bytes": 869,
        "parent_hash": "0xa13aa0bd2277908a5e7156b8db2ba2202c481c02413e50f552442f2aeb57ff76",
        "timestamp_iso": "2023-10-15T10:20:41.000Z"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:21.888Z",
        "request_id": "195c904d-99c1-47ea-b00f-b2014581f6a3"
    },
    "status": "ok",
    "message": "Rollux block retrieved",
    "success": true
}
```

#### `GET /v1/gas` — Current gas price

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

**Response:**
```json
{
    "data": {
        "chain": "Rollux",
        "source": "eth_gasPrice",
        "symbol": "SYS",
        "gas_price_wei": 100000050,
        "gas_price_gwei": 0.10000005
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.008Z",
        "request_id": "964297bb-b712-460a-9e04-b43d3732e5e3"
    },
    "status": "ok",
    "message": "Rollux gas retrieved",
    "success": true
}
```

#### `GET /v1/status` — Chain status

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

**Response:**
```json
{
    "data": {
        "chain": "Rollux",
        "source": "Rollux L2 RPC",
        "symbol": "SYS",
        "chain_id": 570,
        "network_id": 570,
        "latest_block": 47095390,
        "client_version": "Geth/v0.1.0-unstable-36831023/linux-amd64/go1.20.8"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.141Z",
        "request_id": "1a41ffc0-89c3-474a-b822-8d9668e8dc5c"
    },
    "status": "ok",
    "message": "Rollux status retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "api": "Rollux API",
        "chain": "Rollux",
        "source": "Rollux Layer-2 JSON-RPC nodes",
        "symbol": "SYS",
        "chain_id": 570,
        "endpoints": [
            "/v1/status",
            "/v1/block",
            "/v1/gas",
            "/v1/balance",
            "/v1/meta"
        ],
        "description": "Live EVM on-chain data for Rollux — the Bitcoin-merge-mined Syscoin Layer-2 (gas token SYS).",
        "documentation": "https://rollux-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.258Z",
        "request_id": "9523d22b-20eb-4fe3-8545-7e17c5c2e148"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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