# B3 Brazil Stock Exchange API
> Live data from B3 (Brasil Bolsa Balcão), Latin America's largest stock exchange, with no key. Read the live snapshot for any ticker (close, day change, volume, market cap, sector); pull a sector-classified ranking of every listed stock, fund and BDR (by market cap or volume, filterable by sector and instrument type); list the B3 sectors and instrument types; and read the market indexes B3 tracks. The Brazil-equities / sector / market-cap-ranking layer for trading dashboards, screeners and fintech — distinct from other exchange readers, with a dedicated sector-classification cut. Live from the public brapi feed; short cache only.

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

## Pricing
- **Free** (Free) — 18,000 calls/Mo, 3 req/s
- **Starter** ($19/Mo) — 350,000 calls/Mo, 8 req/s
- **Pro** ($51/Mo) — 1,850,000 calls/Mo, 20 req/s
- **Enterprise** ($124/Mo) — 9,400,000 calls/Mo, 60 req/s

## Endpoints

### Stocks

#### `GET /v1/quote` — Live snapshot for one or more tickers

**Parameters:**
- `tickers` (query, required, string) — B3 tickers, comma-separated, e.g. PETR4,VALE3,ITUB4 Example: `PETR4,VALE3`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/b3-api/v1/quote?tickers=PETR4%2CVALE3"
```

**Response:**
```json
{
    "data": {
        "note": "The live snapshot for one or more B3 tickers — close, day change percent, volume, market cap and sector each. Pass tickers (comma-separate up to 10, e.g. PETR4,VALE3,ITUB4). For the whole market ranked, use /v1/list.",
        "count": 2,
        "quotes": [
            {
                "logo": "https://icons.brapi.dev/icons/PETR4.svg",
                "name": "PETROLEO BRASILEIRO S.A. PETROBRAS",
                "type": "stock",
                "close": 41.18,
                "sector": "Energy Minerals",
                "ticker": "PETR4",
                "volume": 34024700,
                "market_cap": 570094845993,
                "change_percent": -1.39
            },
            {
                "logo": "https://icons.brapi.dev/icons/VALE3.svg",
                "name": "VALE S.A.",
                "type": "stock",
                "close": 79.17,
                "sector": "Non-Energy Minerals",
                "ticker": "VALE3",
                "volume": 12104500,
                "market_cap": 328511788473,
                "change_percent": 0.47
            }
        ],
        "source": "B3"
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:11.054Z",
        "request_id": "6e0cb893-1b77-4fd1-a492-a91df7e36dbc"
    },
    "status": "ok",
    "message": "Quote retrieved successfully",
    "success": true
}
```

### Market

#### `GET /v1/list` — Sector-classified market ranking

**Parameters:**
- `sort_by` (query, optional, string) — market_cap_basic, volume, close, change or name Example: `market_cap_basic`
- `sort_order` (query, optional, string) — desc or asc (default desc) Example: `desc`
- `sector` (query, optional, string) — Filter by sector (see /v1/sectors) Example: `Finance`
- `type` (query, optional, string) — stock, fund or bdr Example: `stock`
- `limit` (query, optional, string) — Results (1-100, default 30) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/b3-api/v1/list?sort_by=market_cap_basic&sort_order=desc&sector=Finance&type=stock&limit=30"
```

**Response:**
```json
{
    "data": {
        "note": "A sector-classified ranking of B3-listed instruments — each stock, fund or BDR with its close, day change, volume, market cap and sector. Sort by market_cap_basic (default), volume, close, change or name; filter by sector (see /v1/sectors) and type (stock|fund|bdr); page with limit. The Brazil market screen.",
        "type": "stock",
        "count": 30,
        "sector": "Finance",
        "source": "B3",
        "stocks": [
            {
                "logo": "https://icons.brapi.dev/icons/ITUB4.svg",
                "name": "ITAU UNIBANCO HOLDING S.A.",
                "type": "stock",
                "close": 40.6,
                "sector": "Finance",
                "ticker": "ITUB4",
                "volume": 30645500,
                "market_cap": 457234880932,
                "change_percent": 0.25
            },
            {
                "logo": "https://icons.brapi.dev/icons/ITUB3.svg",
                "name": "ITAU UNIBANCO HOLDING S.A.",
                "type": "stock",
                "close": 41.88,
                "sector": "Finance",
                "ticker": "ITUB3",
                "volume": 2372800,
                "market_cap": 457234880932,
                "change_percent": -1.62
            },
            {
                "logo": "https://icons.brapi.dev/icons/BRAPI.svg",
                "name": "ITAU UNIBANCO HOLDING S.A.",
                "type": "stock",
                "close": 40.5,
                "sector"
…(truncated, see openapi.json for full schema)
```

### Reference

#### `GET /v1/indexes` — Market indexes B3 tracks

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

**Response:**
```json
{
    "data": {
        "note": "The market indexes B3's feed tracks — each with its symbol and name (e.g. ^BVSP for the Ibovespa). Pass an index symbol to /v1/quote to read its level.",
        "count": 1,
        "source": "B3",
        "indexes": [
            {
                "name": "IBOVESPA",
                "symbol": "^BVSP"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:12.398Z",
        "request_id": "c50a0ed4-639c-4cfd-817f-44f6724e6b30"
    },
    "status": "ok",
    "message": "Indexes retrieved successfully",
    "success": true
}
```

#### `GET /v1/sectors` — B3 sectors & instrument types

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

**Response:**
```json
{
    "data": {
        "note": "The sectors and instrument types available on B3 — pass a sector to /v1/list (filter) and a type (stock, fund or BDR). Use these to slice the market by industry.",
        "source": "B3",
        "sectors": [
            "Retail Trade",
            "Energy Minerals",
            "Health Services",
            "Utilities",
            "Finance",
            "Consumer Services",
            "Consumer Non-Durables",
            "Non-Energy Minerals",
            "Commercial Services",
            "Distribution Services",
            "Transportation",
            "Technology Services",
            "Process Industries",
            "Communications",
            "Producer Manufacturing",
            "Miscellaneous",
            "Electronic Technology",
            "Industrial Services",
            "Health Technology",
            "Consumer Durables"
        ],
        "stock_types": [
            "stock",
            "fund",
            "bdr"
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:12.485Z",
        "request_id": "c5aea996-1a75-40f3-ac7a-447a1b2d028d"
    },
    "status": "ok",
    "message": "Sectors retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Endpoints & source

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

**Response:**
```json
{
    "data": {
        "sample": {
            "petr4_close": 41.18
        },
        "source": "brapi public B3 market API (brapi.dev), keyless",
        "service": "b3-api",
        "endpoints": {
            "GET /v1/list": "Sector-classified market ranking (sort_by, sector, type, limit).",
            "GET /v1/meta": "This document.",
            "GET /v1/quote": "Live quote for one or more tickers (tickers, comma-separated).",
            "GET /v1/indexes": "The market indexes B3 tracks.",
            "GET /v1/sectors": "The B3 sectors and instrument types."
        },
        "description": "Live data from B3 (Brasil Bolsa Balcão), Latin America's largest exchange, with no key: the live snapshot for any ticker (close, change, volume, market cap, sector), a sector-classified market ranking of every stock, fund and BDR, the B3 sectors and instrument types, and the world indexes B3 tracks. The Brazil-equities / sector / market-cap-ranking layer for trading dashboards and screeners. Distinct from other exchange readers — B3 data with a sector cut. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:12.553Z",
        "request_id": "6adb8e8d-41c4-4ac5-8392-840857edf00a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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