# Songbird API
> Live EVM on-chain data for Songbird (chain id 19) — the canary network of the Flare blockchain, whose native token is SGB — served directly from public C-chain 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 SGB balance and outgoing transaction count for any address, converted from base wei (18 decimals) into whole SGB 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 Flare and Songbird 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/songbird-api/..."
```

## Pricing
- **Free** (Free) — 360 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 16,200 calls/Mo, 8 req/s
- **Pro** ($35/Mo) — 85,000 calls/Mo, 16 req/s
- **Mega** ($84/Mo) — 340,000 calls/Mo, 40 req/s

## Endpoints

### Songbird

#### `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/songbird-api/v1/balance?address=0x000000000000000000000000000000000000dEaD"
```

**Response:**
```json
{
    "data": {
        "chain": "Songbird",
        "symbol": "SGB",
        "address": "0x000000000000000000000000000000000000dEaD",
        "balance": 548912794.582518,
        "tx_count": 0,
        "balance_wei": "548912794582518041870220550"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.437Z",
        "request_id": "de498ec0-fde9-48d4-be82-1938ccf87cc3"
    },
    "status": "ok",
    "message": "Songbird 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/songbird-api/v1/block?number=5000000"
```

**Response:**
```json
{
    "data": {
        "hash": "0x7729ff25f26b42e89df8e33dbcb2183547e28ef972cc7fe63421d44ba627df15",
        "chain": "Songbird",
        "miner": "0x0100000000000000000000000000000000000000",
        "number": 5000000,
        "gas_used": 469532,
        "tx_count": 1,
        "gas_limit": 8000000,
        "timestamp": 1640396749,
        "size_bytes": 1528,
        "parent_hash": "0xb07d0aa67571ddf3a1993ca3bf53fec6deaca446dcb6023b874312eb01c078f9",
        "timestamp_iso": "2021-12-25T01:45:49.000Z"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.582Z",
        "request_id": "f46218ef-c19a-4e68-bf3f-96cc07fdf60c"
    },
    "status": "ok",
    "message": "Songbird block retrieved",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "chain": "Songbird",
        "source": "eth_gasPrice",
        "symbol": "SGB",
        "gas_price_wei": 2,
        "gas_price_gwei": 2.0e-9
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.697Z",
        "request_id": "de9db43d-90bd-4379-9dbd-36bed9e052bd"
    },
    "status": "ok",
    "message": "Songbird gas retrieved",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "chain": "Songbird",
        "source": "Songbird C-chain RPC",
        "symbol": "SGB",
        "chain_id": 19,
        "network_id": 19,
        "latest_block": 125308261,
        "client_version": "v0.14.1"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.866Z",
        "request_id": "119f6ce1-b0bd-4679-be13-ebf66559c77d"
    },
    "status": "ok",
    "message": "Songbird status retrieved",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "Songbird API",
        "chain": "Songbird",
        "source": "Songbird C-chain JSON-RPC nodes",
        "symbol": "SGB",
        "chain_id": 19,
        "endpoints": [
            "/v1/status",
            "/v1/block",
            "/v1/gas",
            "/v1/balance",
            "/v1/meta"
        ],
        "description": "Live EVM on-chain data for Songbird — the canary network of the Flare blockchain (SGB).",
        "documentation": "https://songbird-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:22.932Z",
        "request_id": "791fcdd7-87a7-4f35-8956-11628b661258"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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