# Polkadot & Kusama Governance (OpenGov) API
> Polkadot and Kusama OpenGov, live from the public Polkassembly API — no key, nothing cached. OpenGov is a fully on-chain governance system: anyone can submit a referendum on a governance track, it accrues aye / nay / abstain votes weighted by conviction-locked DOT or KSM, and treasury referenda spend on-chain funds to beneficiaries. There is no other Polkadot reader in the marketplace; this opens the governance layer. List the most recent referenda for a network with their governance track, status and proposer. Read a single referendum in full — its aye / nay / support tally converted from Planck to DOT/KSM, its status, track, requested treasury amount and proposer. And surface the referenda that are currently open for voting (Deciding / Confirming / Submitted / Preparing) so wallets and delegates can act. Works for both Polkadot and Kusama through the network parameter. The OpenGov layer for Polkadot/Kusama wallets, governance dashboards, delegates and analytics. Live from api.polkassembly.io.

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

## Pricing
- **Free** (Free) — 7,300 calls/Mo, 3 req/s
- **Starter** ($10/Mo) — 139,000 calls/Mo, 9 req/s
- **Pro** ($36/Mo) — 825,000 calls/Mo, 22 req/s
- **Business** ($97/Mo) — 5,150,000 calls/Mo, 55 req/s

## Endpoints

### Referenda

#### `GET /v1/active` — OpenGov referenda currently open for voting

**Parameters:**
- `network` (query, optional, string) — polkadot or kusama Example: `polkadot`
- `limit` (query, optional, string) — Max results (1-50) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/polkadotgov-api/v1/active?network=polkadot&limit=20"
```

**Response:**
```json
{
    "data": {
        "note": "OpenGov referenda that are currently live and can still be voted on (status Deciding / Confirming / Submitted / Preparing). Use an id with /v1/referendum for the full tally. Pass network=kusama for Kusama.",
        "count": 6,
        "token": "DOT",
        "source": "Polkassembly",
        "network": "polkadot",
        "referenda": [
            {
                "id": 1903,
                "title": "Vibly Short-Term Repayable Bridge Funding Request",
                "track": 31,
                "status": "Deciding",
                "proposer": "12gj7WyRWVAbmUXk1nLoGaK1Um47tcmxdd138DSuYZgngetP",
                "created_at": "2026-06-13T05:03:12.000Z"
            },
            {
                "id": 1899,
                "title": "Closeout of Bounty 22 (Polkadot Assurance Legion / DotPAL) and Bounty 36 (DeFi Infrastructure & Tooling)",
                "track": 11,
                "status": "Deciding",
                "proposer": "138bU3vLAuBkJJ9ujdpjMpZpkT5AKakVnXmQBVZNMCgfjtxp",
                "created_at": "2026-05-29T10:40:24.000Z"
            },
            {
                "id": 1898,
                "title": ".ID username authority registration for the dotID identity registrar",
                "track": 14,
                "status": "Deciding",
                "proposer": "16g6ZBYbEP3kRMgVBki7zdvdGpymXDyHWzj3D3rDaEATXzc8",
                "created_at": "2026-05-25T13:09:24.000Z"
            },
            {
                "id": 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/referenda` — Recent OpenGov referenda with track, status, proposer

**Parameters:**
- `network` (query, optional, string) — polkadot or kusama (default polkadot) Example: `polkadot`
- `limit` (query, optional, string) — Page size (1-50) Example: `20`
- `page` (query, optional, string) — Page number Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/polkadotgov-api/v1/referenda?network=polkadot&limit=20&page=1"
```

**Response:**
```json
{
    "data": {
        "note": "Most recent Polkadot/Kusama OpenGov referenda (newest first). Each has its on-chain id, governance track, status and proposer. Use an id with /v1/referendum for the full tally. Pass network=kusama for Kusama.",
        "page": 1,
        "count": 20,
        "token": "DOT",
        "source": "Polkassembly",
        "network": "polkadot",
        "referenda": [
            {
                "id": 1903,
                "title": "Vibly Short-Term Repayable Bridge Funding Request",
                "track": 31,
                "status": "Deciding",
                "proposer": "12gj7WyRWVAbmUXk1nLoGaK1Um47tcmxdd138DSuYZgngetP",
                "created_at": "2026-06-13T05:03:12.000Z"
            },
            {
                "id": 1899,
                "title": "Closeout of Bounty 22 (Polkadot Assurance Legion / DotPAL) and Bounty 36 (DeFi Infrastructure & Tooling)",
                "track": 11,
                "status": "Deciding",
                "proposer": "138bU3vLAuBkJJ9ujdpjMpZpkT5AKakVnXmQBVZNMCgfjtxp",
                "created_at": "2026-05-29T10:40:24.000Z"
            },
            {
                "id": 1898,
                "title": ".ID username authority registration for the dotID identity registrar",
                "track": 14,
                "status": "Deciding",
                "proposer": "16g6ZBYbEP3kRMgVBki7zdvdGpymXDyHWzj3D3rDaEATXzc8",
                "created_at": "2026-05-25T13:09:24.000Z"
            },
            {
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/referendum` — One referendum in full: aye/nay/support tally, status, track, requested

**Parameters:**
- `id` (query, optional, string) — Referendum id (omit for the latest) Example: `1000`
- `network` (query, optional, string) — polkadot or kusama Example: `polkadot`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/polkadotgov-api/v1/referendum?id=1000&network=polkadot"
```

**Response:**
```json
{
    "data": {
        "id": 1000,
        "note": "A single OpenGov referendum in full: its aye/nay/support tally (conviction-weighted, converted to the network token), status, governance track, requested treasury amount and proposer. Omit id for the latest referendum.",
        "tally": {
            "ayes_token": 41402170.4086,
            "nays_token": 5000.1,
            "support_token": 10276376.0004
        },
        "title": "A Wish for Continuity: Celebrating Polkadot's Core Values",
        "token": "DOT",
        "track": "WishForChange",
        "source": "Polkassembly",
        "status": "TimedOut",
        "network": "polkadot",
        "proposer": "15oQVDJKd4zLzUvkTnan34v1VPRguduo1uEfs9GnvKjD6Yng",
        "created_at": "2024-07-16T13:15:42.000000Z",
        "description": null,
        "requested_token": null,
        "beneficiary_count": 0
    },
    "meta": {
        "timestamp": "2026-06-14T08:03:46.239Z",
        "request_id": "c68712c6-8d08-4ba6-8c70-07a8982233c1"
    },
    "status": "ok",
    "message": "Referendum retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "latest": 1903,
            "network": "polkadot",
            "total_referenda": 1904
        },
        "source": "public Polkassembly API (api.polkassembly.io), keyless",
        "service": "polkadotgov-api",
        "networks": [
            "polkadot",
            "kusama"
        ],
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/active": "OpenGov referenda currently open for voting (network, limit).",
            "GET /v1/referenda": "Recent OpenGov referenda: track, status, proposer (network, page, limit).",
            "GET /v1/referendum": "One referendum in full: aye/nay/support tally, status, track, requested (network, id; omit id for latest)."
        },
        "description": "Read Polkadot and Kusama OpenGov live from the public Polkassembly API: list the most recent referenda with their track, status and proposer; read a single referendum in full with its aye/nay/support tally (converted to DOT/KSM), status, track and requested amount; and browse treasury bounties. Works for both networks via the network parameter. The OpenGov layer for Polkadot/Kusama wallets, governance dashboards and delegates. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:03:46.306Z",
        "request_id": "302470bb-6e48-46fb-b07d-a71a885a4592"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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