# Gravity API
> Real-time on-chain data for Gravity (Gravity Alpha Mainnet, chain-id 1625) — the high-performance chain by Galxe built on the Arbitrum Nitro stack, using G as its native gas token. 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 G balance and transaction count of any address. A keyless, no-account JSON wrapper over the canonical Gravity JSON-RPC node — decoded from hex into plain decimals and human-readable G so you do not have to. Ideal for explorers, wallets, dashboards, gas estimators and analytics on the Gravity 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/gravity-api/..."
```

## Pricing
- **Free** (Free) — 4,400 calls/Mo, 3 req/s
- **Basic** ($13/Mo) — 56,000 calls/Mo, 10 req/s
- **Pro** ($34/Mo) — 217,000 calls/Mo, 25 req/s
- **Mega** ($74/Mo) — 902,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/gravity-api/v1/status"
```

### Blocks

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

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

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

### Gas

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

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

### Accounts

#### `GET /v1/balance` — Native G 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/gravity-api/v1/balance?address=0x000000000000000000000000000000000000dEaD"
```

### Meta

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

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


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