Dados B3 Indices API
The Indices API from Dados B3 — 4 operation(s) for indices.
The Indices API from Dados B3 — 4 operation(s) for indices.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dadosb3-com:dadosb3-com-indices-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Dados B3 Indices API
description: 'Dados fundamentalistas de companhias abertas brasileiras com metodologia 100% pública e invariantes de dado publicados. Fontes: CVM (dados abertos, ODbL) e B3 (COTAHIST fim-de-dia). Todo número carrega a conta CVM de origem; valor duvidoso carrega flag, nunca estimativa escondida.'
version: 0.1.0
tags:
- name: Indices
paths:
/indices:
get:
summary: Indices Hub
description: 'Os índices da B3 que guardamos. Em JSON (padrão, para o conector e para quem pede JSON) a lista com a cobertura;
para o navegador (Accept text/html) o hub com um cartão e uma página por índice (/indices/{codigo}). ABERTO.'
operationId: indices_hub_indices_get
parameters:
- name: lang
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Lang
- name: accept-language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Indices
/indices/{codigo}:
get:
summary: Indice Pagina
description: 'A PÁGINA de um índice da B3 (18/10/2026): último fechamento com a data, variação no dia, no mês, no ano e em 12
meses, histórico em SVG, desempenho (o cálculo de /indices/{codigo}/desempenho), links para os JSON e como citar.
ABERTA, sem chave. Índice que não guardamos: 404 (página amigável para o navegador). Ver dados_b3/pagina_indice.py.'
operationId: indice_pagina_indices__codigo__get
parameters:
- name: codigo
in: path
required: true
schema:
type: string
title: Codigo
- name: lang
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Lang
- name: accept-language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
text/html:
schema:
type: string
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Indices
/indices/{codigo}/precos:
get:
summary: Indice Precos
description: 'Fechamento DIÁRIO de um índice da B3 (ex.: IBOV), em pontos, do mais antigo ao mais recente. `de`/`ate`
(AAAA-MM-DD) recortam; `formato=csv` devolve CSV. Sem chave: AMOSTRA dos últimos 30 pregões com `aviso` no corpo
(como em /empresas/{T}/precos); com chave grátis, a série inteira. A pergunta "valeu a pena?" tem resposta pronta e
aberta em /indices/{codigo}/desempenho.'
operationId: indice_precos_indices__codigo__precos_get
parameters:
- name: codigo
in: path
required: true
schema:
type: string
title: Codigo
- name: de
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: De
- name: ate
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Ate
- name: formato
in: query
required: false
schema:
type: string
default: json
title: Formato
- name: x-api-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Indices
/indices/{codigo}/desempenho:
get:
summary: Indice Desempenho
description: 'Desempenho de um índice num período (retorno, queda máxima, volatilidade; comprar e manter e cruzamento de médias
21×100). ABERTO, sem chave. Índice de retorno total: a B3 já reinveste os proventos nos pontos.'
operationId: indice_desempenho_indices__codigo__desempenho_get
parameters:
- name: codigo
in: path
required: true
schema:
type: string
title: Codigo
- name: de
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: De
- name: ate
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Ate
- name: media_curta
in: query
required: false
schema:
type: integer
default: 21
title: Media Curta
- name: media_longa
in: query
required: false
schema:
type: integer
default: 100
title: Media Longa
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Indices
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
ChaveApiNaUrl:
type: apiKey
in: query
name: chave
description: Alternativa ao cabeçalho para clientes que só abrem URL (navegação de IA). Fica no histórico e nos logs de quem a usa.
ChaveApi:
type: apiKey
in: header
name: X-API-Key
description: 'Chave grátis (200 consultas/dia) ou Pro em /assinar. Abertos sem chave (limite por IP): fatos, indicadores, múltiplos e dividendos de qualquer ticker, ficha e ranking de FII. WEGE3, MXRF11, /hoje, /saude e a metodologia são abertos. Exigem chave: as_of, versões, preços, screener, /dump.'