# 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"
```

**Response:**
```json
{
    "data": {
        "note": "Pairs are BASE-QUOTE (e.g. BTC-BRL). The ticker endpoint accepts comma-separated pairs.",
        "source": "Mercado Bitcoin API (api.mercadobitcoin.net/api/v4, live)",
        "service": "mercadobitcoin-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/ticker": "Ticker for one or more pairs (pair=BTC-BRL or symbol=BTC&quote=BRL; comma-separated allowed).",
            "GET /v1/symbols": "List trading pairs (quote=BRL optional).",
            "GET /v1/orderbook": "Live market depth — best bid/ask and spread (pair=BTC-BRL, limit=20)."
        },
        "description": "Live spot market data from Mercado Bitcoin, Brazil's largest and oldest crypto exchange. The ticker endpoint returns a pair's last price, buy/sell, 24h high/low, open and 24h change (in Brazilian real); the orderbook endpoint returns live market depth with best bid/ask and spread; the symbols endpoint lists 1,300+ trading pairs. Live, no key, nothing stored. A distinct Brazilian / Latin-American venue with real pricing, separate from other exchange feeds.",
        "symbol_count": 1331,
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:32.455Z",
        "request_id": "bb0bf0bf-52c5-4cb7-a61f-fb295fcd0674"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```

#### `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"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "price": 325149,
                "amount": 0.03138635
            },
            {
                "price": 325225,
                "amount": 0.0790361
            },
            {
                "price": 325226,
                "amount": 0.0615591
            },
            {
                "price": 325281,
                "amount": 1.02022339
            },
            {
                "price": 325285,
                "amount": 0.079
            },
            {
                "price": 325441,
                "amount": 0.01
            },
            {
                "price": 325578,
                "amount": 0.03225
            },
            {
                "price": 325623,
                "amount": 0.06909
            },
            {
                "price": 325637,
                "amount": 0.01842
            },
            {
                "price": 325641,
                "amount": 0.00921
            },
            {
                "price": 325835,
                "amount": 0.2117
            },
            {
                "price": 325836,
                "amount": 0.4436
            },
            {
                "price": 325885,
                "amount": 0.0992
            },
            {
                "price": 325974,
                "amount": 0.1456
            },
            {
                "price": 326692,
                "amount": 0.02546708
            },
            {
        
…(truncated, see openapi.json for full schema)
```

#### `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"
```

**Response:**
```json
{
    "data": {
        "count": 1322,
        "quote": "BRL",
        "source": "Mercado Bitcoin",
        "symbols": [
            {
                "base": "JUDC26",
                "pair": "JUDC26-BRL",
                "quote": "BRL",
                "base_currency": "JUDC26"
            },
            {
                "base": "MBCREDSB04",
                "pair": "MBCREDSB04-BRL",
                "quote": "BRL",
                "base_currency": "MBCREDSB04"
            },
            {
                "base": "UNI",
                "pair": "UNI-BRL",
                "quote": "BRL",
                "base_currency": "UNI"
            },
            {
                "base": "CARTAO03",
                "pair": "CARTAO03-BRL",
                "quote": "BRL",
                "base_currency": "CARTAO03"
            },
            {
                "base": "STARTUP1",
                "pair": "STARTUP1-BRL",
                "quote": "BRL",
                "base_currency": "STARTUP1"
            },
            {
                "base": "JUMPAD04",
                "pair": "JUMPAD04-BRL",
                "quote": "BRL",
                "base_currency": "JUMPAD04"
            },
            {
                "base": "NEO",
                "pair": "NEO-BRL",
                "quote": "BRL",
                "base_currency": "NEO"
            },
            {
                "base": "DUX02",
                "pair": "DUX02-BRL",
                "quote": "BRL",
                "base_curr
…(truncated, see openapi.json for full schema)
```

#### `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"
```

**Response:**
```json
{
    "data": {
        "buy": 324942,
        "base": "BTC",
        "last": 324822,
        "pair": "BTC-BRL",
        "sell": 325149,
        "quote": "BRL",
        "source": "Mercado Bitcoin",
        "spread": 207,
        "low_24h": 315501,
        "high_24h": 326527,
        "open_24h": 320007,
        "timestamp": 1781164171,
        "volume_24h": 57.40217786,
        "change_24h_pct": 1.5047
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:33.552Z",
        "request_id": "d1f72b1e-0e87-4e69-ba8d-c3e4033e8181"
    },
    "status": "ok",
    "message": "Ticker retrieved successfully",
    "success": true
}
```


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