# BitSong Chain API
> Real-time on-chain data for BitSong (chain-id bitsong-2b), a Cosmos-SDK Layer-1 built for the music industry — music NFTs, artist fan tokens and streaming — with BTSG as its native coin, secured by delegated proof-of-stake. The status endpoint returns the chain id, latest block height and time, proposer and node application version so you can confirm the chain is live and producing blocks. The validators endpoint returns the full bonded validator set — each moniker, operator address, stake in BTSG, commission rate and jailed flag — sorted by stake, plus the total bonded and not-bonded BTSG. The supply endpoint returns the total BTSG supply (in BTSG and base ubtsg), the bonded amount and the bonded ratio. The governance endpoint returns the most recent on-chain governance proposals with title, status and voting window. The meta endpoint documents the chain, denom and decimals. Reads a live BitSong Cosmos-SDK LCD node directly (with mirror fallback), so values are current to the latest block. Live, nothing stored. 5 endpoints. This serves chain-level staking, supply and governance data; for individual fan tokens or music NFTs use a dedicated indexer API.

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

## Pricing
- **Free** (Free) — 250 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 21,300 calls/Mo, 5 req/s
- **Pro** ($33/Mo) — 114,000 calls/Mo, 20 req/s
- **Mega** ($73/Mo) — 512,000 calls/Mo, 60 req/s

## Endpoints

### Chain

#### `GET /v1/status` — Chain status: latest block, chain id, node version

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

**Response:**
```json
{
    "data": {
        "chain": "BitSong",
        "healthy": true,
        "chain_id": "bitsong-2b",
        "native_symbol": "BTSG",
        "node_app_version": "0.23.0-1-g7c77a88e",
        "proposer_address": "37ZXyECXvlORn/+JuAD4YUfymO0=",
        "latest_block_time": "2026-06-15T20:40:02.009529616Z",
        "latest_block_height": 28512920
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:33.848Z",
        "request_id": "5b7be0ba-e73b-48b7-b893-0c0960639c77"
    },
    "status": "ok",
    "message": "Chain status retrieved successfully",
    "success": true
}
```

### Staking

#### `GET /v1/supply` — Total BTSG supply and bonded ratio

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

**Response:**
```json
{
    "data": {
        "chain": "BitSong",
        "denom": "ubtsg",
        "decimals": 6,
        "bonded_btsg": "56148654.314978",
        "native_symbol": "BTSG",
        "bonded_ratio_pct": 26.83,
        "total_supply_btsg": "209221193.404237",
        "total_supply_ubtsg": "209221193404237"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:33.940Z",
        "request_id": "c8f648a3-47f8-46a0-8067-20b98c9cf2f6"
    },
    "status": "ok",
    "message": "Supply retrieved successfully",
    "success": true
}
```

#### `GET /v1/validators` — Bonded validator set with stake and commission

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

**Response:**
```json
{
    "data": {
        "chain": "BitSong",
        "validators": [
            {
                "jailed": false,
                "status": "BOND_STATUS_BONDED",
                "moniker": "Kintsugi Nodes (ITA)",
                "tokens_btsg": "7599892.035999",
                "tokens_ubtsg": "7599892035999",
                "commission_rate": 0.05,
                "operator_address": "bitsongvaloper1fkj2cn209yeexxyets98evrcmmds23hck0lyzq"
            },
            {
                "jailed": false,
                "status": "BOND_STATUS_BONDED",
                "moniker": "KalpaTech",
                "tokens_btsg": "7152443.436579",
                "tokens_ubtsg": "7152443436579",
                "commission_rate": 0.1,
                "operator_address": "bitsongvaloper19ah9302mh80pvv5zeztdr6qcqk6z52frn6rjj5"
            },
            {
                "jailed": false,
                "status": "BOND_STATUS_BONDED",
                "moniker": "BlueStake 🚀 | 100% insurance",
                "tokens_btsg": "6645267.432611",
                "tokens_ubtsg": "6645267432611",
                "commission_rate": 0.05,
                "operator_address": "bitsongvaloper1mceksy7l3xenuyx4dzl64erf3fh29a3r2ercnz"
            },
            {
                "jailed": false,
                "status": "BOND_STATUS_BONDED",
                "moniker": "CommunityStaking",
                "tokens_btsg": "2750599.101607",
                "tokens_ubtsg": "2750599101607",
                "
…(truncated, see openapi.json for full schema)
```

### Governance

#### `GET /v1/governance` — Recent on-chain governance proposals

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

**Response:**
```json
{
    "data": {
        "chain": "BitSong",
        "count": 10,
        "proposals": [
            {
                "id": "46",
                "title": "Upgrade v0.24.0 - Jimi",
                "status": "PROPOSAL_STATUS_REJECTED",
                "summary": "Upgrades latest versions of wasmvm, ibc-go, and cosmos-sdk. Full upgrade details can be found here: https://github.com/bitsongofficial/go-bitsong/pull/292",
                "submit_time": "2025-10-11T08:14:28.058997063Z",
                "voting_end_time": "2025-10-18T08:29:43.618547316Z"
            },
            {
                "id": "45",
                "title": "Software Upgrade: v023 - Gauss",
                "status": "PROPOSAL_STATUS_PASSED",
                "summary": "Disables external community pool feature, transfers funds in protocolpool accounts back into distribution module",
                "submit_time": "2025-06-23T05:04:30.226828440Z",
                "voting_end_time": "2025-06-24T08:26:57.831099020Z"
            },
            {
                "id": "44",
                "title": "v022 - Nina",
                "status": "PROPOSAL_STATUS_PASSED",
                "summary": "Upgrades to latest cosmos-sdk version, resolves crisis invariants for missing slash events in x/distribution.",
                "submit_time": "2025-05-11T01:05:24.076906392Z",
                "voting_end_time": "2025-05-18T01:05:24.076906392Z"
            },
            {
                "id": "43",
                "title":
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "type": "Cosmos-SDK Layer-1 (Tendermint/CometBFT)",
        "chain": "BitSong",
        "denom": "ubtsg",
        "chain_id": "bitsong-2b",
        "decimals": 6,
        "ecosystem": "BitSong — a Cosmos-SDK Layer-1 for the music industry (music NFTs, fan tokens, streaming), native coin BTSG, secured by delegated proof-of-stake.",
        "endpoints": [
            "/v1/status",
            "/v1/validators",
            "/v1/supply",
            "/v1/governance",
            "/v1/meta"
        ],
        "documentation": "https://bitsong-api.oanor.dev",
        "native_symbol": "BTSG"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:34.229Z",
        "request_id": "517837a7-1003-4f37-9b7c-fac9e1f3d031"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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