# Plasma API
> Real-time on-chain data for Plasma (chain-id 9745) — the stablecoin-native EVM Layer-1 anchored to Bitcoin and purpose-built for high-volume, low-cost stablecoin (USD₮) payments. Query live network status (latest block height, network id, client version), fetch any block by height or the latest one (timestamp, transaction count, gas used / limit, base fee, miner), read the current gas price in wei and gwei, and look up the native XPL balance and transaction count of any address. A keyless, no-account JSON wrapper over the canonical Plasma JSON-RPC node — decoded from hex into plain decimals and human-readable XPL so you do not have to. Ideal for explorers, wallets, payment dashboards, gas estimators and analytics on the Plasma chain.

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

## Pricing
- **Free** (Free) — 5,600 calls/Mo, 3 req/s
- **Basic** ($13/Mo) — 63,000 calls/Mo, 10 req/s
- **Pro** ($35/Mo) — 229,000 calls/Mo, 25 req/s
- **Mega** ($76/Mo) — 970,000 calls/Mo, 60 req/s

## Endpoints

### Network

#### `GET /v1/status` — Network status (latest block, chain id, client version)

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

**Response:**
```json
{
    "data": {
        "chain": "Plasma",
        "chain_id": 9745,
        "network_id": 9745,
        "rpc_healthy": true,
        "latest_block": 24582188,
        "native_symbol": "XPL",
        "client_version": "reth/v1.8.3-4219741/x86_64-unknown-linux-gnu"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:41.762Z",
        "request_id": "3edc4a17-eaaf-490a-8025-88657727af20"
    },
    "status": "ok",
    "message": "Chain status retrieved successfully",
    "success": true
}
```

### Blocks

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

**Parameters:**
- `number` (query, optional, string) — Block height (decimal or 0x-hex), or "latest" Example: `5000000`

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

**Response:**
```json
{
    "data": {
        "hash": "0xd88cf7214c691bef18a106adf4139b8a766bf5387e8c4983555946ce049ee03b",
        "miner": "0x000000000000000000000000000000000a11b005",
        "number": 5000000,
        "gas_used": 9333685,
        "gas_limit": 36000000,
        "timestamp": 1761929411,
        "size_bytes": 3871,
        "parent_hash": "0x3b86c1fdf47e7063cbda617342f052a6e7202a1fb47568973eb6ce0745ac1c83",
        "timestamp_iso": "2025-10-31T16:50:11.000Z",
        "transaction_count": 14,
        "base_fee_per_gas_wei": "13"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:41.906Z",
        "request_id": "3da6c2d2-466a-4264-9359-c0b7a5cc3f1b"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

### Gas

#### `GET /v1/gas` — Current gas price (wei + gwei)

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

**Response:**
```json
{
    "data": {
        "at_block": 24582188,
        "gas_price_wei": "5005780",
        "native_symbol": "XPL",
        "gas_price_gwei": 0.005006
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:41.970Z",
        "request_id": "bdae2d61-9a86-43bc-9681-5c09ed07a5cd"
    },
    "status": "ok",
    "message": "Gas price retrieved successfully",
    "success": true
}
```

### Accounts

#### `GET /v1/balance` — Native XPL balance and transaction count of an address

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

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

**Response:**
```json
{
    "data": {
        "address": "0x000000000000000000000000000000000000dEaD",
        "balance": "0.156504058282222791",
        "balance_wei": "156504058282222791",
        "native_symbol": "XPL",
        "transaction_count": 0
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:42.077Z",
        "request_id": "4c895a37-cb9b-46b4-a565-3bf4958102dd"
    },
    "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/plasma-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "type": "Stablecoin-native EVM Layer-1 (Bitcoin-anchored, PlasmaBFT)",
        "chain": "Plasma",
        "network": "mainnet",
        "chain_id": 9745,
        "decimals": 18,
        "ecosystem": "Plasma — high-throughput chain purpose-built for stablecoin payments",
        "endpoints": [
            "/v1/status",
            "/v1/block",
            "/v1/gas",
            "/v1/balance",
            "/v1/meta"
        ],
        "description": "Plasma is a stablecoin-native EVM Layer-1 anchored to Bitcoin, purpose-built for high-volume, low-cost stablecoin (USD₮) payments.",
        "documentation": "https://plasma-api.oanor.dev",
        "native_symbol": "XPL"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:42.163Z",
        "request_id": "39dda1d4-d699-4a9e-afe0-99acce013531"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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