# Mercado Bitcoin API
> Live spot market data from Mercado Bitcoin, Brazil's largest and oldest crypto exchange — served straight from its public API, no key, nothing cached. Get a pair's last price, buy/sell, 24h high/low, open and 24h change (in Brazilian real); read live market depth with the best bid/ask and spread; and list 1,300+ trading pairs. A distinct Brazilian / Latin-American venue with real pricing, separate from other exchange feeds. Pairs are BASE-QUOTE (e.g. BTC-BRL).

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

## Pricing
- **Free** (Free) — 3,500 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 79,000 calls/Mo, 6 req/s
- **Pro** ($22/Mo) — 412,000 calls/Mo, 15 req/s
- **Business** ($53/Mo) — 2,560,000 calls/Mo, 40 req/s

## Endpoints

### Mercado Bitcoin

#### `GET /v1/meta` — Service metadata and endpoint list

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

#### `GET /v1/orderbook` — Live market depth — best bid/ask and spread

**Parameters:**
- `pair` (query, required, string) — Pair BASE-QUOTE Example: `BTC-BRL`
- `limit` (query, optional, string) — Levels per side 1-100 (default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mercadobitcoin-api/v1/orderbook?pair=BTC-BRL&limit=20"
```

#### `GET /v1/symbols` — List trading pairs

**Parameters:**
- `quote` (query, optional, string) — Filter by quote currency e.g. BRL (omit for all) Example: `BRL`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mercadobitcoin-api/v1/symbols?quote=BRL"
```

#### `GET /v1/ticker` — Ticker for one or more pairs

**Parameters:**
- `pair` (query, required, string) — Pair BASE-QUOTE (comma-separated allowed; or use symbol & quote) Example: `BTC-BRL`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mercadobitcoin-api/v1/ticker?pair=BTC-BRL"
```


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