Schema OpenAPI
A especificação completa da API brapi está disponível no formato OpenAPI 3.0 (anteriormente conhecido como Swagger). Esta documentação técnica contém todos os endpoints, parâmetros, schemas de resposta e exemplos de uso.
Download e Visualização
Você pode baixar o arquivo JSON da especificação ou visualizar o arquivo JSON online.
Schema Completa
Especificação completa da API brapi em formato OpenAPI 3.0 para dados de ações, moedas, criptomoedas, inflação, etc.
{ "openapi": "3.1.0", "info": { "title": "brapi - API do Mercado Financeiro Brasileiro", "version": "3.0.0", "description": "Acesso instantâneo a dados do mercado financeiro brasileiro e internacional.\n\n**Recursos Principais:**\n\n* **Cotações:** Obtenha valores de cotação e históricos para ações brasileiras, fundos imobiliários (FIIs), BDRs, índices e ETFs.\n* **Criptomoedas:** Consulte cotações e dados históricos de diversas criptomoedas em várias moedas fiduciárias.\n* **Moedas:** Acesse taxas de câmbio entre diferentes moedas.\n* **Dados Fundamentalistas:** Obtenha dados financeiros detalhados de empresas listadas (requer módulos específicos).\n* **Dividendos:** Consulte informações sobre pagamentos de dividendos e JCP.\n* **Inflação:** Acesse índices de inflação históricos para diferentes países.\n\n**SDKs Oficiais:**\n\nRecomendamos o uso de nossas SDKs oficiais para integração mais rápida e robusta:\n\n* **TypeScript/JavaScript:** npm install brapi\n * Tipos completos com IntelliSense\n * Suporte a Node.js e navegador\n * Retry automático e tratamento de erros tipado\n * GitHub: https://github.com/brapi-dev/brapi-typescript\n\n* **Python:** pip install brapi\n * Suporte síncrono e assíncrono (AsyncBrapi)\n * Type hints completos com Pydantic\n * Compatível com Python 3.8+\n * GitHub: https://github.com/brapi-dev/brapi-python\n\n**Vantagens das SDKs:**\n* 60% menos código comparado com requisições manuais\n* Autenticação automática e tratamento de erros\n* Retry inteligente com backoff exponencial\n* Validação de tipos e autocomplete\n* Documentação integrada no editor\n\nUtilize esta API para integrar dados financeiros robustos em suas aplicações, dashboards ou análises.\n\n**Website Oficial:** https://brapi.dev\n**Documentação das SDKs:** https://brapi.dev/docs/sdks", "contact": { "name": "brapi", "url": "https://brapi.dev", "email": "[email protected]" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" } }, "servers": [ { "url": "https://brapi.dev", "description": "Servidor principal da API brapi" }, { "url": "http://localhost:3001", "description": "Servidor local para desenvolvimento" } ], "tags": [ { "name": "Cotações", "description": "Consulte informações detalhadas sobre ações, BDRs, ETFs e índices brasileiros. Obtenha preços em tempo real, dados fundamentalistas, históricos e dividendos." }, { "name": "Fundos Imobiliários", "description": "Acesse dados completos de FIIs: cotações, indicadores fundamentalistas (P/VP, DY), relatórios gerenciais e histórico de proventos." }, { "name": "Fundos", "description": "Descubra e consulte fundos brasileiros listados e estruturados, incluindo FIIs, FIAGROs, FI-Infra/FIFs, FIDCs e FIPs." }, { "name": "Opções", "description": "Consulte contratos, cadeias EOD negociadas e histórico de opções." }, { "name": "Câmbio", "description": "Monitore taxas de câmbio entre moedas fiduciárias de todo o mundo, com atualizações frequentes e dados históricos." }, { "name": "Macroeconomia", "description": "Acompanhe os principais indicadores macroeconômicos do Brasil, incluindo inflação (IPCA, IGP-M), Taxa Selic, agregados monetários e atividade." }, { "name": "Renda Fixa", "description": "Consulte dados de títulos públicos e outros instrumentos de renda fixa brasileira." }, { "name": "Criptomoedas", "description": "Obtenha cotações em tempo real e dados históricos de criptomoedas, disponíveis em diversas moedas de referência." }, { "name": "Tickers", "description": "Descubra, filtre e valide tickers B3 disponíveis na brapi. Use como camada de identidade antes dos endpoints de dados de mercado." }, { "name": "Conta", "description": "Dados da conta autenticada, como plano atual e uso da janela vigente." }, { "name": "Utilitários", "description": "Ferramentas auxiliares para descobrir ativos disponíveis e verificar a saúde da API." } ], "components": { "securitySchemes": { "Bearer": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Token de API obtido no dashboard em brapi.dev/dashboard" } }, "schemas": { "DatabaseHealth": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "error" ] }, "latencyMs": { "type": "number", "minimum": 0 }, "error": { "type": "string" } }, "required": [ "status" ], "example": { "status": "ok", "latencyMs": 1 } }, "HealthResponse": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok" ] }, "timestamp": { "type": "string", "format": "date-time" }, "uptime": { "type": "number", "minimum": 0 }, "database": { "$ref": "#/components/schemas/DatabaseHealth" } }, "required": [ "status", "timestamp", "uptime" ], "example": { "status": "ok", "timestamp": "2026-02-08T16:25:38.608Z", "uptime": 866.658018047, "database": { "status": "ok", "latencyMs": 1 } } }, "AvailableResponse": { "type": "object", "properties": { "stocks": { "type": "array", "items": { "type": "string" }, "description": "Lista de códigos de ações disponíveis", "example": [ "PETR4", "VALE3", "ITUB4" ] }, "indexes": { "type": "array", "items": { "type": "string" }, "description": "Lista de índices disponíveis", "example": [ "^BVSP", "IFIX.SA" ] } }, "required": [ "stocks", "indexes" ], "example": { "stocks": [ "BBDC4", "GOLL54", "B3SA3", "ITSA4", "COGN3", "ITUB4", "BBAS3", "MGLU3", "VALE3", "PETR4" ], "indexes": [ "^BVSP", "IFIX.SA" ] } }, "ErrorResponse": { "type": "object", "properties": { "error": { "type": "boolean", "enum": [ true ] }, "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "error", "message" ], "description": "Erro interno do servidor", "example": { "error": true, "message": "Erro interno do servidor", "code": "INTERNAL_SERVER_ERROR" } }, "CryptoCoinSimple": { "type": "object", "properties": { "currency": { "type": "string" }, "currencyRateFromUSD": { "type": "number" }, "coinName": { "type": "string" }, "coinImageUrl": { "type": "string" }, "coin": { "type": "string" }, "regularMarketChange": { "type": "number" }, "regularMarketPrice": { "type": "number" }, "regularMarketChangePercent": { "type": "number" }, "regularMarketDayLow": { "type": "number" }, "regularMarketDayHigh": { "type": "number" }, "regularMarketDayRange": { "type": "string" }, "regularMarketVolume": { "type": "number" }, "marketCap": { "type": "number" }, "regularMarketTime": { "type": "string" }, "usedInterval": { "type": "string" }, "usedRange": { "type": "string" }, "historicalDataPrice": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "integer" }, "open": { "type": "number", "nullable": true }, "high": { "type": "number", "nullable": true }, "low": { "type": "number", "nullable": true }, "close": { "type": "number", "nullable": true }, "volume": { "type": "number", "nullable": true }, "adjustedClose": { "type": "number", "nullable": true } }, "required": [ "date", "open", "high", "low", "close", "volume", "adjustedClose" ] } }, "validRanges": { "type": "array", "items": { "type": "string" } }, "validIntervals": { "type": "array", "items": { "type": "string" } } }, "required": [ "currency", "currencyRateFromUSD", "coinName", "coin", "regularMarketChange", "regularMarketPrice", "regularMarketChangePercent", "regularMarketDayLow", "regularMarketDayHigh", "regularMarketDayRange", "regularMarketVolume", "marketCap", "regularMarketTime" ] }, "CryptoResponseSimple": { "type": "object", "properties": { "coins": { "type": "array", "items": { "$ref": "#/components/schemas/CryptoCoinSimple" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "coins", "requestedAt", "took" ], "example": { "coins": [ { "currency": "BRL", "currencyRateFromUSD": 5.2159, "coinName": "Bitcoin", "coinImageUrl": "https://cdn.jsdelivr.net/gh/spothq/cryptocurrency-icons@master/svg/color/btc.svg", "coin": "BTC", "regularMarketChange": 9553.84, "regularMarketPrice": 371028.28, "regularMarketChangePercent": 2.64, "regularMarketDayLow": 359613.69, "regularMarketDayHigh": 372616.12, "regularMarketDayRange": "359613.69 - 372616.12", "regularMarketVolume": 199263021357.47, "marketCap": 0, "regularMarketTime": "2026-02-08T16:24:00.000Z" } ], "requestedAt": "2026-02-08T16:26:22.155Z", "took": 350 } }, "CryptoAvailableResponse": { "type": "object", "properties": { "coins": { "type": "array", "items": { "type": "string" } } }, "required": [ "coins" ], "example": { "coins": [ "BTC", "ETH", "ADA", "BNB", "USDT", "XRP", "DOGE", "SOL", "USDC", "DOT1", "UNI3", "BCH", "LTC", "LINK", "MATIC", "AVAX" ] } }, "CurrencyQuoteSimple": { "type": "object", "properties": { "fromCurrency": { "type": "string" }, "toCurrency": { "type": "string" }, "name": { "type": "string" }, "high": { "type": "string" }, "low": { "type": "string" }, "bidVariation": { "type": "string" }, "percentageChange": { "type": "string" }, "bidPrice": { "type": "string" }, "askPrice": { "type": "string" }, "updatedAtTimestamp": { "type": "string" }, "updatedAtDate": { "type": "string" } }, "required": [ "fromCurrency", "toCurrency", "name", "high", "low", "bidVariation", "percentageChange", "bidPrice", "askPrice", "updatedAtTimestamp", "updatedAtDate" ] }, "CurrencyResponseSimple": { "type": "object", "properties": { "currency": { "type": "array", "items": { "$ref": "#/components/schemas/CurrencyQuoteSimple" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "currency", "requestedAt", "took" ], "example": { "currency": [ { "fromCurrency": "USD", "toCurrency": "BRL", "name": "Dólar Americano/Real Brasileiro", "high": "5.343", "low": "5.20858", "bidVariation": "-0.0546", "percentageChange": "-1.035958", "bidPrice": "5.2159", "askPrice": "5.2189", "updatedAtTimestamp": "1770415348", "updatedAtDate": "2026-02-06 19:02:28" }, { "fromCurrency": "EUR", "toCurrency": "BRL", "name": "Euro/Real Brasileiro", "high": "6.1915", "low": "6.15764", "bidVariation": "0.03386", "percentageChange": "0.549886", "bidPrice": "6.1915", "askPrice": "6.2415", "updatedAtTimestamp": "1770527911", "updatedAtDate": "2026-02-08 02:18:31" } ], "requestedAt": "2026-02-08T16:26:24.131Z", "took": 27 } }, "CurrencyHistoricalPairResult": { "type": "object", "properties": { "pair": { "type": "string" }, "fromCurrency": { "type": "string" }, "toCurrency": { "type": "string" }, "observations": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2026-04-30" }, "value": { "type": "number", "example": 4.9886 } }, "required": [ "date", "value" ] } } }, "required": [ "pair", "fromCurrency", "toCurrency", "observations" ], "example": { "pair": "USD-BRL", "fromCurrency": "USD", "toCurrency": "BRL", "observations": [ { "date": "2026-04-30", "value": 4.9886 }, { "date": "2026-04-29", "value": 4.9712 }, { "date": "2026-04-28", "value": 4.9854 }, { "date": "2026-04-25", "value": 5.0123 }, { "date": "2026-04-24", "value": 5.0218 } ] } }, "CurrencyHistoricalError": { "type": "object", "properties": { "pair": { "type": "string", "example": "BTC-BRL" }, "code": { "type": "string", "example": "UNSUPPORTED_PAIR" }, "message": { "type": "string", "example": "Par `BTC-BRL` não suportado em /historical. Use /api/v2/currency para cotações em tempo real." } }, "required": [ "pair", "code", "message" ] }, "CurrencyHistoricalResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/CurrencyHistoricalPairResult" } }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CurrencyHistoricalError" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "pair": "USD-BRL", "fromCurrency": "USD", "toCurrency": "BRL", "observations": [ { "date": "2026-04-30", "value": 4.9886 }, { "date": "2026-04-29", "value": 4.9712 }, { "date": "2026-04-28", "value": 4.9854 }, { "date": "2026-04-25", "value": 5.0123 }, { "date": "2026-04-24", "value": 5.0218 } ] }, { "pair": "EUR-BRL", "fromCurrency": "EUR", "toCurrency": "BRL", "observations": [ { "date": "2026-04-30", "value": 5.6712 }, { "date": "2026-04-29", "value": 5.6543 }, { "date": "2026-04-28", "value": 5.6789 } ] } ], "requestedAt": "2026-04-30T12:00:00.000Z", "took": 14 } }, "CurrencyAvailableResponse": { "type": "object", "properties": { "currencies": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "currency": { "type": "string" } }, "required": [ "name", "currency" ] } } }, "required": [ "currencies" ], "example": { "currencies": [ { "name": "USD-BRL", "currency": "Dólar Americano/Real Brasileiro" }, { "name": "USD-BRLT", "currency": "Dólar Americano/Real Brasileiro Turismo" }, { "name": "CAD-BRL", "currency": "Dólar Canadense/Real Brasileiro" }, { "name": "EUR-BRL", "currency": "Euro/Real Brasileiro" }, { "name": "GBP-BRL", "currency": "Libra Esterlina/Real Brasileiro" }, { "name": "ARS-BRL", "currency": "Peso Argentino/Real Brasileiro" }, { "name": "JPY-BRL", "currency": "Iene Japonês/Real Brasileiro" } ] } }, "DictionaryEntry": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "calculation": { "type": "string", "nullable": true }, "endpoints": { "type": "array", "items": { "type": "string" } }, "category": { "type": "string" }, "type": { "type": "string", "enum": [ "number", "string", "boolean", "date", "object", "array" ] }, "unit": { "type": "string", "nullable": true } }, "required": [ "key", "label", "description", "calculation", "endpoints", "category", "type", "unit" ], "example": { "key": "symbol", "label": "Símbolo", "description": "Código de negociação do ativo brasileiro (ex: PETR4, VALE3)", "calculation": null, "endpoints": [ "/api/quote/{tickers}", "/api/quote/list" ], "category": "quote", "type": "string", "unit": null } }, "DictionaryResponse": { "type": "object", "properties": { "fields": { "type": "array", "items": { "$ref": "#/components/schemas/DictionaryEntry" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fields", "requestedAt", "took" ], "example": { "fields": [ { "key": "symbol", "label": "Símbolo", "description": "Código de negociação do ativo brasileiro (ex: PETR4, VALE3)", "calculation": null, "endpoints": [ "/api/quote/{tickers}", "/api/quote/list" ], "category": "quote", "type": "string", "unit": null }, { "key": "shortName", "label": "Nome Curto", "description": "Nome resumido do ativo", "calculation": null, "endpoints": [ "/api/quote/{tickers}", "/api/quote/list" ], "category": "quote", "type": "string", "unit": null }, { "key": "longName", "label": "Nome Completo", "description": "Nome completo da empresa ou fundo", "calculation": null, "endpoints": [ "/api/quote/{tickers}" ], "category": "quote", "type": "string", "unit": null } ], "requestedAt": "2026-02-08T16:25:35.000Z", "took": 2 } }, "FiiListItem": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "cnpj": { "type": "string", "nullable": true }, "mandate": { "type": "string", "nullable": true }, "segmentoAtuacao": { "type": "string", "nullable": true }, "tipoGestao": { "type": "string", "nullable": true }, "administratorName": { "type": "string", "nullable": true }, "administratorCnpj": { "type": "string", "nullable": true }, "administratorAddress": { "type": "string", "nullable": true }, "administratorAddressNumber": { "type": "string", "nullable": true }, "administratorAddressComplement": { "type": "string", "nullable": true }, "administratorDistrict": { "type": "string", "nullable": true }, "administratorCity": { "type": "string", "nullable": true }, "administratorState": { "type": "string", "nullable": true }, "administratorZipCode": { "type": "string", "nullable": true }, "administratorPhone1": { "type": "string", "nullable": true }, "administratorPhone2": { "type": "string", "nullable": true }, "administratorPhone3": { "type": "string", "nullable": true }, "administratorWebsite": { "type": "string", "nullable": true }, "administratorEmail": { "type": "string", "nullable": true }, "price": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "priceToNav": { "type": "number", "nullable": true }, "dividendYield12m": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "segmentType": { "type": "string", "nullable": true } }, "required": [ "symbol", "name", "cnpj", "mandate", "segmentoAtuacao", "tipoGestao", "administratorName", "administratorCnpj", "administratorAddress", "administratorAddressNumber", "administratorAddressComplement", "administratorDistrict", "administratorCity", "administratorState", "administratorZipCode", "administratorPhone1", "administratorPhone2", "administratorPhone3", "administratorWebsite", "administratorEmail", "price", "navPerShare", "priceToNav", "dividendYield12m", "totalInvestors", "segmentType" ] }, "PaginationMeta": { "type": "object", "properties": { "page": { "type": "number" }, "limit": { "type": "number" }, "totalItems": { "type": "number" }, "totalPages": { "type": "number" }, "hasNextPage": { "type": "boolean" } }, "required": [ "page", "limit", "totalItems", "totalPages", "hasNextPage" ] }, "FiiListResponse": { "type": "object", "properties": { "fiis": { "type": "array", "items": { "$ref": "#/components/schemas/FiiListItem" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fiis", "pagination", "requestedAt", "took" ], "example": { "fiis": [ { "symbol": "MXRF11", "name": "FII MAXI RENDA RL", "cnpj": "97521225000125", "mandate": null, "segmentoAtuacao": "Logística", "tipoGestao": "Ativa", "administratorName": "BTG PACTUAL SERVICOS FINANCEIROS S/A DTVM", "administratorCnpj": "59281253000123", "administratorAddress": "Praia de Botafogo", "administratorAddressNumber": "501", "administratorAddressComplement": "6 Andar", "administratorDistrict": "Botafogo", "administratorCity": "Rio de Janeiro", "administratorState": "RJ", "administratorZipCode": "22250040", "administratorPhone1": "55 11 3383-3102", "administratorPhone2": null, "administratorPhone3": null, "administratorWebsite": "www.btgpactual.com", "administratorEmail": "[email protected]", "price": 9.58, "navPerShare": 9.409927, "priceToNav": 1.0180738, "dividendYield12m": 0.12381, "totalInvestors": 1357621, "segmentType": "papel" }, { "symbol": "XPML11", "name": "XP MALLS FII", "cnpj": "28757546000100", "mandate": null, "segmentoAtuacao": "Shoppings", "tipoGestao": "Ativa", "administratorName": "XP INVESTIMENTOS CCTVM S.A.", "administratorCnpj": "02332886000104", "administratorAddress": "Avenida Afranio de Melo Franco", "administratorAddressNumber": "290", "administratorAddressComplement": "Sala 606", "administratorDistrict": "Leblon", "administratorCity": "Rio de Janeiro", "administratorState": "RJ", "administratorZipCode": "22430060", "administratorPhone1": "55 21 3265-3700", "administratorPhone2": null, "administratorPhone3": null, "administratorWebsite": "www.xpi.com.br", "administratorEmail": "[email protected]", "price": 110.37, "navPerShare": 108.160446, "priceToNav": 1.0204285, "dividendYield12m": 0.100098, "totalInvestors": 633076, "segmentType": "tijolo" } ], "pagination": { "page": 1, "limit": 2, "totalItems": 1545, "totalPages": 773, "hasNextPage": true }, "requestedAt": "2026-02-08T16:26:20.498Z", "took": 4 } }, "FiiIndicator": { "type": "object", "properties": { "symbol": { "type": "string" }, "asOfDate": { "type": "string", "nullable": true }, "price": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "priceToNav": { "type": "number", "nullable": true }, "dividendYield12m": { "type": "number", "nullable": true }, "dividendYield1m": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "sharesOutstanding": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "segmentType": { "type": "string", "nullable": true } }, "required": [ "symbol", "asOfDate", "price", "navPerShare", "priceToNav", "dividendYield12m", "dividendYield1m", "monthlyReturn", "totalInvestors", "sharesOutstanding", "equity", "totalAssets", "segmentType" ] }, "FiiIndicatorWithInfo": { "allOf": [ { "$ref": "#/components/schemas/FiiIndicator" }, { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "cnpj": { "type": "string", "nullable": true }, "mandate": { "type": "string", "nullable": true }, "segmentoAtuacao": { "type": "string", "nullable": true }, "tipoGestao": { "type": "string", "nullable": true }, "administratorName": { "type": "string", "nullable": true }, "administratorCnpj": { "type": "string", "nullable": true }, "administratorAddress": { "type": "string", "nullable": true }, "administratorAddressNumber": { "type": "string", "nullable": true }, "administratorAddressComplement": { "type": "string", "nullable": true }, "administratorDistrict": { "type": "string", "nullable": true }, "administratorCity": { "type": "string", "nullable": true }, "administratorState": { "type": "string", "nullable": true }, "administratorZipCode": { "type": "string", "nullable": true }, "administratorPhone1": { "type": "string", "nullable": true }, "administratorPhone2": { "type": "string", "nullable": true }, "administratorPhone3": { "type": "string", "nullable": true }, "administratorWebsite": { "type": "string", "nullable": true }, "administratorEmail": { "type": "string", "nullable": true } }, "required": [ "name", "cnpj", "mandate", "segmentoAtuacao", "tipoGestao", "administratorName", "administratorCnpj", "administratorAddress", "administratorAddressNumber", "administratorAddressComplement", "administratorDistrict", "administratorCity", "administratorState", "administratorZipCode", "administratorPhone1", "administratorPhone2", "administratorPhone3", "administratorWebsite", "administratorEmail" ] } ] }, "FiiIndicatorsResponse": { "type": "object", "properties": { "fiis": { "type": "array", "items": { "$ref": "#/components/schemas/FiiIndicatorWithInfo" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fiis", "requestedAt", "took" ], "example": { "fiis": [ { "symbol": "MXRF11", "asOfDate": "2025-12-01 00:00:00+00", "price": 9.58, "navPerShare": 9.409927, "priceToNav": 1.0180738, "dividendYield12m": 0.12381, "dividendYield1m": 0.009328, "monthlyReturn": 0.007876, "totalInvestors": 1357621, "sharesOutstanding": 460269540, "equity": 4331102700, "totalAssets": 4375755000, "segmentType": "papel", "name": "FII MAXI RENDA RL", "cnpj": "97521225000125", "mandate": null, "segmentoAtuacao": "Logística", "tipoGestao": "Ativa", "administratorName": "BTG PACTUAL SERVICOS FINANCEIROS S/A DTVM", "administratorCnpj": "59281253000123", "administratorAddress": "Praia de Botafogo", "administratorAddressNumber": "501", "administratorAddressComplement": "6 Andar", "administratorDistrict": "Botafogo", "administratorCity": "Rio de Janeiro", "administratorState": "RJ", "administratorZipCode": "22250040", "administratorPhone1": "55 11 3383-3102", "administratorPhone2": null, "administratorPhone3": null, "administratorWebsite": "www.btgpactual.com", "administratorEmail": "[email protected]" } ], "requestedAt": "2026-02-08T16:25:18.077Z", "took": 47 } }, "FiiIndicatorHistoryEntry": { "type": "object", "properties": { "symbol": { "type": "string" }, "referenceDate": { "type": "string" }, "price": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "priceToNav": { "type": "number", "nullable": true }, "dividendYield12m": { "type": "number", "nullable": true }, "dividendYield1m": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "sharesOutstanding": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "segmentType": { "type": "string", "nullable": true } }, "required": [ "symbol", "referenceDate", "price", "navPerShare", "priceToNav", "dividendYield12m", "dividendYield1m", "monthlyReturn", "totalInvestors", "sharesOutstanding", "equity", "totalAssets", "segmentType" ] }, "FiiIndicatorsHistoryResponse": { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FiiIndicatorHistoryEntry" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "history", "requestedAt", "took" ], "example": { "history": [ { "symbol": "MXRF11", "referenceDate": "2025-12-01 00:00:00+00", "price": 9.411791, "navPerShare": 9.409927, "priceToNav": 1.0001981, "dividendYield12m": 0.12381, "dividendYield1m": 0.009328, "monthlyReturn": 0.007876, "totalInvestors": 1357621, "sharesOutstanding": 460269540, "equity": 4331102700, "totalAssets": 4375755000, "segmentType": "papel" }, { "symbol": "MXRF11", "referenceDate": "2025-11-01 00:00:00+00", "price": 9.463164, "navPerShare": 9.42361, "priceToNav": 1.0041974, "dividendYield12m": 0.125273, "dividendYield1m": 0.010665, "monthlyReturn": 0.010727, "totalInvestors": 1339326, "sharesOutstanding": 460269540, "equity": 4337401000, "totalAssets": 4386052600, "segmentType": "papel" } ], "requestedAt": "2026-02-08T16:25:20.123Z", "took": 12 } }, "FiiHistoricalPrice": { "type": "object", "properties": { "date": { "type": "integer" }, "open": { "type": "number", "nullable": true }, "high": { "type": "number", "nullable": true }, "low": { "type": "number", "nullable": true }, "close": { "type": "number", "nullable": true }, "volume": { "type": "number", "nullable": true }, "adjustedClose": { "type": "number", "nullable": true } }, "required": [ "date", "open", "high", "low", "close", "volume", "adjustedClose" ] }, "FiiHistoricalSeries": { "type": "object", "properties": { "symbol": { "type": "string" }, "historicalDataPrice": { "type": "array", "items": { "$ref": "#/components/schemas/FiiHistoricalPrice" } } }, "required": [ "symbol", "historicalDataPrice" ] }, "FiiHistoricalResponse": { "type": "object", "properties": { "fiis": { "type": "array", "items": { "$ref": "#/components/schemas/FiiHistoricalSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fiis", "requestedAt", "took" ], "example": { "fiis": [ { "symbol": "MXRF11", "historicalDataPrice": [ { "date": 1736478000, "open": 9.33, "high": 9.37, "low": 9.3, "close": 9.35, "volume": 1027483, "adjustedClose": 8.3454485 }, { "date": 1736391600, "open": 9.42, "high": 9.44, "low": 9.29, "close": 9.33, "volume": 1203345, "adjustedClose": 8.327598 }, { "date": 1736305200, "open": 9.44, "high": 9.47, "low": 9.34, "close": 9.42, "volume": 1558708, "adjustedClose": 8.407928 } ] } ], "requestedAt": "2026-02-08T16:25:22.456Z", "took": 8 } }, "FiiPropertySummary": { "type": "object", "properties": { "count": { "type": "number" }, "totalArea": { "type": "number", "nullable": true }, "vacancyRate": { "type": "number", "nullable": true }, "averageVacancyRate": { "type": "number", "nullable": true }, "propertiesWithVacancy": { "type": "number" } }, "required": [ "count", "totalArea", "vacancyRate", "averageVacancyRate", "propertiesWithVacancy" ] }, "FiiPortfolioSummary": { "type": "object", "properties": { "totalItems": { "type": "number" }, "declaredValue": { "type": "number", "nullable": true }, "properties": { "$ref": "#/components/schemas/FiiPropertySummary" }, "financialAssets": { "type": "object", "properties": { "count": { "type": "number" }, "declaredValue": { "type": "number", "nullable": true } }, "required": [ "count", "declaredValue" ] }, "lands": { "type": "object", "properties": { "count": { "type": "number" }, "totalArea": { "type": "number", "nullable": true } }, "required": [ "count", "totalArea" ] }, "rights": { "type": "object", "properties": { "count": { "type": "number" }, "declaredValue": { "type": "number", "nullable": true } }, "required": [ "count", "declaredValue" ] } }, "required": [ "totalItems", "declaredValue", "properties", "financialAssets", "lands", "rights" ] }, "FiiPortfolioAllocation": { "type": "object", "properties": { "assetClass": { "type": "string" }, "count": { "type": "number" }, "value": { "type": "number", "nullable": true } }, "required": [ "assetClass", "count", "value" ] }, "FiiProperty": { "type": "object", "properties": { "name": { "type": "string" }, "identifier": { "type": "string", "nullable": true }, "address": { "type": "string", "nullable": true }, "propertyClass": { "type": "string", "nullable": true }, "area": { "type": "number", "nullable": true }, "unitCount": { "type": "number", "nullable": true }, "vacancyRate": { "type": "number", "nullable": true }, "delinquencyRate": { "type": "number", "nullable": true }, "revenueShare": { "type": "number", "nullable": true }, "leasedRate": { "type": "number", "nullable": true }, "soldRate": { "type": "number", "nullable": true }, "constructionProgressActual": { "type": "number", "nullable": true }, "constructionProgressExpected": { "type": "number", "nullable": true }, "constructionCostActual": { "type": "number", "nullable": true }, "constructionCostExpected": { "type": "number", "nullable": true }, "investedShare": { "type": "number", "nullable": true }, "confidential": { "type": "boolean" } }, "required": [ "name", "identifier", "address", "propertyClass", "area", "unitCount", "vacancyRate", "delinquencyRate", "revenueShare", "leasedRate", "soldRate", "constructionProgressActual", "constructionProgressExpected", "constructionCostActual", "constructionCostExpected", "investedShare", "confidential" ] }, "FiiFinancialAsset": { "type": "object", "properties": { "assetClass": { "type": "string" }, "name": { "type": "string" }, "issuer": { "type": "string", "nullable": true }, "issuerCnpj": { "type": "string", "nullable": true }, "identifier": { "type": "string", "nullable": true }, "quantity": { "type": "number", "nullable": true }, "value": { "type": "number", "nullable": true }, "issue": { "type": "string", "nullable": true }, "series": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "maturityDate": { "type": "string", "nullable": true }, "confidential": { "type": "boolean" } }, "required": [ "assetClass", "name", "issuer", "issuerCnpj", "identifier", "quantity", "value", "issue", "series", "ticker", "maturityDate", "confidential" ] }, "FiiLand": { "type": "object", "properties": { "name": { "type": "string" }, "identifier": { "type": "string", "nullable": true }, "address": { "type": "string", "nullable": true }, "area": { "type": "number", "nullable": true }, "investedShare": { "type": "number", "nullable": true }, "equityShare": { "type": "number", "nullable": true }, "confidential": { "type": "boolean" } }, "required": [ "name", "identifier", "address", "area", "investedShare", "equityShare", "confidential" ] }, "FiiRight": { "type": "object", "properties": { "name": { "type": "string" }, "identifier": { "type": "string", "nullable": true }, "value": { "type": "number", "nullable": true }, "description": { "type": "string", "nullable": true }, "confidential": { "type": "boolean" } }, "required": [ "name", "identifier", "value", "description", "confidential" ] }, "FiiPortfolio": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "summary": { "$ref": "#/components/schemas/FiiPortfolioSummary" }, "allocations": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPortfolioAllocation" } }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/FiiProperty" } }, "financialAssets": { "type": "array", "items": { "$ref": "#/components/schemas/FiiFinancialAsset" } }, "fundHoldings": { "type": "array", "items": { "$ref": "#/components/schemas/FiiFinancialAsset" } }, "lands": { "type": "array", "items": { "$ref": "#/components/schemas/FiiLand" } }, "rights": { "type": "array", "items": { "$ref": "#/components/schemas/FiiRight" } } }, "required": [ "symbol", "cnpj", "referenceDate", "version", "summary", "allocations", "properties", "financialAssets", "fundHoldings", "lands", "rights" ] }, "FiiPortfolioResponse": { "type": "object", "properties": { "fiis": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPortfolio" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fiis", "requestedAt", "took" ], "example": { "fiis": [ { "symbol": "HGLG11", "cnpj": "11728688000147", "referenceDate": "2026-03-31", "version": 2, "summary": { "totalItems": 40, "declaredValue": 3349501.49, "properties": { "count": 37, "totalArea": 2066028.32, "vacancyRate": 0.032785, "averageVacancyRate": 0.03787, "propertiesWithVacancy": 37 }, "financialAssets": { "count": 3, "declaredValue": 3349501.49 }, "lands": { "count": 0, "totalArea": null }, "rights": { "count": 0, "declaredValue": null } }, "allocations": [ { "assetClass": "real_estate", "count": 37, "value": null }, { "assetClass": "cri", "count": 3, "value": 3349501.49 } ], "properties": [ { "name": "DCR", "identifier": "925452ac11b478196d767981dee8ecaf", "address": "Av. Hélio Ossamu Daikuara, nº 1.445, Jardim Vista Alegre, Embu das Artes", "propertyClass": "Imóveis para renda acabados", "area": 77587.2, "unitCount": 1, "vacancyRate": 0.135305823641013, "delinquencyRate": 0, "revenueShare": 0.0398709781486898, "leasedRate": null, "soldRate": null, "constructionProgressActual": null, "constructionProgressExpected": null, "constructionCostActual": null, "constructionCostExpected": null, "investedShare": null, "confidential": false } ], "financialAssets": [ { "assetClass": "cri", "name": "VIRGO COMPANHIA DE SECURITIZAÇÃO", "issuer": "VIRGO COMPANHIA DE SECURITIZAÇÃO", "issuerCnpj": "08769451000108", "identifier": "8d612f6e7e4fb1da2d668f07c4f91420", "quantity": 35, "value": 3349501.49, "issue": "4", "series": "124", "ticker": null, "maturityDate": null, "confidential": false } ], "fundHoldings": [], "lands": [], "rights": [] } ], "requestedAt": "2026-02-08T16:25:24.456Z", "took": 8 } }, "FiiPropertiesResult": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "summary": { "$ref": "#/components/schemas/FiiPropertySummary" }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/FiiProperty" } } }, "required": [ "symbol", "cnpj", "referenceDate", "version", "summary", "properties" ] }, "FiiPropertiesResponse": { "type": "object", "properties": { "fiis": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPropertiesResult" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "fiis", "requestedAt", "took" ], "example": { "fiis": [ { "symbol": "HGLG11", "cnpj": "11728688000147", "referenceDate": "2026-03-31", "version": 2, "summary": { "count": 37, "totalArea": 2066028.32, "vacancyRate": 0.032785, "averageVacancyRate": 0.03787, "propertiesWithVacancy": 37 }, "properties": [ { "name": "São José dos Campos", "identifier": "322fab9c7769a894ed2736a77d73d9d1", "address": "Rua Ambrósio Molina, 1090/1100, São José dos Campos, SP", "propertyClass": "Imóveis para renda acabados", "area": 72487.36, "unitCount": 1, "vacancyRate": 0.248282735086503, "delinquencyRate": 0, "revenueShare": 0.0241721159147739, "leasedRate": null, "soldRate": null, "constructionProgressActual": null, "constructionProgressExpected": null, "constructionCostActual": null, "constructionCostExpected": null, "investedShare": null, "confidential": false } ] } ], "requestedAt": "2026-02-08T16:25:24.456Z", "took": 8 } }, "FiiPropertiesHistoryEntry": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "summary": { "$ref": "#/components/schemas/FiiPropertySummary" } }, "required": [ "symbol", "cnpj", "referenceDate", "version", "summary" ] }, "FiiPropertiesHistoryResponse": { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPropertiesHistoryEntry" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "history", "requestedAt", "took" ], "example": { "history": [ { "symbol": "HGLG11", "cnpj": "11728688000147", "referenceDate": "2026-03-31", "version": 2, "summary": { "count": 37, "totalArea": 2066028.32, "vacancyRate": 0.032785, "averageVacancyRate": 0.03787, "propertiesWithVacancy": 37 } }, { "symbol": "HGLG11", "cnpj": "11728688000147", "referenceDate": "2025-12-31", "version": 2, "summary": { "count": 28, "totalArea": 1628383.15, "vacancyRate": 0.029088, "averageVacancyRate": 0.04282, "propertiesWithVacancy": 28 } } ], "requestedAt": "2026-02-08T16:25:26.456Z", "took": 6 } }, "FiiPortfolioHistoryEntry": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "summary": { "$ref": "#/components/schemas/FiiPortfolioSummary" }, "allocations": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPortfolioAllocation" } } }, "required": [ "symbol", "cnpj", "referenceDate", "version", "summary", "allocations" ] }, "FiiPortfolioHistoryResponse": { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FiiPortfolioHistoryEntry" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "history", "requestedAt", "took" ], "example": { "history": [ { "symbol": "HGLG11", "cnpj": "11728688000147", "referenceDate": "2026-03-31", "version": 2, "summary": { "totalItems": 57, "declaredValue": 1256045042.52, "properties": { "count": 37, "totalArea": 2066028.32, "vacancyRate": 0.032785, "averageVacancyRate": 0.03787, "propertiesWithVacancy": 37 }, "financialAssets": { "count": 20, "declaredValue": 1256045042.52 }, "lands": { "count": 0, "totalArea": null }, "rights": { "count": 0, "declaredValue": null } }, "allocations": [ { "assetClass": "cri", "count": 1, "value": 106876.54 }, { "assetClass": "fii", "count": 8, "value": 232510079.3 }, { "assetClass": "real_estate_company", "count": 11, "value": 1023428086.68 }, { "assetClass": "real_estate", "count": 37, "value": null } ] } ], "requestedAt": "2026-02-08T16:25:27.456Z", "took": 7 } }, "FiiMonthlyReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "administratorName": { "type": "string", "nullable": true }, "administratorCnpj": { "type": "string", "nullable": true }, "administratorAddress": { "type": "string", "nullable": true }, "administratorAddressNumber": { "type": "string", "nullable": true }, "administratorAddressComplement": { "type": "string", "nullable": true }, "administratorDistrict": { "type": "string", "nullable": true }, "administratorCity": { "type": "string", "nullable": true }, "administratorState": { "type": "string", "nullable": true }, "administratorZipCode": { "type": "string", "nullable": true }, "administratorPhone1": { "type": "string", "nullable": true }, "administratorPhone2": { "type": "string", "nullable": true }, "administratorPhone3": { "type": "string", "nullable": true }, "administratorWebsite": { "type": "string", "nullable": true }, "administratorEmail": { "type": "string", "nullable": true }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "totalAssets": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "sharesOutstanding": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "adminFeeRate": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true }, "monthlyPatrimonialReturn": { "type": "number", "nullable": true }, "monthlyDividendYield": { "type": "number", "nullable": true }, "amortizationRate": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "cash": { "type": "number", "nullable": true }, "liquidityNeeds": { "type": "number", "nullable": true }, "governmentBonds": { "type": "number", "nullable": true }, "privateBonds": { "type": "number", "nullable": true }, "fixedIncomeFunds": { "type": "number", "nullable": true }, "totalInvested": { "type": "number", "nullable": true }, "realEstateAssets": { "type": "number", "nullable": true }, "realEstateCompanyShares": { "type": "number", "nullable": true }, "realEstateCompanyUnits": { "type": "number", "nullable": true }, "cri": { "type": "number", "nullable": true }, "lci": { "type": "number", "nullable": true }, "fiiHoldings": { "type": "number", "nullable": true }, "receivables": { "type": "number", "nullable": true }, "rentalReceivables": { "type": "number", "nullable": true }, "otherReceivables": { "type": "number", "nullable": true }, "distributionsPayable": { "type": "number", "nullable": true }, "adminFeesPayable": { "type": "number", "nullable": true }, "realEstateObligations": { "type": "number", "nullable": true }, "totalLiabilities": { "type": "number", "nullable": true } }, "required": [ "symbol", "name", "cnpj", "administratorName", "administratorCnpj", "administratorAddress", "administratorAddressNumber", "administratorAddressComplement", "administratorDistrict", "administratorCity", "administratorState", "administratorZipCode", "administratorPhone1", "administratorPhone2", "administratorPhone3", "administratorWebsite", "administratorEmail", "referenceDate", "version", "totalAssets", "equity", "sharesOutstanding", "navPerShare", "adminFeeRate", "monthlyReturn", "monthlyPatrimonialReturn", "monthlyDividendYield", "amortizationRate", "totalInvestors", "cash", "liquidityNeeds", "governmentBonds", "privateBonds", "fixedIncomeFunds", "totalInvested", "realEstateAssets", "realEstateCompanyShares", "realEstateCompanyUnits", "cri", "lci", "fiiHoldings", "receivables", "rentalReceivables", "otherReceivables", "distributionsPayable", "adminFeesPayable", "realEstateObligations", "totalLiabilities" ] }, "FiiReportsResponse": { "type": "object", "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/FiiMonthlyReport" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "reports", "pagination", "requestedAt", "took" ], "example": { "reports": [ { "symbol": "MXRF11", "name": null, "cnpj": "97521225000125", "administratorName": "BTG PACTUAL SERVICOS FINANCEIROS S/A DTVM", "administratorCnpj": "59281253000123", "administratorAddress": "Praia de Botafogo", "administratorAddressNumber": "501", "administratorAddressComplement": "6 Andar", "administratorDistrict": "Botafogo", "administratorCity": "Rio de Janeiro", "administratorState": "RJ", "administratorZipCode": "22250040", "administratorPhone1": "55 11 3383-3102", "administratorPhone2": null, "administratorPhone3": null, "administratorWebsite": "www.btgpactual.com", "administratorEmail": "[email protected]", "referenceDate": "2025-12-01 00:00:00+00", "version": 2, "totalAssets": 4375755000, "equity": 4331102700, "sharesOutstanding": 460269540, "navPerShare": 9.409927, "adminFeeRate": 0.000753, "monthlyReturn": 0.007876, "monthlyPatrimonialReturn": -0.001452, "monthlyDividendYield": 0.009328, "amortizationRate": 0, "totalInvestors": 1357621, "cash": 0, "liquidityNeeds": 24506374, "governmentBonds": 0, "privateBonds": 0, "fixedIncomeFunds": 24506374, "totalInvested": 4326274600, "realEstateAssets": 9147060, "realEstateCompanyShares": 0, "realEstateCompanyUnits": 0, "cri": 3354012400, "lci": 0, "fiiHoldings": 538337660, "receivables": 24973770, "rentalReceivables": 0, "otherReceivables": 24973770, "distributionsPayable": 41155660, "adminFeesPayable": 3260833.2, "realEstateObligations": 0, "totalLiabilities": 44652356 } ], "pagination": { "page": 1, "limit": 1, "totalItems": 10, "totalPages": 10, "hasNextPage": true }, "requestedAt": "2026-02-08T16:25:27.115Z", "took": 5 } }, "FiiDividend": { "type": "object", "properties": { "symbol": { "type": "string" }, "approvedOn": { "type": "string", "nullable": true }, "label": { "type": "string" }, "lastDatePrior": { "type": "string" }, "paymentDate": { "type": "string" }, "rate": { "type": "number" }, "relatedTo": { "type": "string", "nullable": true }, "isinCode": { "type": "string", "nullable": true }, "remarks": { "type": "string", "nullable": true } }, "required": [ "symbol", "approvedOn", "label", "lastDatePrior", "paymentDate", "rate", "relatedTo", "isinCode", "remarks" ] }, "FiiDividendsResponse": { "type": "object", "properties": { "dividends": { "type": "array", "items": { "$ref": "#/components/schemas/FiiDividend" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "dividends", "requestedAt", "took" ], "example": { "dividends": [ { "symbol": "MXRF11", "approvedOn": null, "label": "RENDIMENTO", "lastDatePrior": "2025-12-01 00:00:00+00", "paymentDate": "2025-12-01 00:00:00+00", "rate": 0.08941643, "relatedTo": null, "isinCode": null, "remarks": "backfilled from FiiMonthlyReports" }, { "symbol": "MXRF11", "approvedOn": null, "label": "RENDIMENTO", "lastDatePrior": "2025-11-01 00:00:00+00", "paymentDate": "2025-11-01 00:00:00+00", "rate": 0.098144606, "relatedTo": null, "isinCode": null, "remarks": "backfilled from FiiMonthlyReports" } ], "requestedAt": "2026-02-08T16:25:19.026Z", "took": 23 } }, "FiiFinancialReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "year": { "type": "number" }, "referenceDate": { "type": "string" }, "documentType": { "type": "string" }, "fields": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "year", "referenceDate", "documentType", "fields" ] }, "FiiAnnualReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "year": { "type": "number" }, "referenceDate": { "type": "string" }, "includeSections": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "fields": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "year", "referenceDate", "includeSections", "fields" ] }, "FundListItem": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "formattedCnpj": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "legalName": { "type": "string", "nullable": true }, "assetType": { "type": "string", "enum": [ "fii", "fiagro", "fiinfra", "fif", "fidc", "fip", "etf", "other" ] }, "cvmClassType": { "type": "string", "nullable": true }, "cvmClassification": { "type": "string", "nullable": true }, "anbimaClassification": { "type": "string", "nullable": true }, "b3Classification": { "type": "string", "nullable": true }, "isin": { "type": "string", "nullable": true }, "administratorName": { "type": "string", "nullable": true }, "administratorCnpj": { "type": "string", "nullable": true }, "managerName": { "type": "string", "nullable": true }, "managerCnpj": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "price": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "priceToNav": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "updatedAt": { "type": "string", "nullable": true } }, "required": [ "symbol", "cnpj", "formattedCnpj", "name", "legalName", "assetType", "cvmClassType", "cvmClassification", "anbimaClassification", "b3Classification", "isin", "administratorName", "administratorCnpj", "managerName", "managerCnpj", "status", "price", "navPerShare", "priceToNav", "equity", "totalAssets", "totalInvestors", "updatedAt" ] }, "FundPaginationMeta": { "type": "object", "properties": { "page": { "type": "number" }, "limit": { "type": "number" }, "totalItems": { "type": "number" }, "totalPages": { "type": "number" }, "hasNextPage": { "type": "boolean" } }, "required": [ "page", "limit", "totalItems", "totalPages", "hasNextPage" ] }, "FundIndicator": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "name": { "type": "string", "nullable": true }, "assetType": { "type": "string", "enum": [ "fii", "fiagro", "fiinfra", "fif", "fidc", "fip", "etf", "other" ] }, "price": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "priceToNav": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "asOfDate": { "type": "string", "nullable": true }, "dailyApplications": { "type": "number", "nullable": true }, "dailyRedemptions": { "type": "number", "nullable": true }, "sharesOutstanding": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true }, "patrimonialMonthlyReturn": { "type": "number", "nullable": true }, "dividendYieldMonthly": { "type": "number", "nullable": true } }, "required": [ "symbol", "cnpj", "name", "assetType", "price", "navPerShare", "priceToNav", "equity", "totalAssets", "totalInvestors", "asOfDate", "dailyApplications", "dailyRedemptions", "sharesOutstanding", "monthlyReturn", "patrimonialMonthlyReturn", "dividendYieldMonthly" ] }, "FundNavHistory": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "date": { "type": "string" }, "classOrSeries": { "type": "string", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "equity": { "type": "number", "nullable": true }, "dailyApplications": { "type": "number", "nullable": true }, "dailyRedemptions": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true } }, "required": [ "symbol", "cnpj", "date", "classOrSeries", "totalAssets", "navPerShare", "equity", "dailyApplications", "dailyRedemptions", "totalInvestors", "monthlyReturn" ] }, "FundProfile": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "investorBreakdown": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "risk": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "liquidity": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "concentration": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "privateCredit": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "referenceDate", "investorBreakdown", "risk", "liquidity", "concentration", "privateCredit" ] }, "FundDividend": { "type": "object", "properties": { "symbol": { "type": "string" }, "cnpj": { "type": "string" }, "assetType": { "type": "string", "enum": [ "fiagro", "fiinfra", "fif", "fidc", "fip", "other" ] }, "declaredDate": { "type": "string" }, "lastDatePrior": { "type": "string" }, "paymentDate": { "type": "string" }, "rate": { "type": "number" }, "label": { "type": "string" }, "isinCode": { "type": "string", "nullable": true } }, "required": [ "symbol", "cnpj", "assetType", "declaredDate", "lastDatePrior", "paymentDate", "rate", "label", "isinCode" ] }, "FiagroReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "name": { "type": "string", "nullable": true }, "referenceDate": { "type": "string" }, "version": { "type": "number" }, "isin": { "type": "string", "nullable": true }, "market": { "type": "string", "nullable": true }, "administratorName": { "type": "string", "nullable": true }, "managerName": { "type": "string", "nullable": true }, "totalAssets": { "type": "number", "nullable": true }, "netEquity": { "type": "number", "nullable": true }, "sharesOutstanding": { "type": "number", "nullable": true }, "navPerShare": { "type": "number", "nullable": true }, "totalInvestors": { "type": "number", "nullable": true }, "monthlyReturn": { "type": "number", "nullable": true }, "patrimonialMonthlyReturn": { "type": "number", "nullable": true }, "dividendYieldMonthly": { "type": "number", "nullable": true }, "amortizationRateMonthly": { "type": "number", "nullable": true }, "liquidityNeeds": { "type": "number", "nullable": true }, "incomeToDistribute": { "type": "number", "nullable": true }, "totalLiabilities": { "type": "number", "nullable": true } }, "required": [ "symbol", "cnpj", "name", "referenceDate", "version", "isin", "market", "administratorName", "managerName", "totalAssets", "netEquity", "sharesOutstanding", "navPerShare", "totalInvestors", "monthlyReturn", "patrimonialMonthlyReturn", "dividendYieldMonthly", "amortizationRateMonthly", "liquidityNeeds", "incomeToDistribute", "totalLiabilities" ] }, "FiagroPortfolio": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "summary": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "allocations": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "investors": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "liabilities": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "referenceDate", "summary", "allocations", "investors", "liabilities" ] }, "FundHoldingDetails": { "type": "object", "nullable": true, "properties": { "applicationType": { "type": "string" }, "negotiationType": { "type": "string" }, "assetCode": { "type": "string" }, "issueDate": { "type": "string" }, "relatedIssuer": { "type": "boolean" }, "purchasedQuantity": { "type": "number" }, "soldQuantity": { "type": "number" }, "purchaseValue": { "type": "number" }, "saleValue": { "type": "number" }, "confidentialUntil": { "type": "string" }, "fundClassType": { "type": "string" }, "subclassId": { "type": "string" }, "issuerType": { "type": "string" } } }, "FundHolding": { "type": "object", "properties": { "bucket": { "type": "string" }, "assetType": { "type": "string", "nullable": true }, "assetName": { "type": "string", "nullable": true }, "issuerName": { "type": "string", "nullable": true }, "issuerCnpj": { "type": "string", "nullable": true }, "isin": { "type": "string", "nullable": true }, "selicCode": { "type": "string", "nullable": true }, "quantity": { "type": "number", "nullable": true }, "marketValue": { "type": "number", "nullable": true }, "costValue": { "type": "number", "nullable": true }, "maturityDate": { "type": "string", "nullable": true }, "confidential": { "type": "boolean" }, "details": { "$ref": "#/components/schemas/FundHoldingDetails" } }, "required": [ "bucket", "assetType", "assetName", "issuerName", "issuerCnpj", "isin", "selicCode", "quantity", "marketValue", "costValue", "maturityDate", "confidential", "details" ] }, "FundPortfolio": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "name": { "type": "string", "nullable": true }, "referenceDate": { "type": "string" }, "summary": { "type": "object", "additionalProperties": { "nullable": true } }, "publicBonds": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "fundHoldings": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "creditAssets": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "listedSecurities": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "receivables": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "payables": { "type": "array", "items": { "$ref": "#/components/schemas/FundHolding" } }, "confidentialSummary": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "name", "referenceDate", "summary", "publicBonds", "fundHoldings", "creditAssets", "listedSecurities", "receivables", "payables", "confidentialSummary" ] }, "FidcReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "name": { "type": "string", "nullable": true }, "referenceDate": { "type": "string" }, "administratorName": { "type": "string", "nullable": true }, "class": { "type": "string", "nullable": true }, "condominiumType": { "type": "string", "nullable": true }, "assets": { "type": "number", "nullable": true }, "portfolioValue": { "type": "number", "nullable": true }, "netEquity": { "type": "number", "nullable": true }, "averageNetEquity": { "type": "number", "nullable": true }, "liabilities": { "type": "number", "nullable": true } }, "required": [ "symbol", "cnpj", "name", "referenceDate", "administratorName", "class", "condominiumType", "assets", "portfolioValue", "netEquity", "averageNetEquity", "liabilities" ] }, "FidcPortfolio": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "referenceDate": { "type": "string" }, "sectors": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "maturityBuckets": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "delinquencyBuckets": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "riskBuckets": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "quotaClasses": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": { "nullable": true } } }, "investors": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } }, "cedentes": { "type": "object", "nullable": true, "additionalProperties": { "nullable": true } } }, "required": [ "symbol", "cnpj", "referenceDate", "sectors", "maturityBuckets", "delinquencyBuckets", "riskBuckets", "quotaClasses", "investors", "cedentes" ] }, "FipReport": { "type": "object", "properties": { "symbol": { "type": "string", "nullable": true }, "cnpj": { "type": "string" }, "name": { "type": "string", "nullable": true }, "reportType": { "type": "string", "enum": [ "trimestral", "quadrimestral" ] }, "referenceDate": { "type": "string" }, "netEquity": { "type": "number", "nullable": true }, "targetAudience": { "type": "string", "nullable": true }, "isInvestmentEntity": { "type": "boolean", "nullable": true }, "investedInOtherFips": { "type": "number", "nullable": true }, "capital": { "type": "object", "nullable": true, "properties": { "committed": { "type": "number", "nullable": true }, "subscribed": { "type": "number", "nullable": true }, "paidIn": { "type": "number", "nullable": true } }, "required": [ "committed", "subscribed", "paidIn" ] }, "quotas": { "type": "object", "nullable": true, "properties": { "subscribed": { "type": "number", "nullable": true }, "paidIn": { "type": "number", "nullable": true } }, "required": [ "subscribed", "paidIn" ] }, "quotaClass": { "type": "object", "nullable": true, "properties": { "name": { "type": "string", "nullable": true }, "fundType": { "type": "string", "nullable": true }, "subscribedQuotas": { "type": "number", "nullable": true }, "paidInQuotas": { "type": "number", "nullable": true }, "quotaValue": { "type": "number", "nullable": true }, "investors": { "type": "number", "nullable": true }, "hasDistinctEconomicRights": { "type": "boolean", "nullable": true }, "hasSpecialPoliticalRights": { "type": "boolean", "nullable": true } }, "required": [ "name", "fundType", "subscribedQuotas", "paidInQuotas", "quotaValue", "investors", "hasDistinctEconomicRights", "hasSpecialPoliticalRights" ] }, "investorComposition": { "type": "object", "nullable": true, "properties": { "totalInvestors": { "type": "number", "nullable": true }, "totalSubscribedQuotaPercent": { "type": "number", "nullable": true }, "byType": { "type": "object", "properties": { "individuals": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "investmentFunds": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "realEstateFunds": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "openPensionFunds": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "closedPensionFunds": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "publicPensionFunds": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "commercialBanks": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "nonResidents": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "otherInvestors": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "insuranceCompanies": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "fundDistributors": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "capitalizationAndLeasingCompanies": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "financialCompanies": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "nonFinancialCompanies": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] }, "brokersAndDistributors": { "type": "object", "properties": { "investors": { "type": "number", "nullable": true }, "subscribedQuotaPercent": { "type": "number", "nullable": true } }, "required": [ "investors", "subscribedQuotaPercent" ] } } } }, "required": [ "totalInvestors", "totalSubscribedQuotaPercent", "byType" ] } }, "required": [ "symbol", "cnpj", "name", "reportType", "referenceDate", "netEquity", "targetAudience", "isInvestmentEntity", "investedInOtherFips", "capital", "quotas", "quotaClass", "investorComposition" ] }, "FutureOptionExpirationsResponse": { "type": "object", "properties": { "underlying": { "type": "string" }, "expirations": { "type": "array", "items": { "type": "string" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirations", "requestedAt", "took" ], "example": { "underlying": "BGI", "expirations": [ "2026-06-30", "2026-07-31", "2026-08-31", "2026-09-30", "2026-10-30", "2026-11-30", "2026-12-30", "2027-03-31" ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 22 } }, "FutureOptionStrikesResponse": { "type": "object", "properties": { "underlying": { "type": "string" }, "expirationDate": { "type": "string" }, "side": { "type": "string", "nullable": true, "enum": [ "call", "put" ] }, "strikes": { "type": "array", "items": { "type": "number" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "side", "strikes", "requestedAt", "took" ], "example": { "underlying": "BGI", "expirationDate": "2026-06-30", "side": "call", "strikes": [ 280, 285, 290, 300, 305, 308, 310, 312, 315 ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 18 } }, "FutureOptionQuote": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código da opção (ex.: `BGIH27C028550`)." }, "underlyingAsset": { "type": "string", "description": "Código do ativo (ex.: `BGI`)." }, "underlyingFuture": { "type": "string", "nullable": true, "description": "Contrato futuro de base, quando existir." }, "optionType": { "type": "string", "enum": [ "call", "put" ], "description": "`call` (compra) ou `put` (venda)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "`american` (exerce a qualquer momento) ou `european` (só no vencimento)." }, "segment": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "`financial` ou `agribusiness`." }, "strike": { "type": "number", "description": "Strike (preço combinado)." }, "expirationDate": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD)." }, "firstTradeDate": { "type": "string", "nullable": true, "description": "Data do primeiro pregão." }, "lastTradeDate": { "type": "string", "nullable": true, "description": "Data do último pregão." }, "contractMultiplier": { "type": "number", "nullable": true, "description": "Multiplicador (vem do futuro de base)." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote." }, "exerciseType": { "type": "string", "nullable": true, "description": "Tipo de exercício." }, "automaticExercise": { "type": "boolean", "nullable": true, "description": "`true` se a opção é exercida sozinha no vencimento." }, "premiumUpfront": { "type": "boolean", "nullable": true, "description": "`true` se o prêmio é pago à vista, `false` se é diferido." }, "isin": { "type": "string", "nullable": true, "description": "Código ISIN." }, "cficCode": { "type": "string", "nullable": true, "description": "Código CFI." }, "date": { "type": "integer", "description": "Data do pregão (Unix em segundos)." }, "open": { "type": "number", "nullable": true, "description": "Abertura." }, "high": { "type": "number", "nullable": true, "description": "Máxima." }, "low": { "type": "number", "nullable": true, "description": "Mínima." }, "average": { "type": "number", "nullable": true, "description": "Preço médio." }, "close": { "type": "number", "nullable": true, "description": "Fechamento." }, "referencePrice": { "type": "number", "nullable": true, "description": "Preço de referência oficial." }, "oscillationPct": { "type": "number", "nullable": true, "description": "Variação % em relação ao dia anterior." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios." }, "volume": { "type": "number", "nullable": true, "description": "Quantidade de contratos negociados." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume em reais (BRL)." } }, "required": [ "symbol", "underlyingAsset", "underlyingFuture", "optionType", "optionStyle", "segment", "strike", "expirationDate", "firstTradeDate", "lastTradeDate", "contractMultiplier", "allocationRoundLot", "exerciseType", "automaticExercise", "premiumUpfront", "isin", "cficCode", "date", "open", "high", "low", "average", "close", "referencePrice", "oscillationPct", "trades", "volume", "financialVolume" ] }, "FutureOptionChainResponse": { "type": "object", "properties": { "underlying": { "type": "string" }, "expirationDate": { "type": "string" }, "date": { "type": "string" }, "series": { "type": "array", "items": { "$ref": "#/components/schemas/FutureOptionQuote" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "date", "series", "requestedAt", "took" ], "example": { "underlying": "BGI", "expirationDate": "2026-06-30", "date": "2026-06-01", "series": [ { "symbol": "BGIM26C028000", "underlyingAsset": "BGI", "underlyingFuture": null, "optionType": "call", "optionStyle": "american", "segment": "agribusiness", "strike": 280, "expirationDate": "2026-06-30", "firstTradeDate": "2026-03-09", "lastTradeDate": "2026-06-30", "contractMultiplier": 330, "allocationRoundLot": 1, "exerciseType": null, "automaticExercise": null, "premiumUpfront": true, "isin": "BRBMEFCBMMP7", "cficCode": "OCAFPS", "date": 1780272000, "open": null, "high": null, "low": null, "average": null, "close": null, "referencePrice": 68.57, "oscillationPct": null, "trades": null, "volume": null, "financialVolume": null }, { "symbol": "BGIM26P028000", "underlyingAsset": "BGI", "underlyingFuture": null, "optionType": "put", "optionStyle": "american", "segment": "agribusiness", "strike": 280, "expirationDate": "2026-06-30", "firstTradeDate": "2026-03-09", "lastTradeDate": "2026-06-30", "contractMultiplier": 330, "allocationRoundLot": 1, "exerciseType": null, "automaticExercise": null, "premiumUpfront": true, "isin": "BRBMEFVBMMP7", "cficCode": "OPAFPS", "date": 1780272000, "open": null, "high": null, "low": null, "average": null, "close": null, "referencePrice": 0.01, "oscillationPct": null, "trades": null, "volume": null, "financialVolume": null } ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 54 } }, "FutureOptionPricePoint": { "type": "object", "properties": { "date": { "type": "integer", "description": "Data do pregão (Unix em segundos)." }, "open": { "type": "number", "nullable": true, "description": "Abertura." }, "high": { "type": "number", "nullable": true, "description": "Máxima." }, "low": { "type": "number", "nullable": true, "description": "Mínima." }, "average": { "type": "number", "nullable": true, "description": "Preço médio." }, "close": { "type": "number", "nullable": true, "description": "Fechamento." }, "referencePrice": { "type": "number", "nullable": true, "description": "Preço de referência oficial." }, "oscillationPct": { "type": "number", "nullable": true, "description": "Variação % em relação ao dia anterior." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios." }, "volume": { "type": "number", "nullable": true, "description": "Quantidade de contratos negociados." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume em reais (BRL)." } }, "required": [ "date", "open", "high", "low", "average", "close", "referencePrice", "oscillationPct", "trades", "volume", "financialVolume" ] }, "FutureOptionSpecs": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código da opção (ex.: `BGIH27C028550`)." }, "underlyingAsset": { "type": "string", "description": "Código do ativo (ex.: `BGI`)." }, "underlyingFuture": { "type": "string", "nullable": true, "description": "Contrato futuro de base, quando existir." }, "optionType": { "type": "string", "enum": [ "call", "put" ], "description": "`call` (compra) ou `put` (venda)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "`american` (exerce a qualquer momento) ou `european` (só no vencimento)." }, "segment": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "`financial` ou `agribusiness`." }, "strike": { "type": "number", "description": "Strike (preço combinado)." }, "expirationDate": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD)." }, "firstTradeDate": { "type": "string", "nullable": true, "description": "Data do primeiro pregão." }, "lastTradeDate": { "type": "string", "nullable": true, "description": "Data do último pregão." }, "contractMultiplier": { "type": "number", "nullable": true, "description": "Multiplicador (vem do futuro de base)." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote." }, "exerciseType": { "type": "string", "nullable": true, "description": "Tipo de exercício." }, "automaticExercise": { "type": "boolean", "nullable": true, "description": "`true` se a opção é exercida sozinha no vencimento." }, "premiumUpfront": { "type": "boolean", "nullable": true, "description": "`true` se o prêmio é pago à vista, `false` se é diferido." }, "isin": { "type": "string", "nullable": true, "description": "Código ISIN." }, "cficCode": { "type": "string", "nullable": true, "description": "Código CFI." } }, "required": [ "symbol", "underlyingAsset", "underlyingFuture", "optionType", "optionStyle", "segment", "strike", "expirationDate", "firstTradeDate", "lastTradeDate", "contractMultiplier", "allocationRoundLot", "exerciseType", "automaticExercise", "premiumUpfront", "isin", "cficCode" ] }, "FutureOptionWithHistory": { "allOf": [ { "$ref": "#/components/schemas/FutureOptionSpecs" }, { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FutureOptionPricePoint" } } }, "required": [ "history" ] } ] }, "FutureOptionHistoricalResponse": { "type": "object", "properties": { "option": { "$ref": "#/components/schemas/FutureOptionWithHistory" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "option", "requestedAt", "took" ], "example": { "option": { "symbol": "BGIM26C028000", "underlyingAsset": "BGI", "underlyingFuture": null, "optionType": "call", "optionStyle": "american", "segment": "agribusiness", "strike": 280, "expirationDate": "2026-06-30", "firstTradeDate": "2026-03-09", "lastTradeDate": "2026-06-30", "contractMultiplier": 330, "allocationRoundLot": 1, "exerciseType": null, "automaticExercise": null, "premiumUpfront": true, "isin": "BRBMEFCBMMP7", "cficCode": "OCAFPS", "history": [ { "date": 1780272000, "open": null, "high": null, "low": null, "average": null, "close": null, "referencePrice": 68.57, "oscillationPct": null, "trades": null, "volume": null, "financialVolume": null } ] }, "requestedAt": "2026-06-02T12:00:00.000Z", "took": 33 } }, "FutureOptionAnalyticsQuote": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código da opção (ex.: `BGIH27C028550`)." }, "underlyingAsset": { "type": "string", "description": "Código do ativo (ex.: `BGI`)." }, "underlyingFuture": { "type": "string", "nullable": true, "description": "Contrato futuro de base, quando existir." }, "optionType": { "type": "string", "enum": [ "call", "put" ], "description": "`call` (compra) ou `put` (venda)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "`american` (exerce a qualquer momento) ou `european` (só no vencimento)." }, "segment": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "`financial` ou `agribusiness`." }, "strike": { "type": "number", "description": "Strike (preço combinado)." }, "expirationDate": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD)." }, "firstTradeDate": { "type": "string", "nullable": true, "description": "Data do primeiro pregão." }, "lastTradeDate": { "type": "string", "nullable": true, "description": "Data do último pregão." }, "contractMultiplier": { "type": "number", "nullable": true, "description": "Multiplicador (vem do futuro de base)." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote." }, "exerciseType": { "type": "string", "nullable": true, "description": "Tipo de exercício." }, "automaticExercise": { "type": "boolean", "nullable": true, "description": "`true` se a opção é exercida sozinha no vencimento." }, "premiumUpfront": { "type": "boolean", "nullable": true, "description": "`true` se o prêmio é pago à vista, `false` se é diferido." }, "isin": { "type": "string", "nullable": true, "description": "Código ISIN." }, "cficCode": { "type": "string", "nullable": true, "description": "Código CFI." }, "date": { "type": "string", "description": "Data do pregão, no formato YYYY-MM-DD." }, "model": { "type": "string", "enum": [ "black-76", "cox-ross-rubinstein-futures", "unsupported" ], "description": "Modelo usado na precificação. Opções europeias sobre futuros usam Black-76; opções americanas usam aproximação binomial." }, "priceSource": { "type": "string", "enum": [ "close", "referencePrice", "none" ], "description": "Preço usado para resolver IV. `referencePrice` é preço de referência oficial e vem com confiança menor que fechamento negociado." }, "underlyingPrice": { "type": "number", "nullable": true, "description": "Preço do contrato futuro subjacente usado no cálculo." }, "optionPrice": { "type": "number", "nullable": true, "description": "Preço da opção usado para resolver a volatilidade implícita." }, "riskFreeRate": { "type": "number", "nullable": true, "description": "Taxa livre de risco anual em decimal." }, "dividendYield": { "type": "number", "nullable": true, "description": "Sempre `0` para opções sobre futuros em v1." }, "timeToExpirationYears": { "type": "number", "nullable": true, "description": "Tempo até o vencimento em anos." }, "impliedVolatility": { "type": "number", "nullable": true, "description": "Volatilidade implícita anualizada em decimal." }, "delta": { "type": "number", "nullable": true, "description": "Delta da opção." }, "gamma": { "type": "number", "nullable": true, "description": "Gamma da opção." }, "theta": { "type": "number", "nullable": true, "description": "Theta anualizado da opção." }, "vega": { "type": "number", "nullable": true, "description": "Vega da opção." }, "rho": { "type": "number", "nullable": true, "description": "Rho da opção." }, "confidence": { "type": "string", "enum": [ "high", "medium", "low", "none" ], "description": "Confiança operacional do cálculo. `low` é esperado quando o cálculo usa `referencePrice`." }, "nullReason": { "type": "string", "nullable": true, "description": "Motivo para campos calculados nulos, quando aplicável (ex.: `no_trades`, `missing_underlying_price`, `iv_not_converged`)." } }, "required": [ "symbol", "underlyingAsset", "underlyingFuture", "optionType", "optionStyle", "segment", "strike", "expirationDate", "firstTradeDate", "lastTradeDate", "contractMultiplier", "allocationRoundLot", "exerciseType", "automaticExercise", "premiumUpfront", "isin", "cficCode", "date", "model", "priceSource", "underlyingPrice", "optionPrice", "riskFreeRate", "dividendYield", "timeToExpirationYears", "impliedVolatility", "delta", "gamma", "theta", "vega", "rho", "confidence", "nullReason" ] }, "FutureOptionAnalyticsResponse": { "type": "object", "properties": { "underlying": { "type": "string" }, "expirationDate": { "type": "string" }, "date": { "type": "string" }, "analytics": { "type": "array", "items": { "$ref": "#/components/schemas/FutureOptionAnalyticsQuote" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "date", "analytics", "requestedAt", "took" ], "example": { "underlying": "BGI", "expirationDate": "2026-06-30", "date": "2026-05-29", "analytics": [ { "symbol": "BGIM26C028000", "underlyingAsset": "BGI", "underlyingFuture": null, "optionType": "call", "optionStyle": "american", "segment": "agribusiness", "strike": 280, "expirationDate": "2026-06-30", "firstTradeDate": "2026-03-09", "lastTradeDate": "2026-06-30", "contractMultiplier": 330, "allocationRoundLot": 1, "exerciseType": null, "automaticExercise": null, "premiumUpfront": true, "isin": "BRBMEFCBMMP7", "cficCode": "OCAFPS", "date": "2026-05-29", "model": "cox-ross-rubinstein-futures", "priceSource": "referencePrice", "underlyingPrice": 345.65, "optionPrice": 65.66, "riskFreeRate": 0.145, "dividendYield": 0, "timeToExpirationYears": 0.087671235, "impliedVolatility": 0.33742568, "delta": 0.99461865, "gamma": 0.0014397058, "theta": -1.7623149, "vega": 1.3298614, "rho": -0.4161327, "confidence": "low", "nullReason": null } ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 41 } }, "FutureOptionAnalyticsPoint": { "type": "object", "properties": { "date": { "type": "string", "description": "Data do pregão, no formato YYYY-MM-DD." }, "model": { "type": "string", "enum": [ "black-76", "cox-ross-rubinstein-futures", "unsupported" ], "description": "Modelo usado na precificação. Opções europeias sobre futuros usam Black-76; opções americanas usam aproximação binomial." }, "priceSource": { "type": "string", "enum": [ "close", "referencePrice", "none" ], "description": "Preço usado para resolver IV. `referencePrice` é preço de referência oficial e vem com confiança menor que fechamento negociado." }, "underlyingPrice": { "type": "number", "nullable": true, "description": "Preço do contrato futuro subjacente usado no cálculo." }, "optionPrice": { "type": "number", "nullable": true, "description": "Preço da opção usado para resolver a volatilidade implícita." }, "riskFreeRate": { "type": "number", "nullable": true, "description": "Taxa livre de risco anual em decimal." }, "dividendYield": { "type": "number", "nullable": true, "description": "Sempre `0` para opções sobre futuros em v1." }, "timeToExpirationYears": { "type": "number", "nullable": true, "description": "Tempo até o vencimento em anos." }, "impliedVolatility": { "type": "number", "nullable": true, "description": "Volatilidade implícita anualizada em decimal." }, "delta": { "type": "number", "nullable": true, "description": "Delta da opção." }, "gamma": { "type": "number", "nullable": true, "description": "Gamma da opção." }, "theta": { "type": "number", "nullable": true, "description": "Theta anualizado da opção." }, "vega": { "type": "number", "nullable": true, "description": "Vega da opção." }, "rho": { "type": "number", "nullable": true, "description": "Rho da opção." }, "confidence": { "type": "string", "enum": [ "high", "medium", "low", "none" ], "description": "Confiança operacional do cálculo. `low` é esperado quando o cálculo usa `referencePrice`." }, "nullReason": { "type": "string", "nullable": true, "description": "Motivo para campos calculados nulos, quando aplicável (ex.: `no_trades`, `missing_underlying_price`, `iv_not_converged`)." } }, "required": [ "date", "model", "priceSource", "underlyingPrice", "optionPrice", "riskFreeRate", "dividendYield", "timeToExpirationYears", "impliedVolatility", "delta", "gamma", "theta", "vega", "rho", "confidence", "nullReason" ] }, "FutureOptionWithAnalyticsHistory": { "allOf": [ { "$ref": "#/components/schemas/FutureOptionSpecs" }, { "type": "object", "properties": { "analytics": { "type": "array", "items": { "$ref": "#/components/schemas/FutureOptionAnalyticsPoint" } } }, "required": [ "analytics" ] } ] }, "FutureOptionAnalyticsHistoryResponse": { "type": "object", "properties": { "option": { "$ref": "#/components/schemas/FutureOptionWithAnalyticsHistory" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "option", "requestedAt", "took" ], "example": { "option": { "symbol": "BGIM26C028000", "underlyingAsset": "BGI", "underlyingFuture": null, "optionType": "call", "optionStyle": "american", "segment": "agribusiness", "strike": 280, "expirationDate": "2026-06-30", "firstTradeDate": "2026-03-09", "lastTradeDate": "2026-06-30", "contractMultiplier": 330, "allocationRoundLot": 1, "exerciseType": null, "automaticExercise": null, "premiumUpfront": true, "isin": "BRBMEFCBMMP7", "cficCode": "OCAFPS", "analytics": [ { "date": "2026-05-29", "model": "cox-ross-rubinstein-futures", "priceSource": "referencePrice", "underlyingPrice": 345.65, "optionPrice": 65.66, "riskFreeRate": 0.145, "dividendYield": 0, "timeToExpirationYears": 0.087671235, "impliedVolatility": 0.33742568, "delta": 0.99461865, "gamma": 0.0014397058, "theta": -1.7623149, "vega": 1.3298614, "rho": -0.4161327, "confidence": "low", "nullReason": null } ] }, "requestedAt": "2026-06-02T12:00:00.000Z", "took": 35 } }, "FutureSpecs": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código do contrato (ex.: `WINM26`, `BGIF27`, `DI1F27`)." }, "underlyingAsset": { "type": "string", "description": "Código do ativo (ex.: `WIN`, `BGI`, `DI1`)." }, "assetDescription": { "type": "string", "nullable": true, "description": "Nome do ativo em português." }, "segment": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "`financial` = índices, juros e moeda. `agribusiness` = commodities." }, "quotationType": { "type": "string", "enum": [ "price", "rate" ], "description": "`rate` para juros (DI/DAP) — OHLC vem em %a.a. `price` para os demais." }, "expirationDate": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD)." }, "firstTradeDate": { "type": "string", "nullable": true, "description": "Data do primeiro pregão." }, "lastTradeDate": { "type": "string", "nullable": true, "description": "Data do último pregão." }, "contractMultiplier": { "type": "number", "nullable": true, "description": "Quanto vale cada ponto. Ex.: WIN = 0,2; BGI = 330; DI1 = 1." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote." }, "tradingCurrency": { "type": "string", "nullable": true, "description": "Moeda (quase sempre `BRL`)." }, "deliveryType": { "type": "string", "nullable": true, "description": "Tipo de entrega: `Financial` ou `Physical`." }, "exerciseType": { "type": "string", "nullable": true, "description": "Tipo de cotação: `Price` ou `Rate`." }, "isin": { "type": "string", "nullable": true, "description": "Código ISIN." }, "cficCode": { "type": "string", "nullable": true, "description": "Código CFI." } }, "required": [ "symbol", "underlyingAsset", "assetDescription", "segment", "quotationType", "expirationDate", "firstTradeDate", "lastTradeDate", "contractMultiplier", "allocationRoundLot", "tradingCurrency", "deliveryType", "exerciseType", "isin", "cficCode" ] }, "FutureListResponse": { "type": "object", "properties": { "futures": { "type": "array", "items": { "$ref": "#/components/schemas/FutureSpecs" } }, "pagination": { "type": "object", "properties": { "page": { "type": "integer" }, "limit": { "type": "integer" }, "total": { "type": "integer" }, "totalPages": { "type": "integer" } }, "required": [ "page", "limit", "total", "totalPages" ] }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "futures", "pagination", "requestedAt", "took" ], "example": { "futures": [ { "symbol": "WINM26", "underlyingAsset": "WIN", "assetDescription": "Minicontrato de Ibovespa", "segment": "financial", "quotationType": "price", "expirationDate": "2026-06-17", "firstTradeDate": "2024-04-29", "lastTradeDate": "2026-06-17", "contractMultiplier": 0.2, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFWIN3O3", "cficCode": "FFICSX" }, { "symbol": "DI1F27", "underlyingAsset": "DI1", "assetDescription": "Taxa Média de Depósitos Interfinanceiros de Um Dia", "segment": "financial", "quotationType": "rate", "expirationDate": "2027-01-04", "firstTradeDate": "2015-12-28", "lastTradeDate": "2026-12-30", "contractMultiplier": 1, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Rate", "isin": "BRBMEFD1I4Z0", "cficCode": "FFNCSX" }, { "symbol": "BGIF27", "underlyingAsset": "BGI", "assetDescription": "Boi Gordo", "segment": "agribusiness", "quotationType": "price", "expirationDate": "2027-01-29", "firstTradeDate": "2026-02-27", "lastTradeDate": "2027-01-29", "contractMultiplier": 330, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFBGI7Y7", "cficCode": "FCACSX" } ], "pagination": { "page": 1, "limit": 50, "total": 1728, "totalPages": 35 }, "requestedAt": "2026-05-21T03:00:00.000Z", "took": 42 } }, "FutureQuote": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código do contrato (ex.: `WINM26`, `BGIF27`, `DI1F27`)." }, "underlyingAsset": { "type": "string", "description": "Código do ativo (ex.: `WIN`, `BGI`, `DI1`)." }, "assetDescription": { "type": "string", "nullable": true, "description": "Nome do ativo em português." }, "segment": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "`financial` = índices, juros e moeda. `agribusiness` = commodities." }, "quotationType": { "type": "string", "enum": [ "price", "rate" ], "description": "`rate` para juros (DI/DAP) — OHLC vem em %a.a. `price` para os demais." }, "expirationDate": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD)." }, "firstTradeDate": { "type": "string", "nullable": true, "description": "Data do primeiro pregão." }, "lastTradeDate": { "type": "string", "nullable": true, "description": "Data do último pregão." }, "contractMultiplier": { "type": "number", "nullable": true, "description": "Quanto vale cada ponto. Ex.: WIN = 0,2; BGI = 330; DI1 = 1." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote." }, "tradingCurrency": { "type": "string", "nullable": true, "description": "Moeda (quase sempre `BRL`)." }, "deliveryType": { "type": "string", "nullable": true, "description": "Tipo de entrega: `Financial` ou `Physical`." }, "exerciseType": { "type": "string", "nullable": true, "description": "Tipo de cotação: `Price` ou `Rate`." }, "isin": { "type": "string", "nullable": true, "description": "Código ISIN." }, "cficCode": { "type": "string", "nullable": true, "description": "Código CFI." }, "date": { "type": "integer", "description": "Data do pregão (Unix em segundos)." }, "open": { "type": "number", "nullable": true, "description": "Preço de abertura. Vem `null` — o arquivo do fim do dia não publica abertura." }, "high": { "type": "number", "nullable": true, "description": "Máxima do dia (taxa em %a.a. para DI; preço para os demais)." }, "low": { "type": "number", "nullable": true, "description": "Mínima do dia (taxa em %a.a. para DI; preço para os demais)." }, "average": { "type": "number", "nullable": true, "description": "Preço médio do dia." }, "close": { "type": "number", "nullable": true, "description": "Preço de fechamento (último negócio). Em DI e DAP, vem em %a.a." }, "settlement": { "type": "number", "nullable": true, "description": "Preço de ajuste oficial do dia. Em juros, vem em reais; nos demais, em preço." }, "settlementRate": { "type": "number", "nullable": true, "description": "Taxa de ajuste. Só vem em contratos de juros (DI, DAP)." }, "referencePrice": { "type": "number", "nullable": true, "description": "Preço de referência oficial." }, "oscillationPct": { "type": "number", "nullable": true, "description": "Variação % em relação ao dia anterior." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios." }, "volume": { "type": "number", "nullable": true, "description": "Quantidade de contratos negociados." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume em reais (BRL)." } }, "required": [ "symbol", "underlyingAsset", "assetDescription", "segment", "quotationType", "expirationDate", "firstTradeDate", "lastTradeDate", "contractMultiplier", "allocationRoundLot", "tradingCurrency", "deliveryType", "exerciseType", "isin", "cficCode", "date", "open", "high", "low", "average", "close", "settlement", "settlementRate", "referencePrice", "oscillationPct", "trades", "volume", "financialVolume" ] }, "FutureQuoteResponse": { "type": "object", "properties": { "quotes": { "type": "array", "items": { "$ref": "#/components/schemas/FutureQuote" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "quotes", "requestedAt", "took" ], "example": { "quotes": [ { "symbol": "WINM26", "underlyingAsset": "WIN", "assetDescription": "Minicontrato de Ibovespa", "segment": "financial", "quotationType": "price", "expirationDate": "2026-06-17", "firstTradeDate": "2024-04-29", "lastTradeDate": "2026-06-17", "contractMultiplier": 0.2, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFWIN3O3", "cficCode": "FFICSX", "date": 1779235200, "open": null, "high": 179945, "low": 176180, "average": 178583, "close": 178650, "settlement": 179115, "settlementRate": null, "referencePrice": null, "oscillationPct": 1.59, "trades": 4906603, "volume": 17533842, "financialVolume": 626250384171 }, { "symbol": "DI1F27", "underlyingAsset": "DI1", "assetDescription": "Taxa Média de Depósitos Interfinanceiros de Um Dia", "segment": "financial", "quotationType": "rate", "expirationDate": "2027-01-04", "firstTradeDate": "2015-12-28", "lastTradeDate": "2026-12-30", "contractMultiplier": 1, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Rate", "isin": "BRBMEFD1I4Z0", "cficCode": "FFNCSX", "date": 1779235200, "open": null, "high": 14.16, "low": 14.03, "average": 14.09, "close": 14.075, "settlement": 92179.44, "settlementRate": 14.059, "referencePrice": null, "oscillationPct": -0.51, "trades": 28694, "volume": 850519, "financialVolume": 78386932604.68 } ], "requestedAt": "2026-05-21T03:00:00.000Z", "took": 28 } }, "FutureSpecsResponse": { "type": "object", "properties": { "specs": { "type": "array", "items": { "$ref": "#/components/schemas/FutureSpecs" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "specs", "requestedAt", "took" ], "example": { "specs": [ { "symbol": "WINM26", "underlyingAsset": "WIN", "assetDescription": "Minicontrato de Ibovespa", "segment": "financial", "quotationType": "price", "expirationDate": "2026-06-17", "firstTradeDate": "2024-04-29", "lastTradeDate": "2026-06-17", "contractMultiplier": 0.2, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFWIN3O3", "cficCode": "FFICSX" }, { "symbol": "BGIF27", "underlyingAsset": "BGI", "assetDescription": "Boi Gordo", "segment": "agribusiness", "quotationType": "price", "expirationDate": "2027-01-29", "firstTradeDate": "2026-02-27", "lastTradeDate": "2027-01-29", "contractMultiplier": 330, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFBGI7Y7", "cficCode": "FCACSX" } ], "requestedAt": "2026-05-21T03:00:00.000Z", "took": 12 } }, "FuturePricePoint": { "type": "object", "properties": { "date": { "type": "integer", "description": "Data do pregão (Unix em segundos)." }, "open": { "type": "number", "nullable": true, "description": "Preço de abertura. Vem `null` — o arquivo do fim do dia não publica abertura." }, "high": { "type": "number", "nullable": true, "description": "Máxima do dia (taxa em %a.a. para DI; preço para os demais)." }, "low": { "type": "number", "nullable": true, "description": "Mínima do dia (taxa em %a.a. para DI; preço para os demais)." }, "average": { "type": "number", "nullable": true, "description": "Preço médio do dia." }, "close": { "type": "number", "nullable": true, "description": "Preço de fechamento (último negócio). Em DI e DAP, vem em %a.a." }, "settlement": { "type": "number", "nullable": true, "description": "Preço de ajuste oficial do dia. Em juros, vem em reais; nos demais, em preço." }, "settlementRate": { "type": "number", "nullable": true, "description": "Taxa de ajuste. Só vem em contratos de juros (DI, DAP)." }, "referencePrice": { "type": "number", "nullable": true, "description": "Preço de referência oficial." }, "oscillationPct": { "type": "number", "nullable": true, "description": "Variação % em relação ao dia anterior." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios." }, "volume": { "type": "number", "nullable": true, "description": "Quantidade de contratos negociados." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume em reais (BRL)." } }, "required": [ "date", "open", "high", "low", "average", "close", "settlement", "settlementRate", "referencePrice", "oscillationPct", "trades", "volume", "financialVolume" ] }, "FutureWithHistory": { "allOf": [ { "$ref": "#/components/schemas/FutureSpecs" }, { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FuturePricePoint" }, "description": "Série diária do contrato no período pedido. Cada item tem OHLC, ajuste, taxa e volume." } }, "required": [ "history" ] } ] }, "FutureHistoricalResponse": { "type": "object", "properties": { "future": { "$ref": "#/components/schemas/FutureWithHistory" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "future", "requestedAt", "took" ], "example": { "future": { "symbol": "WINM26", "underlyingAsset": "WIN", "assetDescription": "Minicontrato de Ibovespa", "segment": "financial", "quotationType": "price", "expirationDate": "2026-06-17", "firstTradeDate": "2024-04-29", "lastTradeDate": "2026-06-17", "contractMultiplier": 0.2, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Price", "isin": "BRBMEFWIN3O3", "cficCode": "FFICSX", "history": [ { "date": 1779235200, "open": null, "high": 179945, "low": 176180, "average": 178583, "close": 178650, "settlement": 179115, "settlementRate": null, "referencePrice": null, "oscillationPct": 1.59, "trades": 4906603, "volume": 17533842, "financialVolume": 626250384171 }, { "date": 1779148800, "open": null, "high": 178700, "low": 175200, "average": 176509, "close": 176465, "settlement": 175844, "settlementRate": null, "referencePrice": null, "oscillationPct": -1.46, "trades": 5563064, "volume": 20252108, "financialVolume": 714936160000 } ] }, "requestedAt": "2026-05-21T03:00:00.000Z", "took": 65 } }, "FutureTermStructureResponse": { "type": "object", "properties": { "asset": { "type": "string" }, "contracts": { "type": "array", "items": { "$ref": "#/components/schemas/FutureQuote" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "asset", "contracts", "requestedAt", "took" ], "example": { "asset": "DI1", "contracts": [ { "symbol": "DI1M26", "underlyingAsset": "DI1", "assetDescription": "Taxa Média de Depósitos Interfinanceiros de Um Dia", "segment": "financial", "quotationType": "rate", "expirationDate": "2026-06-01", "firstTradeDate": "2015-12-28", "lastTradeDate": "2026-05-29", "contractMultiplier": 1, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Rate", "isin": "BRBMEFD1I4M0", "cficCode": "FFNCSX", "date": 1779235200, "open": null, "high": 14.41, "low": 14.39, "average": 14.4, "close": 14.398, "settlement": 98884.51, "settlementRate": 14.4, "referencePrice": null, "oscillationPct": -0.02, "trades": 12345, "volume": 234567, "financialVolume": 23194840000 }, { "symbol": "DI1F27", "underlyingAsset": "DI1", "assetDescription": "Taxa Média de Depósitos Interfinanceiros de Um Dia", "segment": "financial", "quotationType": "rate", "expirationDate": "2027-01-04", "firstTradeDate": "2015-12-28", "lastTradeDate": "2026-12-30", "contractMultiplier": 1, "allocationRoundLot": 1, "tradingCurrency": "BRL", "deliveryType": "Financial", "exerciseType": "Rate", "isin": "BRBMEFD1I4Z0", "cficCode": "FFNCSX", "date": 1779235200, "open": null, "high": 14.16, "low": 14.03, "average": 14.09, "close": 14.075, "settlement": 92179.44, "settlementRate": 14.059, "referencePrice": null, "oscillationPct": -0.51, "trades": 28694, "volume": 850519, "financialVolume": 78386932604.68 } ], "requestedAt": "2026-05-21T03:00:00.000Z", "took": 137 } }, "InflationEntrySimple": { "type": "object", "properties": { "date": { "type": "string" }, "value": { "type": "string", "description": "Variação percentual do IPCA no mês", "example": "4.26" }, "epochDate": { "type": "number" } }, "required": [ "date", "value", "epochDate" ] }, "InflationResponseSimple": { "type": "object", "properties": { "inflation": { "type": "array", "items": { "$ref": "#/components/schemas/InflationEntrySimple" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "inflation", "requestedAt", "took" ], "example": { "inflation": [ { "date": "01/12/2025", "value": "4.26", "epochDate": 1764558000000 }, { "date": "01/11/2025", "value": "4.46", "epochDate": 1761966000000 }, { "date": "01/10/2025", "value": "4.68", "epochDate": 1759287600000 } ], "requestedAt": "2026-02-08T16:26:26.123Z", "took": 138 } }, "InflationAvailableResponse": { "type": "object", "properties": { "countries": { "type": "array", "items": { "type": "string" } }, "message": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" } }, "required": [ "countries", "message", "requestedAt" ], "example": { "countries": [ "brazil" ], "message": "Available inflation data countries", "requestedAt": "2026-02-08T16:26:27.274Z" } }, "MacroSeriesPublic": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "unit": { "type": "string" }, "frequency": { "type": "string" }, "category": { "type": "string" }, "startDate": { "type": "string" } }, "required": [ "slug", "name", "description", "unit", "frequency", "category", "startDate" ], "example": { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" } }, "MacroAvailableResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesPublic" }, "description": "Lista de séries macroeconômicas. Quando `q` é informado, vem ordenada por relevância (slug > alias > nome > descrição)." }, "categories": { "type": "array", "items": { "type": "string" }, "description": "Todas as categorias do catálogo. Não é afetado pelos filtros — sempre lista o universo completo de categorias para que o cliente possa montar facetas." }, "count": { "type": "integer", "description": "Quantidade de séries em `results` após aplicar os filtros." }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "categories", "count", "requestedAt", "took" ], "example": { "results": [ { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" }, { "slug": "ipca12m", "name": "IPCA acumulado 12 meses", "description": "Variação acumulada em 12 meses do Índice Nacional de Preços ao Consumidor Amplo (IBGE). Indicador oficial de inflação do Brasil.", "unit": "percent", "frequency": "monthly", "category": "inflation", "startDate": "1981-01-01" }, { "slug": "cdi", "name": "CDI", "description": "Certificado de Depósito Interbancário — taxa de juros das operações entre bancos. Principal benchmark de renda fixa no Brasil.", "unit": "percentPerDay", "frequency": "daily", "category": "interestRate", "startDate": "1986-03-06" } ], "categories": [ "interestRate", "inflation", "monetary", "activity", "labor", "external" ], "count": 15, "requestedAt": "2026-04-30T12:00:00.000Z", "took": 4 } }, "MacroSeriesObservation": { "type": "object", "properties": { "date": { "type": "string", "example": "2026-04-30" }, "value": { "type": "number", "example": 14.75 } }, "required": [ "date", "value" ] }, "MacroSeriesResult": { "type": "object", "properties": { "series": { "$ref": "#/components/schemas/MacroSeriesPublic" }, "observations": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesObservation" } } }, "required": [ "series", "observations" ], "example": { "series": { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" }, "observations": [ { "date": "2026-04-30", "value": 14.5 }, { "date": "2026-04-29", "value": 14.75 }, { "date": "2026-04-28", "value": 14.75 } ] } }, "MacroSeriesAliasWarning": { "type": "object", "properties": { "provided": { "type": "string" }, "canonicalSlug": { "type": "string" }, "message": { "type": "string" } }, "required": [ "provided", "canonicalSlug", "message" ] }, "MacroSeriesError": { "type": "object", "properties": { "slug": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "slug", "code", "message" ] }, "MacroSeriesDataResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesResult" } }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesAliasWarning" } }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesError" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "series": { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" }, "observations": [ { "date": "2026-04-30", "value": 14.5 }, { "date": "2026-04-29", "value": 14.75 }, { "date": "2026-04-28", "value": 14.75 }, { "date": "2026-04-25", "value": 14.75 } ] }, { "series": { "slug": "ipca12m", "name": "IPCA acumulado 12 meses", "description": "Variação acumulada em 12 meses do Índice Nacional de Preços ao Consumidor Amplo (IBGE). Indicador oficial de inflação do Brasil.", "unit": "percent", "frequency": "monthly", "category": "inflation", "startDate": "1981-01-01" }, "observations": [ { "date": "2026-03-01", "value": 4.14 }, { "date": "2026-02-01", "value": 3.81 }, { "date": "2026-01-01", "value": 4.44 } ] } ], "requestedAt": "2026-04-30T12:00:00.000Z", "took": 23 } }, "MacroSeriesLatest": { "type": "object", "properties": { "series": { "$ref": "#/components/schemas/MacroSeriesPublic" }, "latest": { "allOf": [ { "$ref": "#/components/schemas/MacroSeriesObservation" }, { "nullable": true } ] } }, "required": [ "series", "latest" ], "example": { "series": { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" }, "latest": { "date": "2026-04-30", "value": 14.5 } } }, "MacroSeriesLatestResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesLatest" } }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesAliasWarning" } }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/MacroSeriesError" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "series": { "slug": "selic", "name": "Taxa Selic", "description": "Taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central. É a referência para todas as demais taxas de juros do país.", "unit": "percentPerYear", "frequency": "daily", "category": "interestRate", "startDate": "1999-03-05" }, "latest": { "date": "2026-04-30", "value": 14.5 } }, { "series": { "slug": "ipca12m", "name": "IPCA acumulado 12 meses", "description": "Variação acumulada em 12 meses do Índice Nacional de Preços ao Consumidor Amplo (IBGE). Indicador oficial de inflação do Brasil.", "unit": "percent", "frequency": "monthly", "category": "inflation", "startDate": "1981-01-01" }, "latest": { "date": "2026-03-01", "value": 4.14 } }, { "series": { "slug": "cdi", "name": "CDI", "description": "Certificado de Depósito Interbancário — taxa de juros das operações entre bancos. Principal benchmark de renda fixa no Brasil.", "unit": "percentPerDay", "frequency": "daily", "category": "interestRate", "startDate": "1986-03-06" }, "latest": { "date": "2026-04-30", "value": 0.054267 } } ], "requestedAt": "2026-04-30T12:00:00.000Z", "took": 18 } }, "OptionExpirationsResponse": { "type": "object", "properties": { "underlying": { "type": "string", "description": "Ativo subjacente consultado, normalizado em maiúsculas." }, "tradedOnly": { "type": "boolean", "enum": [ true ], "description": "Sempre `true`: a lista é montada a partir das séries negociadas." }, "expirations": { "type": "array", "items": { "type": "string" }, "description": "Datas de vencimento disponíveis, em ordem ascendente, no formato YYYY-MM-DD." }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "tradedOnly", "expirations", "requestedAt", "took" ], "example": { "underlying": "PETR4", "tradedOnly": true, "expirations": [ "2026-12-04", "2026-12-11", "2026-12-18" ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 4 } }, "OptionStrikesResponse": { "type": "object", "properties": { "underlying": { "type": "string", "description": "Ativo subjacente consultado, normalizado em maiúsculas." }, "expirationDate": { "type": "string", "description": "Vencimento consultado, no formato YYYY-MM-DD." }, "side": { "type": "string", "nullable": true, "enum": [ "call", "put" ], "description": "Lado filtrado: `call`, `put` ou `null` quando não foi aplicado filtro." }, "tradedOnly": { "type": "boolean", "enum": [ true ], "description": "Sempre `true`: os strikes vêm apenas de séries negociadas." }, "strikes": { "type": "array", "items": { "type": "number" }, "description": "Preços de exercício disponíveis, em ordem ascendente." }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "side", "tradedOnly", "strikes", "requestedAt", "took" ], "example": { "underlying": "PETR4", "expirationDate": "2026-12-18", "side": "call", "tradedOnly": true, "strikes": [ 1.19, 7.29, 9.29, 10.69, 13.44 ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 4 } }, "OptionSeriesSnapshot": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código de negociação da série (ex: PETRF783)." }, "underlyingSymbol": { "type": "string", "nullable": true, "description": "Ativo subjacente da opção (ex: PETR4)." }, "side": { "type": "string", "enum": [ "call", "put" ], "description": "Tipo da opção: `call` (opção de compra) ou `put` (opção de venda)." }, "market": { "type": "string", "enum": [ "equity", "index" ], "description": "Mercado da opção: `equity` (ação/ETF) ou `index` (índice)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "Estilo de exercício da opção: `american` permite exercício a qualquer momento até o vencimento; `european` permite exercício apenas no vencimento. `null` em séries antigas que ainda não passaram pelo enriquecimento de cadastro." }, "strike": { "type": "number", "nullable": true, "description": "Preço de exercício (strike) da opção." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote pré-definido para alocação. Geralmente 100 para opções sobre ações brasileiras." }, "expirationDate": { "type": "string", "description": "Data de vencimento da série, no formato YYYY-MM-DD." }, "firstTradeDate": { "type": "string", "description": "Data do primeiro pregão observado para a série (YYYY-MM-DD)." }, "lastTradeDate": { "type": "string", "description": "Data do último pregão observado para a série (YYYY-MM-DD)." }, "date": { "type": "integer", "description": "Data do pregão em timestamp Unix (segundos)." }, "open": { "type": "number", "nullable": true, "description": "Preço de abertura do pregão." }, "high": { "type": "number", "nullable": true, "description": "Máxima do pregão." }, "low": { "type": "number", "nullable": true, "description": "Mínima do pregão." }, "average": { "type": "number", "nullable": true, "description": "Preço médio do pregão." }, "close": { "type": "number", "nullable": true, "description": "Preço de fechamento do pregão." }, "bid": { "type": "number", "nullable": true, "description": "Melhor oferta de compra registrada no fechamento." }, "ask": { "type": "number", "nullable": true, "description": "Melhor oferta de venda registrada no fechamento." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios realizados no pregão." }, "volume": { "type": "number", "nullable": true, "description": "Volume negociado no pregão (em contratos)." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume financeiro negociado no pregão (em BRL)." } }, "required": [ "symbol", "underlyingSymbol", "side", "market", "optionStyle", "strike", "allocationRoundLot", "expirationDate", "firstTradeDate", "lastTradeDate", "date", "open", "high", "low", "average", "close", "bid", "ask", "trades", "volume", "financialVolume" ] }, "OptionSeriesResponse": { "type": "object", "properties": { "underlying": { "type": "string", "description": "Ativo subjacente consultado, normalizado em maiúsculas." }, "expirationDate": { "type": "string", "description": "Vencimento consultado, no formato YYYY-MM-DD." }, "date": { "type": "string", "description": "Data EOD efetivamente usada para buscar preço e volume, no formato YYYY-MM-DD." }, "tradedOnly": { "type": "boolean", "enum": [ true ], "description": "Sempre `true`: só aparecem séries que tiveram negócio no pregão selecionado." }, "series": { "type": "array", "items": { "$ref": "#/components/schemas/OptionSeriesSnapshot" }, "description": "Séries negociadas no vencimento, com metadados do contrato e OHLCV do pregão em `date`." }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "date", "tradedOnly", "series", "requestedAt", "took" ], "example": { "underlying": "PETR4", "expirationDate": "2026-12-18", "date": "2026-06-01", "tradedOnly": true, "series": [ { "symbol": "PETRF783", "underlyingSymbol": "PETR4", "side": "call", "market": "equity", "optionStyle": "european", "strike": 7.29, "allocationRoundLot": 100, "expirationDate": "2026-12-18", "firstTradeDate": "2026-04-24", "lastTradeDate": "2026-06-01", "date": 1780282800, "open": 35.15, "high": 35.15, "low": 35.15, "average": 35.15, "close": 35.15, "bid": 0, "ask": 0, "trades": 1, "volume": 500, "financialVolume": 17575 } ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 7 } }, "OptionPricePoint": { "type": "object", "properties": { "date": { "type": "integer", "description": "Data do pregão em timestamp Unix (segundos)." }, "open": { "type": "number", "nullable": true, "description": "Preço de abertura do pregão." }, "high": { "type": "number", "nullable": true, "description": "Máxima do pregão." }, "low": { "type": "number", "nullable": true, "description": "Mínima do pregão." }, "average": { "type": "number", "nullable": true, "description": "Preço médio do pregão." }, "close": { "type": "number", "nullable": true, "description": "Preço de fechamento do pregão." }, "bid": { "type": "number", "nullable": true, "description": "Melhor oferta de compra registrada no fechamento." }, "ask": { "type": "number", "nullable": true, "description": "Melhor oferta de venda registrada no fechamento." }, "trades": { "type": "number", "nullable": true, "description": "Número de negócios realizados no pregão." }, "volume": { "type": "number", "nullable": true, "description": "Volume negociado no pregão (em contratos)." }, "financialVolume": { "type": "number", "nullable": true, "description": "Volume financeiro negociado no pregão (em BRL)." } }, "required": [ "date", "open", "high", "low", "average", "close", "bid", "ask", "trades", "volume", "financialVolume" ] }, "OptionSeries": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código de negociação da série (ex: PETRF783)." }, "underlyingSymbol": { "type": "string", "nullable": true, "description": "Ativo subjacente da opção (ex: PETR4)." }, "side": { "type": "string", "enum": [ "call", "put" ], "description": "Tipo da opção: `call` (opção de compra) ou `put` (opção de venda)." }, "market": { "type": "string", "enum": [ "equity", "index" ], "description": "Mercado da opção: `equity` (ação/ETF) ou `index` (índice)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "Estilo de exercício da opção: `american` permite exercício a qualquer momento até o vencimento; `european` permite exercício apenas no vencimento. `null` em séries antigas que ainda não passaram pelo enriquecimento de cadastro." }, "strike": { "type": "number", "nullable": true, "description": "Preço de exercício (strike) da opção." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote pré-definido para alocação. Geralmente 100 para opções sobre ações brasileiras." }, "expirationDate": { "type": "string", "description": "Data de vencimento da série, no formato YYYY-MM-DD." }, "firstTradeDate": { "type": "string", "description": "Data do primeiro pregão observado para a série (YYYY-MM-DD)." }, "lastTradeDate": { "type": "string", "description": "Data do último pregão observado para a série (YYYY-MM-DD)." } }, "required": [ "symbol", "underlyingSymbol", "side", "market", "optionStyle", "strike", "allocationRoundLot", "expirationDate", "firstTradeDate", "lastTradeDate" ] }, "OptionSeriesWithHistory": { "allOf": [ { "$ref": "#/components/schemas/OptionSeries" }, { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/OptionPricePoint" }, "description": "Pontos EOD diários da série no intervalo consultado. Cada item traz OHLCV, bid/ask, número de negócios e volume financeiro." } }, "required": [ "history" ] } ], "description": "Metadados da série consultada acompanhados de `history`, com um ponto OHLCV por pregão no intervalo pedido." }, "OptionHistoricalResponse": { "type": "object", "properties": { "option": { "$ref": "#/components/schemas/OptionSeriesWithHistory" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "option", "requestedAt", "took" ], "example": { "option": { "symbol": "PETRF783", "underlyingSymbol": "PETR4", "side": "call", "market": "equity", "optionStyle": "european", "strike": 7.29, "allocationRoundLot": 100, "expirationDate": "2026-12-18", "firstTradeDate": "2026-04-24", "lastTradeDate": "2026-06-01", "history": [ { "date": 1780282800, "open": 35.15, "high": 35.15, "low": 35.15, "average": 35.15, "close": 35.15, "bid": 0, "ask": 0, "trades": 1, "volume": 500, "financialVolume": 17575 } ] }, "requestedAt": "2026-06-02T12:00:00.000Z", "took": 8 } }, "OptionAnalyticsSnapshot": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Código de negociação da série (ex: PETRF783)." }, "underlyingSymbol": { "type": "string", "nullable": true, "description": "Ativo subjacente da opção (ex: PETR4)." }, "side": { "type": "string", "enum": [ "call", "put" ], "description": "Tipo da opção: `call` (opção de compra) ou `put` (opção de venda)." }, "market": { "type": "string", "enum": [ "equity", "index" ], "description": "Mercado da opção: `equity` (ação/ETF) ou `index` (índice)." }, "optionStyle": { "type": "string", "nullable": true, "enum": [ "american", "european" ], "description": "Estilo de exercício da opção: `american` permite exercício a qualquer momento até o vencimento; `european` permite exercício apenas no vencimento. `null` em séries antigas que ainda não passaram pelo enriquecimento de cadastro." }, "strike": { "type": "number", "nullable": true, "description": "Preço de exercício (strike) da opção." }, "allocationRoundLot": { "type": "integer", "nullable": true, "description": "Tamanho do lote pré-definido para alocação. Geralmente 100 para opções sobre ações brasileiras." }, "expirationDate": { "type": "string", "description": "Data de vencimento da série, no formato YYYY-MM-DD." }, "firstTradeDate": { "type": "string", "description": "Data do primeiro pregão observado para a série (YYYY-MM-DD)." }, "lastTradeDate": { "type": "string", "description": "Data do último pregão observado para a série (YYYY-MM-DD)." }, "date": { "type": "string", "description": "Data do pregão, no formato YYYY-MM-DD." }, "model": { "type": "string", "enum": [ "black-scholes-merton", "barone-adesi-whaley", "cox-ross-rubinstein", "unsupported" ], "description": "Modelo usado na precificação. Séries americanas usam aproximação binomial; séries europeias usam Black-Scholes-Merton." }, "priceSource": { "type": "string", "enum": [ "close", "referencePrice", "none" ], "description": "Preço usado como entrada para resolver IV. Em opções de ações/índices, v1 usa apenas fechamento negociado (`close`)." }, "underlyingPrice": { "type": "number", "nullable": true, "description": "Preço do ativo subjacente usado no cálculo." }, "optionPrice": { "type": "number", "nullable": true, "description": "Preço da opção usado para resolver a volatilidade implícita." }, "riskFreeRate": { "type": "number", "nullable": true, "description": "Taxa livre de risco anual em decimal (ex.: 0.105 para 10,5%)." }, "dividendYield": { "type": "number", "nullable": true, "description": "Yield contínuo derivado de dividendos anunciados conhecidos até a data de cálculo. `0` quando não há dividendo anunciado aplicável." }, "timeToExpirationYears": { "type": "number", "nullable": true, "description": "Tempo até o vencimento em anos." }, "impliedVolatility": { "type": "number", "nullable": true, "description": "Volatilidade implícita anualizada em decimal." }, "delta": { "type": "number", "nullable": true, "description": "Delta da opção." }, "gamma": { "type": "number", "nullable": true, "description": "Gamma da opção." }, "theta": { "type": "number", "nullable": true, "description": "Theta anualizado da opção." }, "vega": { "type": "number", "nullable": true, "description": "Vega da opção." }, "rho": { "type": "number", "nullable": true, "description": "Rho da opção." }, "confidence": { "type": "string", "enum": [ "high", "medium", "low", "none" ], "description": "Confiança operacional do cálculo. `none` indica que as gregas/IV ficaram nulas e `nullReason` explica o motivo." }, "nullReason": { "type": "string", "nullable": true, "description": "Motivo para campos calculados nulos, quando aplicável (ex.: `no_trades`, `missing_underlying_price`, `iv_not_converged`)." } }, "required": [ "symbol", "underlyingSymbol", "side", "market", "optionStyle", "strike", "allocationRoundLot", "expirationDate", "firstTradeDate", "lastTradeDate", "date", "model", "priceSource", "underlyingPrice", "optionPrice", "riskFreeRate", "dividendYield", "timeToExpirationYears", "impliedVolatility", "delta", "gamma", "theta", "vega", "rho", "confidence", "nullReason" ] }, "OptionAnalyticsResponse": { "type": "object", "properties": { "underlying": { "type": "string" }, "expirationDate": { "type": "string" }, "date": { "type": "string" }, "analytics": { "type": "array", "items": { "$ref": "#/components/schemas/OptionAnalyticsSnapshot" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "underlying", "expirationDate", "date", "analytics", "requestedAt", "took" ], "example": { "underlying": "PETR4", "expirationDate": "2026-12-18", "date": "2026-05-29", "analytics": [ { "symbol": "PETRF783", "underlyingSymbol": "PETR4", "side": "call", "market": "equity", "optionStyle": "european", "strike": 7.29, "allocationRoundLot": 100, "expirationDate": "2026-12-18", "firstTradeDate": "2026-04-24", "lastTradeDate": "2026-06-01", "date": "2026-05-29", "model": "black-scholes-merton", "priceSource": "close", "underlyingPrice": 42, "optionPrice": 34.8, "riskFreeRate": 0.145, "dividendYield": 0, "timeToExpirationYears": 0.057534248, "impliedVolatility": 3.0155768, "delta": 0.99739844, "gamma": 0.0002648198, "theta": -3.1521828, "vega": 0.08104867, "rho": 0.4079601, "confidence": "medium", "nullReason": null } ], "requestedAt": "2026-06-02T12:00:00.000Z", "took": 9 } }, "OptionAnalyticsPoint": { "type": "object", "properties": { "date": { "type": "string", "description": "Data do pregão, no formato YYYY-MM-DD." }, "model": { "type": "string", "enum": [ "black-scholes-merton", "barone-adesi-whaley", "cox-ross-rubinstein", "unsupported" ], "description": "Modelo usado na precificação. Séries americanas usam aproximação binomial; séries europeias usam Black-Scholes-Merton." }, "priceSource": { "type": "string", "enum": [ "close", "referencePrice", "none" ], "description": "Preço usado como entrada para resolver IV. Em opções de ações/índices, v1 usa apenas fechamento negociado (`close`)." }, "underlyingPrice": { "type": "number", "nullable": true, "description": "Preço do ativo subjacente usado no cálculo." }, "optionPrice": { "type": "number", "nullable": true, "description": "Preço da opção usado para resolver a volatilidade implícita." }, "riskFreeRate": { "type": "number", "nullable": true, "description": "Taxa livre de risco anual em decimal (ex.: 0.105 para 10,5%)." }, "dividendYield": { "type": "number", "nullable": true, "description": "Yield contínuo derivado de dividendos anunciados conhecidos até a data de cálculo. `0` quando não há dividendo anunciado aplicável." }, "timeToExpirationYears": { "type": "number", "nullable": true, "description": "Tempo até o vencimento em anos." }, "impliedVolatility": { "type": "number", "nullable": true, "description": "Volatilidade implícita anualizada em decimal." }, "delta": { "type": "number", "nullable": true, "description": "Delta da opção." }, "gamma": { "type": "number", "nullable": true, "description": "Gamma da opção." }, "theta": { "type": "number", "nullable": true, "description": "Theta anualizado da opção." }, "vega": { "type": "number", "nullable": true, "description": "Vega da opção." }, "rho": { "type": "number", "nullable": true, "description": "Rho da opção." }, "confidence": { "type": "string", "enum": [ "high", "medium", "low", "none" ], "description": "Confiança operacional do cálculo. `none` indica que as gregas/IV ficaram nulas e `nullReason` explica o motivo." }, "nullReason": { "type": "string", "nullable": true, "description": "Motivo para campos calculados nulos, quando aplicável (ex.: `no_trades`, `missing_underlying_price`, `iv_not_converged`)." } }, "required": [ "date", "model", "priceSource", "underlyingPrice", "optionPrice", "riskFreeRate", "dividendYield", "timeToExpirationYears", "impliedVolatility", "delta", "gamma", "theta", "vega", "rho", "confidence", "nullReason" ] }, "OptionSeriesWithAnalyticsHistory": { "allOf": [ { "$ref": "#/components/schemas/OptionSeries" }, { "type": "object", "properties": { "analytics": { "type": "array", "items": { "$ref": "#/components/schemas/OptionAnalyticsPoint" }, "description": "Série temporal EOD das gregas e volatilidade implícita calculadas para a opção." } }, "required": [ "analytics" ] } ] }, "OptionAnalyticsHistoryResponse": { "type": "object", "properties": { "option": { "$ref": "#/components/schemas/OptionSeriesWithAnalyticsHistory" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "option", "requestedAt", "took" ], "example": { "option": { "symbol": "PETRF783", "underlyingSymbol": "PETR4", "side": "call", "market": "equity", "optionStyle": "european", "strike": 7.29, "allocationRoundLot": 100, "expirationDate": "2026-12-18", "firstTradeDate": "2026-04-24", "lastTradeDate": "2026-06-01", "analytics": [ { "date": "2026-05-29", "model": "black-scholes-merton", "priceSource": "close", "underlyingPrice": 42, "optionPrice": 34.8, "riskFreeRate": 0.145, "dividendYield": 0, "timeToExpirationYears": 0.057534248, "impliedVolatility": 3.0155768, "delta": 0.99739844, "gamma": 0.0002648198, "theta": -3.1521828, "vega": 0.08104867, "rho": 0.4079601, "confidence": "medium", "nullReason": null } ] }, "requestedAt": "2026-06-02T12:00:00.000Z", "took": 10 } }, "PrimeRateEntrySimple": { "type": "object", "properties": { "date": { "type": "string" }, "value": { "type": "string", "description": "Taxa SELIC meta anualizada (% a.a.)", "example": "15.00" }, "epochDate": { "type": "number" } }, "required": [ "date", "value", "epochDate" ] }, "PrimeRateResponseSimple": { "type": "object", "properties": { "prime-rate": { "type": "array", "items": { "$ref": "#/components/schemas/PrimeRateEntrySimple" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "prime-rate", "requestedAt", "took" ], "example": { "prime-rate": [ { "date": "08/02/2026", "value": "15.00", "epochDate": 1770519600000 }, { "date": "07/02/2026", "value": "15.00", "epochDate": 1770433200000 }, { "date": "06/02/2026", "value": "15.00", "epochDate": 1770346800000 } ], "requestedAt": "2026-02-08T16:26:28.456Z", "took": 92 } }, "PrimeRateAvailableResponse": { "type": "object", "properties": { "countries": { "type": "array", "items": { "type": "string" } }, "message": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" } }, "required": [ "countries", "message", "requestedAt" ], "example": { "countries": [ "brazil" ], "message": "Available prime rate data countries", "requestedAt": "2026-02-08T16:26:29.093Z" } }, "QuoteListItem": { "type": "object", "properties": { "stock": { "type": "string", "description": "Ticker do ativo" }, "name": { "type": "string", "description": "Nome da empresa" }, "close": { "type": "number", "nullable": true, "description": "Preço de fechamento" }, "change": { "type": "number", "nullable": true, "description": "Variação percentual" }, "volume": { "type": "number", "nullable": true, "description": "Volume negociado" }, "market_cap": { "type": "number", "nullable": true, "description": "Capitalização de mercado" }, "logo": { "type": "string", "nullable": true, "description": "URL do logo" }, "sector": { "type": "string", "nullable": true, "description": "Setor" }, "type": { "type": "string", "nullable": true, "description": "Tipo do ativo" }, "subType": { "type": "string", "nullable": true, "description": "Classificação aditiva do ativo: stock, unit, fii, etf, fi-infra, fi-agro, fip, fidc ou bdr" } }, "required": [ "stock", "name", "close", "change", "volume", "market_cap", "logo", "sector", "type", "subType" ] }, "QuoteListResponse": { "type": "object", "properties": { "indexes": { "type": "array", "items": { "type": "object", "properties": { "stock": { "type": "string" }, "name": { "type": "string" } }, "required": [ "stock", "name" ] } }, "stocks": { "type": "array", "items": { "$ref": "#/components/schemas/QuoteListItem" } }, "availableSectors": { "type": "array", "items": { "type": "string" } }, "availableStockTypes": { "type": "array", "items": { "type": "string" } }, "availableSubTypeTypes": { "type": "array", "items": { "type": "string" } }, "currentPage": { "type": "number" }, "totalPages": { "type": "number" }, "itemsPerPage": { "type": "number" }, "totalCount": { "type": "number" }, "hasNextPage": { "type": "boolean" } }, "required": [ "indexes", "stocks", "availableSectors", "availableStockTypes", "availableSubTypeTypes" ], "example": { "indexes": [ { "stock": "^BVSP", "name": "IBOVESPA" }, { "stock": "IFIX.SA", "name": "Índice de Fundos Imobiliários" } ], "stocks": [ { "stock": "PETR4", "name": "PETR4", "close": 36.65, "change": -0.95, "volume": 27681100, "market_cap": 483937892568, "sector": "Energy Minerals", "type": "stock", "subType": "stock", "logo": "https://icons.brapi.dev/icons/PETR4.svg" }, { "stock": "VALE3", "name": "VALE3", "close": 52.89, "change": -1.23, "volume": 18543200, "market_cap": 229876543210, "sector": "Non-Energy Minerals", "type": "stock", "subType": "stock", "logo": "https://icons.brapi.dev/icons/VALE3.svg" } ], "availableSectors": [ "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" ], "availableStockTypes": [ "stock", "fund", "bdr" ], "availableSubTypeTypes": [ "stock", "unit", "fii", "etf", "fi-infra", "fi-agro", "fip", "fidc", "bdr" ], "currentPage": 1, "totalPages": 50, "itemsPerPage": 10, "totalCount": 500, "hasNextPage": true, "requestedAt": "2026-02-08T16:25:29.000Z", "took": 12 } }, "HistoricalDataPrice": { "type": "object", "properties": { "date": { "type": "integer", "description": "Data do pregão ou do ponto de dados, representada como um timestamp UNIX (número de segundos desde 1970-01-01 UTC)." }, "open": { "type": "number", "description": "Preço de abertura do ativo no intervalo (dia, semana, mês, etc.)." }, "high": { "type": "number", "description": "Preço máximo atingido pelo ativo no intervalo." }, "low": { "type": "number", "description": "Preço mínimo atingido pelo ativo no intervalo." }, "close": { "type": "number", "description": "Preço de fechamento do ativo no intervalo." }, "volume": { "type": "integer", "description": "Volume financeiro negociado no intervalo." }, "adjustedClose": { "type": "number", "description": "Preço de fechamento ajustado para proventos (dividendos, JCP, bonificações, etc.) e desdobramentos/grupamentos." } }, "required": [ "date", "open", "high", "low", "close", "volume", "adjustedClose" ] }, "DividendsData": { "type": "object", "properties": { "cashDividends": { "type": "array", "items": { "type": "object", "properties": { "assetIssued": { "type": "string", "description": "Código ISIN do ativo emissor" }, "paymentDate": { "type": "string", "nullable": true, "description": "Data de pagamento" }, "rate": { "type": "number", "description": "Valor por ação" }, "relatedTo": { "type": "string", "description": "Período de referência" }, "approvedOn": { "type": "string", "nullable": true, "description": "Data de aprovação" }, "isinCode": { "type": "string", "description": "Código ISIN" }, "label": { "type": "string", "description": "Tipo (DIVIDENDO, JCP)" }, "lastDatePrior": { "type": "string", "nullable": true, "description": "Data-com (último dia antes da data ex)" }, "remarks": { "type": "string", "description": "Observações" } }, "required": [ "assetIssued", "paymentDate", "rate", "relatedTo", "approvedOn", "isinCode", "label", "lastDatePrior", "remarks" ] }, "description": "Histórico de dividendos e JCP em dinheiro" }, "stockDividends": { "type": "array", "items": { "type": "object", "properties": { "assetIssued": { "type": "string", "description": "Código ISIN do ativo emissor" }, "factor": { "type": "number", "description": "Fator do desdobramento/grupamento" }, "completeFactor": { "type": "string", "description": "Fator completo (ex: 2 para 1)" }, "approvedOn": { "type": "string", "nullable": true, "description": "Data de aprovação" }, "isinCode": { "type": "string", "description": "Código ISIN" }, "label": { "type": "string", "description": "Tipo (DESDOBRAMENTO, GRUPAMENTO)" }, "lastDatePrior": { "type": "string", "nullable": true, "description": "Data de corte" }, "remarks": { "type": "string", "description": "Observações" } }, "required": [ "assetIssued", "factor", "completeFactor", "approvedOn", "isinCode", "label", "lastDatePrior", "remarks" ] }, "description": "Histórico de bonificações e desdobramentos" }, "subscriptions": { "type": "array", "items": { "nullable": true }, "description": "Histórico de subscrições" } }, "required": [ "cashDividends", "stockDividends", "subscriptions" ], "description": "Dados de dividendos (quando dividends=true)" }, "SummaryProfile": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Ticker do ativo" }, "cnpj": { "type": "string", "nullable": true, "description": "CNPJ da empresa" }, "address1": { "type": "string", "nullable": true, "description": "Endereço linha 1" }, "address2": { "type": "string", "nullable": true, "description": "Endereço linha 2" }, "address3": { "type": "string", "nullable": true, "description": "Endereço linha 3" }, "city": { "type": "string", "nullable": true, "description": "Cidade" }, "state": { "type": "string", "nullable": true, "description": "Estado" }, "zip": { "type": "string", "nullable": true, "description": "CEP" }, "country": { "type": "string", "nullable": true, "description": "País" }, "phone": { "type": "string", "nullable": true, "description": "Telefone" }, "fax": { "type": "string", "nullable": true, "description": "Fax" }, "website": { "type": "string", "nullable": true, "description": "Website" }, "industry": { "type": "string", "nullable": true, "description": "Setor" }, "industryKey": { "type": "string", "nullable": true, "description": "Chave do setor" }, "industryDisp": { "type": "string", "nullable": true, "description": "Nome do setor" }, "sector": { "type": "string", "nullable": true, "description": "Segmento" }, "sectorKey": { "type": "string", "nullable": true, "description": "Chave do segmento" }, "sectorDisp": { "type": "string", "nullable": true, "description": "Nome do segmento" }, "longBusinessSummary": { "type": "string", "nullable": true, "description": "Descrição da empresa" }, "fullTimeEmployees": { "type": "number", "nullable": true, "description": "Número de funcionários" }, "companyOfficers": { "type": "array", "items": { "nullable": true }, "description": "Diretoria" }, "updatedAt": { "type": "string", "nullable": true, "description": "Data de atualização" } }, "required": [ "symbol", "cnpj", "address1", "address2", "address3", "city", "state", "zip", "country", "phone", "fax", "website", "industry", "industryKey", "industryDisp", "sector", "sectorKey", "sectorDisp", "longBusinessSummary", "fullTimeEmployees", "companyOfficers", "updatedAt" ], "description": "Perfil da empresa (quando modules inclui summaryProfile)" }, "BalanceSheetEntry": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Ticker do ativo" }, "type": { "type": "string", "description": "Tipo (yearly, quarterly)" }, "endDate": { "type": "string", "description": "Data de referência" }, "cash": { "type": "number", "nullable": true, "description": "Caixa" }, "shortTermInvestments": { "type": "number", "nullable": true, "description": "Investimentos de curto prazo" }, "netReceivables": { "type": "number", "nullable": true, "description": "Contas a receber" }, "inventory": { "type": "number", "nullable": true, "description": "Estoques" }, "otherCurrentAssets": { "type": "number", "nullable": true, "description": "Outros ativos circulantes" }, "totalCurrentAssets": { "type": "number", "nullable": true, "description": "Total ativo circulante" }, "longTermInvestments": { "type": "number", "nullable": true, "description": "Investimentos de longo prazo" }, "propertyPlantEquipment": { "type": "number", "nullable": true, "description": "Imobilizado" }, "otherAssets": { "type": "number", "nullable": true, "description": "Outros ativos" }, "totalAssets": { "type": "number", "nullable": true, "description": "Total de ativos" }, "accountsPayable": { "type": "number", "nullable": true, "description": "Fornecedores" }, "shortLongTermDebt": { "type": "number", "nullable": true, "description": "Dívida de curto/longo prazo" }, "longTermDebt": { "type": "number", "nullable": true, "description": "Dívida de longo prazo" }, "totalCurrentLiabilities": { "type": "number", "nullable": true, "description": "Passivo circulante total" }, "totalLiab": { "type": "number", "nullable": true, "description": "Passivo total" }, "totalStockholderEquity": { "type": "number", "nullable": true, "description": "Patrimônio líquido" }, "updatedAt": { "type": "string", "nullable": true, "description": "Data de atualização" } }, "required": [ "symbol", "type", "endDate", "cash", "shortTermInvestments", "netReceivables", "inventory", "otherCurrentAssets", "totalCurrentAssets", "longTermInvestments", "propertyPlantEquipment", "otherAssets", "totalAssets", "accountsPayable", "shortLongTermDebt", "longTermDebt", "totalCurrentLiabilities", "totalLiab", "totalStockholderEquity", "updatedAt" ] }, "FinancialDataEntry": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Ticker do ativo" }, "currentPrice": { "type": "number", "nullable": true, "description": "Preço atual" }, "ebitda": { "type": "number", "nullable": true, "description": "EBITDA" }, "quickRatio": { "type": "number", "nullable": true, "description": "Liquidez seca" }, "currentRatio": { "type": "number", "nullable": true, "description": "Liquidez corrente" }, "debtToEquity": { "type": "number", "nullable": true, "description": "Dívida/PL" }, "revenuePerShare": { "type": "number", "nullable": true, "description": "Receita por ação" }, "returnOnAssets": { "type": "number", "nullable": true, "description": "ROA" }, "returnOnEquity": { "type": "number", "nullable": true, "description": "ROE" }, "earningsGrowth": { "type": "number", "nullable": true, "description": "Crescimento do lucro do controlador (TTM) — variação dos últimos 4 trimestres em relação aos 4 trimestres imediatamente anteriores, usando Lucro Líquido Atribuível aos Controladores. Para crescimento anual (DRE de exercício vs. exercício anterior), use earningsGrowthAnnual." }, "revenueGrowth": { "type": "number", "nullable": true, "description": "Crescimento da receita (TTM) — variação da receita dos últimos 4 trimestres em relação aos 4 trimestres imediatamente anteriores. Para crescimento anual (DRE de exercício vs. exercício anterior), use revenueGrowthAnnual." }, "earningsGrowthAnnual": { "type": "number", "nullable": true, "description": "Crescimento anual do lucro do controlador — variação do Lucro Líquido Atribuível aos Controladores do último exercício social completo em relação ao exercício anterior." }, "revenueGrowthAnnual": { "type": "number", "nullable": true, "description": "Crescimento anual da receita — variação da Receita Líquida do último exercício social completo em relação ao exercício anterior." }, "grossMargins": { "type": "number", "nullable": true, "description": "Margem bruta" }, "ebitdaMargins": { "type": "number", "nullable": true, "description": "Margem EBITDA" }, "operatingMargins": { "type": "number", "nullable": true, "description": "Margem operacional" }, "profitMargins": { "type": "number", "nullable": true, "description": "Margem de lucro" }, "totalCash": { "type": "number", "nullable": true, "description": "Caixa total" }, "totalCashPerShare": { "type": "number", "nullable": true, "description": "Caixa por ação" }, "totalDebt": { "type": "number", "nullable": true, "description": "Dívida total" }, "totalRevenue": { "type": "number", "nullable": true, "description": "Receita total" }, "grossProfits": { "type": "number", "nullable": true, "description": "Lucro bruto" }, "operatingCashflow": { "type": "number", "nullable": true, "description": "Fluxo de caixa operacional" }, "freeCashflow": { "type": "number", "nullable": true, "description": "Fluxo de caixa livre" }, "financialCurrency": { "type": "string", "nullable": true, "description": "Moeda" }, "updatedAt": { "type": "string", "nullable": true, "description": "Data de atualização" }, "type": { "type": "string", "nullable": true, "description": "Tipo (ttm, yearly, quarterly)" } }, "required": [ "symbol", "currentPrice", "ebitda", "quickRatio", "currentRatio", "debtToEquity", "revenuePerShare", "returnOnAssets", "returnOnEquity", "earningsGrowth", "revenueGrowth", "earningsGrowthAnnual", "revenueGrowthAnnual", "grossMargins", "ebitdaMargins", "operatingMargins", "profitMargins", "totalCash", "totalCashPerShare", "totalDebt", "totalRevenue", "grossProfits", "operatingCashflow", "freeCashflow", "financialCurrency", "updatedAt", "type" ], "description": "Dados financeiros e indicadores TTM" }, "QuoteResult": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Ticker (símbolo) do ativo (ex: PETR4, ^BVSP)", "example": "PETR4" }, "currency": { "type": "string", "description": "Moeda na qual os valores são expressos (geralmente BRL)" }, "shortName": { "type": "string", "nullable": true, "description": "Nome curto ou abreviado da empresa" }, "longName": { "type": "string", "nullable": true, "description": "Nome completo da empresa" }, "regularMarketPrice": { "type": "number", "nullable": true, "description": "Preço atual ou do último negócio registrado" }, "regularMarketChange": { "type": "number", "nullable": true, "description": "Variação absoluta do preço no dia em relação ao fechamento anterior" }, "regularMarketChangePercent": { "type": "number", "nullable": true, "description": "Variação percentual do preço no dia" }, "regularMarketTime": { "type": "string", "nullable": true, "description": "Data/hora da última atualização da cotação (ISO 8601)" }, "regularMarketDayHigh": { "type": "number", "nullable": true, "description": "Preço máximo atingido no dia" }, "regularMarketDayLow": { "type": "number", "nullable": true, "description": "Preço mínimo atingido no dia" }, "regularMarketDayRange": { "type": "string", "nullable": true, "description": "Intervalo de preço do dia (Mínimo - Máximo)" }, "regularMarketVolume": { "type": "number", "nullable": true, "description": "Volume financeiro negociado no dia" }, "regularMarketPreviousClose": { "type": "number", "nullable": true, "description": "Preço de fechamento do pregão anterior" }, "regularMarketOpen": { "type": "number", "nullable": true, "description": "Preço de abertura no dia" }, "averageDailyVolume3Month": { "type": "number", "nullable": true, "description": "Média do volume diário nos últimos 3 meses" }, "averageDailyVolume10Day": { "type": "number", "nullable": true, "description": "Média do volume diário nos últimos 10 dias" }, "fiftyTwoWeekLow": { "type": "number", "nullable": true, "description": "Preço mínimo nas últimas 52 semanas" }, "fiftyTwoWeekHigh": { "type": "number", "nullable": true, "description": "Preço máximo nas últimas 52 semanas" }, "fiftyTwoWeekRange": { "type": "string", "nullable": true, "description": "Intervalo de preço das últimas 52 semanas" }, "fiftyTwoWeekLowChange": { "type": "number", "nullable": true, "description": "Variação entre preço atual e mínimo de 52 semanas" }, "fiftyTwoWeekHighChange": { "type": "number", "nullable": true, "description": "Variação entre preço atual e máximo de 52 semanas" }, "fiftyTwoWeekHighChangePercent": { "type": "number", "nullable": true, "description": "Variação percentual entre preço atual e máximo de 52 semanas" }, "twoHundredDayAverage": { "type": "number", "nullable": true, "description": "Média móvel de 200 dias" }, "twoHundredDayAverageChange": { "type": "number", "nullable": true, "description": "Variação entre preço atual e média de 200 dias" }, "twoHundredDayAverageChangePercent": { "type": "number", "nullable": true, "description": "Variação percentual entre preço atual e média de 200 dias" }, "marketCap": { "type": "number", "nullable": true, "description": "Capitalização de mercado total" }, "priceEarnings": { "type": "number", "nullable": true, "description": "Indicador Preço/Lucro (P/L)" }, "earningsPerShare": { "type": "number", "nullable": true, "description": "Lucro Por Ação (LPA) TTM" }, "logourl": { "type": "string", "nullable": true, "description": "URL do logo do ativo" }, "usedInterval": { "type": "string", "nullable": true, "description": "Intervalo efetivamente utilizado para dados históricos" }, "usedRange": { "type": "string", "nullable": true, "description": "Período efetivamente utilizado para dados históricos" }, "validRanges": { "type": "array", "items": { "type": "string" }, "description": "Valores válidos para o parâmetro range" }, "validIntervals": { "type": "array", "items": { "type": "string" }, "description": "Valores válidos para o parâmetro interval" }, "historicalDataPrice": { "type": "array", "items": { "$ref": "#/components/schemas/HistoricalDataPrice" }, "description": "Série histórica de preços (quando range/interval fornecidos)" }, "dividendsData": { "$ref": "#/components/schemas/DividendsData" }, "summaryProfile": { "$ref": "#/components/schemas/SummaryProfile" }, "balanceSheetHistory": { "type": "array", "items": { "$ref": "#/components/schemas/BalanceSheetEntry" }, "description": "Histórico anual do Balanço Patrimonial" }, "balanceSheetHistoryQuarterly": { "type": "array", "items": { "$ref": "#/components/schemas/BalanceSheetEntry" }, "description": "Histórico trimestral do Balanço Patrimonial" }, "financialData": { "$ref": "#/components/schemas/FinancialDataEntry" }, "financialDataHistory": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialDataEntry" }, "description": "Histórico anual de dados financeiros" }, "financialDataHistoryQuarterly": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialDataEntry" }, "description": "Histórico trimestral de dados financeiros" } }, "required": [ "symbol", "currency", "shortName", "longName", "regularMarketPrice", "regularMarketChange", "regularMarketChangePercent", "regularMarketTime", "regularMarketDayHigh", "regularMarketDayLow", "regularMarketDayRange", "regularMarketVolume", "regularMarketPreviousClose", "regularMarketOpen", "averageDailyVolume3Month", "averageDailyVolume10Day", "fiftyTwoWeekLow", "fiftyTwoWeekHigh", "fiftyTwoWeekRange", "fiftyTwoWeekLowChange", "fiftyTwoWeekHighChange", "fiftyTwoWeekHighChangePercent", "twoHundredDayAverage", "twoHundredDayAverageChange", "twoHundredDayAverageChangePercent", "marketCap", "priceEarnings", "earningsPerShare", "logourl", "usedInterval", "usedRange" ] }, "GuidanceItem": { "type": "object", "properties": { "code": { "type": "string", "example": "FII_DIVIDENDS_MISUSE" }, "message": { "type": "string", "example": "Os símbolos MXRF11 parecem ser FIIs. Para dados de dividendos de FIIs, use o endpoint dedicado /api/v2/fii/dividends?symbols=MXRF11 que inclui datas reais de pagamento e ex-date." }, "details": { "type": "object", "properties": { "suggestedEndpoint": { "type": "string", "example": "/api/v2/fii/dividends?symbols=MXRF11" }, "reason": { "type": "string" } }, "required": [ "suggestedEndpoint", "reason" ] } }, "required": [ "code", "message", "details" ] }, "QuoteTickersResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/QuoteResult" } }, "guidance": { "type": "array", "items": { "$ref": "#/components/schemas/GuidanceItem" }, "description": "Dicas contextuais quando a requisição funciona mas existe um endpoint mais adequado para o caso de uso." }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "symbol": "PETR4", "shortName": "PETR4", "longName": "Petroleo Brasileiro SA Pfd", "currency": "BRL", "regularMarketPrice": 36.65, "regularMarketDayHigh": 37.27, "regularMarketDayLow": 36.45, "regularMarketDayRange": "36.45 - 37.27", "regularMarketChange": -0.35, "regularMarketChangePercent": -0.95, "regularMarketTime": "2026-02-08T16:24:54.000Z", "marketCap": 483937892568, "regularMarketVolume": 27681100, "regularMarketPreviousClose": 36.7, "regularMarketOpen": 37.21, "fiftyTwoWeekRange": "28.86 - 38.66", "fiftyTwoWeekLow": 28.86, "fiftyTwoWeekHigh": 38.66, "priceEarnings": 6.09, "earningsPerShare": 6.01, "logourl": "https://icons.brapi.dev/icons/PETR4.svg" } ], "requestedAt": "2026-02-08T16:25:28.170Z", "took": 3 } }, "StockQuoteSnapshot": { "type": "object", "properties": { "shortName": { "type": "string", "example": "PETROBRAS PN" }, "longName": { "type": "string", "example": "Petróleo Brasileiro S.A." }, "currency": { "type": "string", "example": "BRL" }, "regularMarketPrice": { "type": "number", "example": 36.65 }, "regularMarketDayHigh": { "type": "number", "example": 37.27 }, "regularMarketDayLow": { "type": "number", "example": 36.45 }, "regularMarketDayRange": { "type": "string", "example": "36.45 - 37.27" }, "regularMarketChange": { "type": "number", "example": -0.35 }, "regularMarketChangePercent": { "type": "number", "example": -0.95 }, "regularMarketTime": { "type": "string", "description": "Horário da cotação em ISO 8601.", "example": "2026-02-08T16:24:54.000Z" }, "marketCap": { "type": "number", "nullable": true, "example": 483937892568 }, "regularMarketVolume": { "type": "number", "example": 27681100 }, "regularMarketPreviousClose": { "type": "number", "example": 36.7 }, "regularMarketOpen": { "type": "number", "example": 37.21 }, "fiftyTwoWeekRange": { "type": "string", "example": "28.86 - 38.66" }, "fiftyTwoWeekLow": { "type": "number", "example": 28.86 }, "fiftyTwoWeekHigh": { "type": "number", "example": 38.66 }, "logourl": { "type": "string", "example": "https://icons.brapi.dev/icons/PETR4.svg" } }, "required": [ "shortName", "longName", "currency", "regularMarketPrice", "regularMarketDayHigh", "regularMarketDayLow", "regularMarketDayRange", "regularMarketChange", "regularMarketChangePercent", "regularMarketTime", "marketCap", "regularMarketVolume", "regularMarketPreviousClose", "regularMarketOpen", "fiftyTwoWeekRange", "fiftyTwoWeekLow", "fiftyTwoWeekHigh", "logourl" ] }, "StockQuoteSeries": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "description": "Ticker informado na requisição.", "example": "VVAR3" }, "symbol": { "type": "string", "description": "Ticker retornado pela brapi após normalização/renome.", "example": "BHIA3" }, "changed": { "type": "boolean", "description": "`true` quando o ticker informado foi resolvido para outro ticker.", "example": true }, "data": { "$ref": "#/components/schemas/StockQuoteSnapshot" } }, "required": [ "requestedSymbol", "symbol", "changed", "data" ] }, "StockQuoteResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockQuoteSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": { "shortName": "PETROBRAS PN EX N2", "longName": "Petróleo Brasileiro S.A. - Petrobras", "currency": "BRL", "regularMarketPrice": 41.18, "regularMarketDayHigh": 41.53, "regularMarketDayLow": 40.82, "regularMarketDayRange": "40.82 - 41.53", "regularMarketChange": -0.58, "regularMarketChangePercent": -1.39, "regularMarketTime": "2026-06-14T05:15:42.000Z", "marketCap": null, "regularMarketVolume": 34024700, "regularMarketPreviousClose": 41.76, "regularMarketOpen": 41.18, "fiftyTwoWeekRange": "29.31 - 50.69", "fiftyTwoWeekLow": 29.31, "fiftyTwoWeekHigh": 50.69, "logourl": "https://icons.brapi.dev/icons/PETR4.svg" } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 286 } }, "StockHistoricalPrice": { "type": "object", "properties": { "date": { "type": "integer", "description": "Data do pregão em Unix timestamp (segundos).", "example": 1704067200 }, "open": { "type": "number", "nullable": true, "example": 36.1 }, "high": { "type": "number", "nullable": true, "example": 37.2 }, "low": { "type": "number", "nullable": true, "example": 35.9 }, "close": { "type": "number", "nullable": true, "example": 36.65 }, "volume": { "type": "number", "nullable": true, "example": 27681100 }, "adjustedClose": { "type": "number", "nullable": true, "example": 36.65 } }, "required": [ "date", "open", "high", "low", "close", "volume", "adjustedClose" ] }, "StockHistoricalSeries": { "type": "object", "properties": { "usedInterval": { "type": "string", "example": "1d" }, "usedRange": { "type": "string", "example": "1y" }, "historicalDataPrice": { "type": "array", "items": { "$ref": "#/components/schemas/StockHistoricalPrice" } } }, "required": [ "usedInterval", "usedRange", "historicalDataPrice" ] }, "StockHistoricalResult": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "description": "Ticker informado na requisição.", "example": "VVAR3" }, "symbol": { "type": "string", "description": "Ticker retornado pela brapi após normalização/renome.", "example": "BHIA3" }, "changed": { "type": "boolean", "description": "`true` quando o ticker informado foi resolvido para outro ticker.", "example": true }, "data": { "$ref": "#/components/schemas/StockHistoricalSeries" } }, "required": [ "requestedSymbol", "symbol", "changed", "data" ] }, "StockHistoricalResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockHistoricalResult" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": { "usedInterval": "1d", "usedRange": "1mo", "historicalDataPrice": [ { "date": 1781233200, "open": 41.06, "high": 41.53, "low": 40.82, "close": 41.18, "volume": 34081000, "adjustedClose": 41.18 } ] } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 907 } }, "StockDividendsSeries": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "description": "Ticker informado na requisição.", "example": "VVAR3" }, "symbol": { "type": "string", "description": "Ticker retornado pela brapi após normalização/renome.", "example": "BHIA3" }, "changed": { "type": "boolean", "description": "`true` quando o ticker informado foi resolvido para outro ticker.", "example": true }, "data": { "$ref": "#/components/schemas/DividendsData" } }, "required": [ "requestedSymbol", "symbol", "changed", "data" ] }, "StockDividendsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockDividendsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "ITSA4", "symbol": "ITSA4", "changed": false, "data": { "cashDividends": [ { "assetIssued": "BRITSAACNPR7", "paymentDate": "2026-10-01T03:00:00.000Z", "rate": 0.024242, "relatedTo": "", "approvedOn": null, "isinCode": "BRITSAACNPR7", "label": "JCP", "lastDatePrior": "2026-08-31T03:00:00.000Z", "remarks": "" } ], "stockDividends": [ { "assetIssued": "BRITSAACNPR7", "factor": 1.02, "completeFactor": "1,02 para 1", "approvedOn": "2025-12-15T03:00:00.000Z", "isinCode": "BRITSAACNPR7", "label": "BONIFICACAO", "lastDatePrior": "2025-12-18T03:00:00.000Z", "remarks": "" } ], "subscriptions": [] } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 203 } }, "StockFundamentalsSeries": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "example": "VVAR3" }, "symbol": { "type": "string", "example": "BHIA3" }, "changed": { "type": "boolean", "example": true }, "data": { "nullable": true, "description": "Payload do módulo solicitado. Pode ser objeto, array ou null conforme o endpoint." } }, "required": [ "requestedSymbol", "symbol", "changed" ] }, "StockProfileResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "VVAR3", "symbol": "BHIA3", "changed": true, "data": { "address1": "Rua Flórida, 1970", "address2": "5 andar", "address3": null, "city": "SÃO PAULO", "state": "SP", "zip": "4565001", "country": "BRASIL", "phone": "(11) 42256017", "fax": "(11) 42256996", "website": "https://ri.grupocasasbahia.com.br", "industry": "Eletrodomésticos", "industryKey": "eletrodomesticos", "industryDisp": "Eletrodomésticos", "sector": "Consumo Cíclico", "sectorKey": "consumo-ciclico", "sectorDisp": "Consumo Cíclico", "longBusinessSummary": "O Grupo Casas Bahia S.A., listado na B3 sob BHIA3, atua no varejo de bens duráveis e eletroeletrônicos no Brasil, com operação omnicanal que combina lojas físicas, comércio eletrônico e marketplace. A companhia opera marcas de varejo conhecidas nacionalmente e mantém estrutura de logística, distribuição e serviços financeiros para apoiar vendas parceladas e recorrência de clientes. A base de receita inclui venda de produtos, serviços e intermediação em canais digitais.\n\nA dinâmica de resultados é influenciada por consumo das famílias, custo de crédito, inadimplência, nível de estoques e eficiência logística. O setor de varejo de eletrodomésticos é sensível a renda disponível, juros e competição de preço entre grandes plataformas. Nos últimos anos, a empresa passou por reorganização de marca e ajustes operacionais para reduzir alavancagem, melhorar geração de caixa e priorizar rentabilidade por canal e categoria de produto.", "fullTimeEmployees": 57500, "companyOfficers": null, "twitter": "@CasasBahia", "name": "PONTO FRIO", "startDate": "1952-01-01", "description": null, "logoUrl": "https://icons.brapi.dev/icons/BHIA3.svg", "cnpj": "33041260065290", "administratorName": null, "administratorCnpj": null, "administratorAddress": null, "administratorAddressNumber": null, "administratorAddressComplement": null, "administratorDistrict": null, "administratorCity": null, "administratorState": null, "administratorZipCode": null, "administratorPhone1": null, "administratorPhone2": null, "administratorPhone3": null, "administratorWebsite": null, "administratorEmail": null } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 200 } }, "StockStatisticsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "WEGE3", "symbol": "WEGE3", "changed": false, "data": { "priceHint": null, "enterpriseValue": 181192740000, "forwardPE": null, "profitMargins": 0.16715191, "floatShares": 1485954700, "sharesOutstanding": 4197318000, "sharesShort": null, "sharesShortPriorMonth": null, "sharesShortPreviousMonthDate": null, "dateShortInterest": null, "sharesPercentSharesOut": null, "heldPercentInsiders": null, "heldPercentInstitutions": null, "shortRatio": null, "shortPercentOfFloat": null, "beta": 0.6503127, "impliedSharesOutstanding": null, "category": null, "bookValue": 4.227962, "priceToBook": 10.078141, "fundFamily": null, "legalType": null, "lastFiscalYearEnd": null, "nextFiscalYearEnd": "2026-12-31 00:00:00+00", "mostRecentQuarter": "2026-03-31", "earningsQuarterlyGrowth": -0.03510854, "netIncomeToCommon": 6287370000, "trailingEps": 1.4979494, "forwardEps": null, "pegRatio": 66.687416, "lastSplitFactor": null, "lastSplitDate": null, "enterpriseToRevenue": 4.507972, "enterpriseToEbitda": 20.290693, "52WeekChange": 0.03210223, "SandP52WeekChange": null, "lastDividendValue": null, "lastDividendDate": "2026-03-20", "ytdReturn": null, "beta3Year": null, "totalAssets": null, "yield": 0.03, "fundInceptionDate": null, "threeYearAverageReturn": null, "fiveYearAverageReturn": null, "morningStarOverallRating": null, "morningStarRiskRating": null, "annualReportExpenseRatio": null, "lastCapGain": null, "annualHoldingsTurnover": null, "marketCap": 178847730000, "trailingPE": 28.445553, "earningsPerShare": 1.4979494, "dividendYield": 0.03 } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 207 } }, "StockFinancialDataResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "WEGE3", "symbol": "WEGE3", "changed": false, "data": { "currentPrice": null, "targetHighPrice": null, "targetLowPrice": null, "targetMeanPrice": null, "targetMedianPrice": null, "recommendationMean": null, "recommendationKey": null, "numberOfAnalystOpinions": null, "totalCash": 7385768000, "totalCashPerShare": 1.7596399, "ebitda": 8929845000, "totalDebt": 9730790000, "quickRatio": 0.98023725, "currentRatio": 1.5479537, "totalRevenue": 40193850000, "debtToEquity": 0.54833394, "revenuePerShare": null, "returnOnAssets": 0.15488343, "returnOnEquity": 0.378589, "grossProfits": 13361430000, "freeCashflow": 2974247000, "operatingCashflow": 7172939000, "earningsGrowth": 0.0042655054, "revenueGrowth": 0.0040378235, "earningsGrowthAnnual": 0.05521239, "revenueGrowthAnnual": 0.074161455, "grossMargins": 0.3324247, "ebitdaMargins": 0.22216943, "operatingMargins": 0.19664963, "profitMargins": 0.16715191, "financialCurrency": null } } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 31 } }, "StockBalanceSheetResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": [ { "type": "yearly", "endDate": "2025-12-31", "cash": 35608000000, "shortTermInvestments": 15000001000, "netReceivables": 25461000000, "inventory": 45173000000, "otherCurrentAssets": 7637000000, "totalCurrentAssets": 140026000000, "longTermInvestments": 3024000000, "propertyPlantEquipment": 924624000000, "otherAssets": null, "totalAssets": 1223389000000, "accountsPayable": null, "shortLongTermDebt": null, "otherCurrentLiab": null, "longTermDebt": null, "otherLiab": null, "totalCurrentLiabilities": null, "totalLiab": 805802000000, "commonStock": null, "retainedEarnings": 0, "treasuryStock": null, "otherStockholderEquity": null, "totalStockholderEquity": null, "netTangibleAssets": null, "goodWill": null, "intangibleAssets": 13885000000, "deferredLongTermAssetCharges": null, "deferredLongTermLiab": null, "minorityInterest": 1800999900, "capitalSurplus": null, "financialAssets": null, "centralBankCompulsoryDeposit": null, "financialAssetsMeasuredAtFairValueThroughProfitOrLoss": null, "currentAndDeferredTaxes": null, "investments": null, "financialAssetsFVThroughOCI": null, "financialAssetsAtAmortizedCost": null, "accountsReceivableFromClients": 0, "otherAccountsReceivable": 0, "biologicalAssets": 0, "taxesToRecover": 11147000000, "prepaidExpenses": 0, "longTermAssets": 1083363000000, "longTermRealizableAssets": 141830000000, "longTermReceivables": 4683000000, "longTermAccountsReceivableFromClients": 0, "longTermInventory": 0, "longTermBiologicalAssets": 0, "longTermDeferredTaxes": 34965000000, "longTermPrepaidExpenses": 0, "creditsWithRelatedParties": 0, "shareholdings": 0, "investmentProperties": 0, "otherLongTermReceivables": 0, "otherNonCurrentAssets": 106557000000, "creditsFromOperations": null, "insuranceAndReinsurance": null, "complementaryPension": null, "securitiesAndCreditsReceivable": null, "otherValuesAndAssets": null, "compulsoryLoansAndDeposits": null, "deferredSellingExpenses": null, "nonCurrentAssets": null, "longTermFinancialInvestmentsMeasuredAtFairValueThroughIncome": null, "financialInvestmentsFVThroughOCI": null, "financialInvestmentsMeasuredAtAmortizedCost": null, "intangibleAsset": null, "deferredTaxes": null, "capitalization": null, "otherOperations": null, "financialLiabilitiesMeasuredAtFairValueThroughIncome": null, "financialLiabilitiesAtAmortizedCost": null, "provisions": 21934000000, "taxLiabilities": null, "otherLiabilities": null, "shareholdersEquity": 417587000000, "controllerShareholdersEquity": null, "nonControllingShareholdersEquity": null, "realizedShareCapital": 205432000000, "capitalReserves": 3105999900, "revaluationReserves": 0, "profitReserves": 158278000000, "accumulatedProfitsOrLosses": null, "equityValuationAdjustments": 0, "cumulativeConversionAdjustments": 0, "otherComprehensiveResults": 48970000000, "currentLiabilities": 198368000000, "socialAndLaborObligations": 15236000000, "providers": 40948000000, "nationalSuppliers": 0, "foreignSuppliers": 0, "taxObligations": 7110000000, "loansAndFinancing": 67253000000, "loansAndFinancingInNationalCurrency": 0, "loansAndFinancingInForeignCurrency": 0, "debentures": 0, "leaseFinancing": 55226000000, "otherObligations": 45321000000, "otherCurrentLiabilities": 566000000, "nonCurrentLiabilities": 607434000000, "longTermLoansAndFinancing": 316772000000, "longTermLoansAndFinancingInNationalCurrency": 0, "longTermLoansAndFinancingInForeignCurrency": 0, "longTermDebentures": 0, "longTermLeaseFinancing": 183310000000, "otherLongTermObligations": 3168000000, "longTermProvisions": 252529000000, "otherNonCurrentLiabilities": 0, "profitsAndRevenuesToBeAppropriated": 0, "debitsFromOperations": null, "debitsFromInsuranceAndReinsurance": null, "debitsFromComplementaryPension": null, "thirdPartyDeposits": null, "technicalProvisions": null, "otherDebits": null, "longTermLiabilities": null, "longTermAccountsPayable": null, "longTermDebitsFromOperations": null, "longTermTechnicalProvisions": null, "longTermInsuranceAndReinsurance": null, "longTermComplementaryPension": null, "longTermCapitalization": null, "otherLongTermProvisions": null, "debitsFromCapitalization": null, "debitsFromOtherOperations": null, "otherProvisions": null, "advanceForFutureCapitalIncrease": null } ] } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 31 } }, "StockIncomeStatementResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": [ { "type": "yearly", "endDate": "2025-12-31", "totalRevenue": 497549000000, "costOfRevenue": -260551000000, "grossProfit": 236998000000, "researchDevelopment": null, "sellingGeneralAdministrative": -10802000000, "nonRecurring": null, "otherOperatingExpenses": -51372000000, "totalOperatingExpenses": -91370000000, "operatingIncome": -91370000000, "totalOtherIncomeExpenseNet": null, "ebit": 145628000000, "interestExpense": null, "incomeBeforeTax": 150599000000, "incomeTaxExpense": -39994000000, "minorityInterest": 476000000, "netIncomeFromContinuingOps": 110605000000, "discontinuedOperations": 0, "extraordinaryItems": null, "effectOfAccountingCharges": null, "otherItems": null, "netIncome": 110605000000, "netIncomeApplicableToCommonShares": 110129000000, "salesExpenses": -28954000000, "lossesDueToNonRecoverabilityOfAssets": 0, "otherOperatingIncome": 0, "equityIncomeResult": -242000000, "financialResult": 4971000000, "financialIncome": 8286000000, "financialExpenses": -3315000000, "currentTaxes": -35099000000, "deferredTaxes": -4895000000, "incomeBeforeStatutoryParticipationsAndContributions": null, "basicEarningsPerCommonShare": 8540, "dilutedEarningsPerCommonShare": 8540, "basicEarningsPerPreferredShare": 8540, "profitSharingAndStatutoryContributions": null, "dilutedEarningsPerPreferredShare": 8540, "claimsAndOperationsCosts": null, "administrativeCosts": null, "otherOperatingIncomeAndExpenses": null, "earningsPerShare": null, "basicEarningsPerShare": null, "dilutedEarningsPerShare": null, "insuranceOperations": null, "reinsuranceOperations": null, "complementaryPensionOperations": null, "capitalizationOperations": null, "cleanEbit": 145628000000, "cleanEbitda": 145628000000, "cleanNopat": 96114480000, "cleanNetIncome": null } ] } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 31 } }, "StockCashFlowResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": [ { "type": "yearly", "endDate": "2025-12-31", "operatingCashFlow": 200333000000, "incomeFromOperations": 253975000000, "netIncomeBeforeTaxes": null, "adjustmentsToProfitOrLoss": null, "changesInAssetsAndLiabilities": -25534000000, "otherOperatingActivities": -28108000000, "cashGeneratedInOperations": null, "investmentCashFlow": -86114000000, "financingCashFlow": -97122000000, "exchangeVariationWithoutCash": null, "foreignExchangeRateWithoutCash": -1743000100, "increaseOrDecreaseInCash": 15354000000, "initialCashBalance": 20254000000, "finalCashBalance": 35608000000, "freeCashFlow": 114219000000 } ] } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 32 } }, "StockValueAddedResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/StockFundamentalsSeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "requestedSymbol": "PETR4", "symbol": "PETR4", "changed": false, "data": [ { "type": "yearly", "endDate": "2025-12-31", "revenue": 749557000000, "productSales": 641818000000, "otherRevenues": 14692000000, "constructionOfOwnAssets": 93487000000, "provisionOrReversalOfDoubtfulAccounts": -440000000, "suppliesPurchasedFromThirdParties": -292210000000, "costsWithProductsSold": -97253000000, "thirdPartyMaterialsAndServices": -140304000000, "lossOrRecoveryOfAssets": -8347000000, "otherSupplies": -46306000000, "grossAddedValue": 457347000000, "retentions": -84388000000, "depreciationAndAmortization": -84388000000, "otherRetentions": 0, "netAddedValue": 372959000000, "netAddedValueProduced": null, "addedValueReceivedOnTransfer": 12695000000, "addedValueReceivedByTransfer": null, "equityIncomeResult": -242000000, "financialIncome": 8286000000, "otherValuesReceivedOnTransfer": 4651000000, "otherValuesReceivedByTransfer": null, "addedValueToDistribute": 385654000000, "totalAddedValueToDistribute": null, "distributionOfAddedValue": 385654000000, "teamRemuneration": 46406000000, "taxes": 207791000000, "federalTaxes": 142628000000, "stateTaxes": 64329000000, "municipalTaxes": 834000000, "remunerationOfThirdPartyCapitals": 20852000000, "equityRemuneration": null, "ownEquityRemuneration": 110605000000, "interestOnOwnEquity": 30682000000, "dividends": 10554000000, "retainedEarningsOrLoss": 68893000000, "nonControllingShareOfRetainedEarnings": 476000000, "otherDistributions": 0, "financialIntermediationRevenue": null, "revenueFromTheProvisionOfServices": null, "provisionOrReversalOfExpectedCreditRiskLosses": null, "financialIntermediationExpenses": null, "materialsEnergyAndOthers": null, "services": null, "lossOrRecoveryOfAssetValues": null, "thirdPartyEquityRemuneration": null, "insuranceOperationsRevenue": null, "complementaryPensionOperationsRevenue": null, "feesRevenue": null, "variationsOfTechnicalProvisions": null, "insuranceOperationsVariations": null, "pensionOperationsVariations": null, "otherVariations": null, "netOperatingRevenue": null, "claimsAndBenefits": null, "variationInDeferredSellingExpenses": null, "resultsOfCededReinsuranceOperations": null, "resultOfCoinsuranceOperationsAssigned": null } ] } ], "requestedAt": "2026-06-14T05:03:16.000Z", "took": 30 } }, "TreasuryListItem": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Slug público do título do Tesouro Direto", "example": "tesouro-selic-01032031" }, "bondType": { "type": "string", "description": "Nome público do título", "example": "Tesouro Selic" }, "indexer": { "type": "string", "enum": [ "selic", "prefixado", "ipca", "igpm" ], "description": "Indexador normalizado do título", "example": "selic" }, "couponType": { "type": "string", "enum": [ "zero", "semestral" ], "description": "Tipo de pagamento de juros do título", "example": "zero" }, "maturityDate": { "type": "string", "nullable": true, "description": "Data de vencimento no formato YYYY-MM-DD", "example": "2031-03-01" }, "durationDays": { "type": "number", "nullable": true, "description": "Dias corridos entre a data-base e o vencimento", "example": 1751 }, "baseDate": { "type": "string", "nullable": true, "description": "Data-base da cotação no formato YYYY-MM-DD", "example": "2026-05-15" }, "buyRate": { "type": "number", "nullable": true, "description": "Taxa indicativa de compra em % a.a. Unidade: Tesouro Selic = spread (% a.a.) sobre a taxa Selic; Tesouro Prefixado = rendimento nominal (% a.a.); Tesouro IPCA = rendimento real (% a.a.) acima do IPCA.", "example": 0.08 }, "sellRate": { "type": "number", "nullable": true, "description": "Taxa indicativa de venda em % a.a. Unidade: Tesouro Selic = spread (% a.a.) sobre a taxa Selic; Tesouro Prefixado = rendimento nominal (% a.a.); Tesouro IPCA = rendimento real (% a.a.) acima do IPCA.", "example": 0.09 }, "buyPrice": { "type": "number", "nullable": true, "description": "Preço unitário indicativo de compra em BRL", "example": 18944.78 }, "sellPrice": { "type": "number", "nullable": true, "description": "Preço unitário indicativo de venda em BRL", "example": 18925.53 }, "basePrice": { "type": "number", "nullable": true, "description": "Preço unitário base em BRL", "example": 18925.53 }, "rateInfo": { "type": "object", "properties": { "rateType": { "type": "string", "enum": [ "spreadOverSelic", "nominalAnnualRate", "realAnnualRateOverIpca", "realAnnualRateOverIgpm" ], "description": "Tipo de interpretação para buyRate e sellRate", "example": "spreadOverSelic" }, "rateUnit": { "type": "string", "description": "Unidade das taxas buyRate e sellRate", "example": "% a.a." }, "description": { "type": "string", "description": "Descrição textual de como interpretar buyRate e sellRate para o indexador do título", "example": "Para Tesouro Selic, buyRate e sellRate representam o spread em pontos percentuais ao ano sobre a taxa Selic, não a rentabilidade total do título." } }, "required": [ "rateType", "rateUnit", "description" ], "description": "Metadados para interpretar buyRate e sellRate. As taxas têm significados diferentes conforme o indexador." } }, "required": [ "symbol", "bondType", "indexer", "couponType", "maturityDate", "durationDays", "baseDate", "buyRate", "sellRate", "buyPrice", "sellPrice", "basePrice", "rateInfo" ] }, "TreasuryPaginationMeta": { "type": "object", "properties": { "page": { "type": "number" }, "limit": { "type": "number" }, "totalItems": { "type": "number" }, "totalPages": { "type": "number" }, "hasNextPage": { "type": "boolean" } }, "required": [ "page", "limit", "totalItems", "totalPages", "hasNextPage" ] }, "TreasuryListResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TreasuryListItem" } }, "pagination": { "$ref": "#/components/schemas/TreasuryPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "pagination", "requestedAt", "took" ] }, "TreasuryIndicatorsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TreasuryListItem" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ] }, "TreasuryHistoryPoint": { "type": "object", "properties": { "baseDate": { "type": "string", "description": "Data-base da cotação no formato YYYY-MM-DD", "example": "2026-05-15" }, "buyRate": { "type": "number", "nullable": true, "description": "Taxa indicativa de compra em % a.a. Unidade: Tesouro Selic = spread (% a.a.) sobre a taxa Selic; Tesouro Prefixado = rendimento nominal (% a.a.); Tesouro IPCA = rendimento real (% a.a.) acima do IPCA.", "example": 0.08 }, "sellRate": { "type": "number", "nullable": true, "description": "Taxa indicativa de venda em % a.a. Unidade: Tesouro Selic = spread (% a.a.) sobre a taxa Selic; Tesouro Prefixado = rendimento nominal (% a.a.); Tesouro IPCA = rendimento real (% a.a.) acima do IPCA.", "example": 0.09 }, "buyPrice": { "type": "number", "nullable": true, "description": "Preço unitário indicativo de compra em BRL", "example": 18944.78 }, "sellPrice": { "type": "number", "nullable": true, "description": "Preço unitário indicativo de venda em BRL", "example": 18925.53 }, "basePrice": { "type": "number", "nullable": true, "description": "Preço unitário base em BRL", "example": 18925.53 } }, "required": [ "baseDate", "buyRate", "sellRate", "buyPrice", "sellPrice", "basePrice" ] }, "TreasuryHistorySeries": { "type": "object", "properties": { "symbol": { "type": "string", "example": "tesouro-selic-01032031" }, "bondType": { "type": "string", "description": "Nome público do título", "example": "Tesouro Selic" }, "indexer": { "type": "string", "enum": [ "selic", "prefixado", "ipca", "igpm" ], "description": "Indexador normalizado do título", "example": "selic" }, "couponType": { "type": "string", "enum": [ "zero", "semestral" ], "description": "Tipo de pagamento de juros do título", "example": "zero" }, "maturityDate": { "type": "string", "nullable": true, "description": "Data de vencimento no formato YYYY-MM-DD", "example": "2031-03-01" }, "rateInfo": { "type": "object", "properties": { "rateType": { "type": "string", "enum": [ "spreadOverSelic", "nominalAnnualRate", "realAnnualRateOverIpca", "realAnnualRateOverIgpm" ], "description": "Tipo de interpretação para buyRate e sellRate", "example": "spreadOverSelic" }, "rateUnit": { "type": "string", "description": "Unidade das taxas buyRate e sellRate", "example": "% a.a." }, "description": { "type": "string", "description": "Descrição textual de como interpretar buyRate e sellRate para o indexador do título", "example": "Para Tesouro Selic, buyRate e sellRate representam o spread em pontos percentuais ao ano sobre a taxa Selic, não a rentabilidade total do título." } }, "required": [ "rateType", "rateUnit", "description" ], "description": "Metadados para interpretar buyRate e sellRate. As taxas têm significados diferentes conforme o indexador." }, "history": { "type": "array", "items": { "$ref": "#/components/schemas/TreasuryHistoryPoint" } } }, "required": [ "symbol", "bondType", "indexer", "couponType", "maturityDate", "rateInfo", "history" ] }, "TreasuryIndicatorsHistoryResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TreasuryHistorySeries" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ], "example": { "results": [ { "symbol": "tesouro-selic-01032031", "bondType": "Tesouro Selic", "indexer": "selic", "couponType": "zero", "maturityDate": "2031-03-01", "rateInfo": { "rateType": "spreadOverSelic", "rateUnit": "% a.a.", "description": "Para Tesouro Selic, buyRate e sellRate representam o spread em pontos percentuais ao ano sobre a taxa Selic, não a rentabilidade total do título." }, "history": [ { "baseDate": "2026-05-15", "buyRate": 0.08, "sellRate": 0.09, "buyPrice": 18944.78, "sellPrice": 18925.53, "basePrice": 18925.53 } ] } ], "requestedAt": "2026-05-15T17:32:38.000Z", "took": 45 } }, "TickerRename": { "type": "object", "properties": { "oldSymbol": { "type": "string", "description": "Ticker antigo", "example": "VVAR3" }, "newSymbol": { "type": "string", "description": "Ticker novo divulgado no evento", "example": "BHIA3" }, "canonicalSymbol": { "type": "string", "description": "Ticker canônico atual. Em cadeias de renome, aponta diretamente para o ticker final conhecido.", "example": "BHIA3" }, "effectiveDate": { "type": "string", "description": "Data efetiva do renome no formato YYYY-MM-DD", "example": "2021-08-16" } }, "required": [ "oldSymbol", "newSymbol", "canonicalSymbol", "effectiveDate" ] }, "TickerRenamesResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TickerRename" } }, "count": { "type": "number", "example": 2 }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "count", "requestedAt", "took" ] }, "TickerResolveResult": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "description": "Ticker informado pelo usuário", "example": "VVAR3" }, "symbol": { "type": "string", "description": "Ticker atual recomendado para novas consultas", "example": "BHIA3" }, "changed": { "type": "boolean", "description": "Indica se o ticker informado foi mapeado para outro", "example": true }, "status": { "type": "string", "enum": [ "active", "renamed" ], "description": "Status do ticker informado no catálogo de renomes", "example": "renamed" }, "effectiveDate": { "type": "string", "nullable": true, "description": "Data efetiva do renome quando houver", "example": "2021-08-16" } }, "required": [ "requestedSymbol", "symbol", "changed", "status", "effectiveDate" ] }, "TickerResolveResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TickerResolveResult" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ] }, "TickerAvailableData": { "type": "object", "properties": { "ticker": { "type": "boolean", "example": true }, "quote": { "type": "boolean", "example": true }, "historical": { "type": "boolean", "example": true }, "stockDividends": { "type": "boolean", "example": true }, "fiiDividends": { "type": "boolean", "example": false }, "profile": { "type": "boolean", "example": true }, "statistics": { "type": "boolean", "example": true }, "financialStatements": { "type": "boolean", "example": true }, "fiiIndicators": { "type": "boolean", "example": false }, "fiiReports": { "type": "boolean", "example": false }, "fiiPortfolio": { "type": "boolean", "example": false }, "fiiProperties": { "type": "boolean", "example": false } }, "required": [ "ticker", "quote", "historical", "stockDividends", "fiiDividends", "profile", "statistics", "financialStatements", "fiiIndicators", "fiiReports", "fiiPortfolio", "fiiProperties" ] }, "TickerCoverageResult": { "type": "object", "properties": { "requestedSymbol": { "type": "string", "description": "Ticker informado pelo usuário", "example": "VVAR3" }, "symbol": { "type": "string", "description": "Ticker canônico usado para consulta", "example": "BHIA3" }, "changed": { "type": "boolean", "description": "Indica se o ticker informado foi normalizado", "example": true }, "status": { "type": "string", "enum": [ "available", "renamed", "unknown", "wrong_endpoint" ], "description": "Status da cobertura: disponível, renomeado, desconhecido ou endpoint incorreto para o tipo de símbolo", "example": "renamed" }, "assetType": { "type": "string", "nullable": true, "description": "Tipo amplo do ativo quando disponível", "example": "stock" }, "subType": { "type": "string", "nullable": true, "description": "Subtipo do ativo quando disponível", "example": "stock" }, "availableData": { "$ref": "#/components/schemas/TickerAvailableData" }, "recommendedEndpoints": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Endpoints brapi recomendados para o símbolo", "example": { "ticker": "/api/v2/tickers?search=BHIA3", "quote": "/api/v2/stocks/quote?symbols=BHIA3", "historical": "/api/v2/stocks/historical?symbols=BHIA3&range=1y&interval=1d", "dividends": "/api/v2/stocks/dividends?symbols=BHIA3" } } }, "required": [ "requestedSymbol", "symbol", "changed", "status", "assetType", "subType", "availableData", "recommendedEndpoints" ] }, "TickerCoverageResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TickerCoverageResult" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "requestedAt", "took" ] }, "TickerQuoteSummary": { "type": "object", "properties": { "lastPrice": { "type": "number", "nullable": true, "description": "Último preço disponível para listagem/screening", "example": 36.65 }, "changePercent": { "type": "number", "nullable": true, "description": "Variação percentual do último snapshot disponível", "example": -0.95 }, "volume": { "type": "number", "nullable": true, "description": "Volume negociado do último snapshot disponível", "example": 27681100 }, "marketCap": { "type": "number", "nullable": true, "description": "Capitalização de mercado quando disponível", "example": 483937892568 } }, "required": [ "lastPrice", "changePercent", "volume", "marketCap" ] }, "TickerListItem": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Ticker público do ativo na B3", "example": "PETR4" }, "name": { "type": "string", "description": "Nome de exibição do ativo", "example": "Petróleo Brasileiro S.A." }, "longName": { "type": "string", "nullable": true, "description": "Nome longo quando disponível", "example": "Petroleo Brasileiro SA Petrobras Preference Shares" }, "assetType": { "type": "string", "nullable": true, "enum": [ "stock", "fund", "bdr" ], "description": "Tipo amplo do ativo", "example": "stock" }, "subType": { "type": "string", "nullable": true, "enum": [ "stock", "unit", "fii", "etf", "fi-infra", "fi-agro", "fip", "fidc", "bdr" ], "description": "Classificação aditiva do ativo: stock, unit, fii, etf, fi-infra, fi-agro, fip, fidc ou bdr", "example": "stock" }, "exchange": { "type": "string", "enum": [ "B3" ], "description": "Bolsa de negociação", "example": "B3" }, "currency": { "type": "string", "enum": [ "BRL" ], "description": "Moeda de negociação", "example": "BRL" }, "sector": { "type": "string", "nullable": true, "description": "Setor quando disponível", "example": "Energy Minerals" }, "isActive": { "type": "boolean", "description": "Indica se o ativo aparece no catálogo ativo atual", "example": true }, "logoUrl": { "type": "string", "nullable": true, "description": "URL do logo quando disponível", "example": "https://icons.brapi.dev/icons/PETR4.svg" }, "quote": { "$ref": "#/components/schemas/TickerQuoteSummary" } }, "required": [ "symbol", "name", "longName", "assetType", "subType", "exchange", "currency", "sector", "isActive", "logoUrl", "quote" ] }, "TickerIndexItem": { "type": "object", "properties": { "symbol": { "type": "string", "example": "^BVSP" }, "name": { "type": "string", "example": "IBOVESPA" }, "exchange": { "type": "string", "enum": [ "B3" ], "example": "B3" }, "assetType": { "type": "string", "enum": [ "index" ], "example": "index" } }, "required": [ "symbol", "name", "exchange", "assetType" ] }, "TickerFacets": { "type": "object", "properties": { "sectors": { "type": "array", "items": { "type": "string" }, "description": "Setores disponíveis para filtro" }, "assetTypes": { "type": "array", "items": { "type": "string" }, "description": "Tipos amplos disponíveis para filtro", "example": [ "stock", "fund", "bdr" ] }, "subTypes": { "type": "array", "items": { "type": "string" }, "description": "Subtipos disponíveis para filtro", "example": [ "stock", "unit", "fii", "etf", "bdr" ] } }, "required": [ "sectors", "assetTypes", "subTypes" ] }, "TickerPagination": { "type": "object", "properties": { "page": { "type": "number", "example": 1 }, "limit": { "type": "number", "example": 20 }, "totalItems": { "type": "number", "example": 2302 }, "totalPages": { "type": "number", "example": 116 }, "hasNextPage": { "type": "boolean", "example": true } }, "required": [ "page", "limit", "totalItems", "totalPages", "hasNextPage" ] }, "TickerListResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TickerListItem" } }, "indexes": { "type": "array", "items": { "$ref": "#/components/schemas/TickerIndexItem" } }, "facets": { "$ref": "#/components/schemas/TickerFacets" }, "pagination": { "$ref": "#/components/schemas/TickerPagination" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "results", "indexes", "facets", "pagination", "requestedAt", "took" ] }, "UserUsageWindow": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "billing-cycle", "rolling-30d" ] }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } }, "required": [ "type", "start", "end" ] }, "UserSubscriptionPeriod": { "type": "object", "properties": { "start": { "type": "string", "nullable": true, "format": "date-time" }, "end": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "start", "end" ] }, "UserUsageData": { "type": "object", "properties": { "planName": { "type": "string", "enum": [ "free", "startup", "pro" ] }, "planLimit": { "type": "integer", "minimum": 0 }, "currentUsage": { "type": "integer", "minimum": 0 }, "remainingUsage": { "type": "integer", "minimum": 0 }, "usageWindow": { "$ref": "#/components/schemas/UserUsageWindow" }, "subscriptionPeriod": { "$ref": "#/components/schemas/UserSubscriptionPeriod" } }, "required": [ "planName", "planLimit", "currentUsage", "remainingUsage", "usageWindow", "subscriptionPeriod" ] }, "UserUsageResponse": { "type": "object", "properties": { "usage": { "$ref": "#/components/schemas/UserUsageData" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "usage", "requestedAt", "took" ], "example": { "usage": { "planName": "pro", "planLimit": 500000, "currentUsage": 1248, "remainingUsage": 498752, "usageWindow": { "type": "billing-cycle", "start": "2026-04-01T00:00:00.000Z", "end": "2026-05-01T00:00:00.000Z" }, "subscriptionPeriod": { "start": "2026-04-01T00:00:00.000Z", "end": "2026-05-01T00:00:00.000Z" } }, "requestedAt": "2026-04-07T20:45:10.000Z", "took": 18 } } }, "parameters": {} }, "paths": { "/health": { "get": { "tags": [ "Utilitários" ], "summary": "Verificar status da API", "description": "\nEndpoint de Health Check para monitoramento da disponibilidade e saúde da API.\n\n### O que Retorna\n\n* `status` — Status do sistema (`ok` ou `error`)\n* `timestamp` — Data/hora da verificação (ISO 8601)\n* `uptime` — Tempo de atividade do servidor (segundos)\n* `database.status` — Saúde do banco de dados (`ok` ou `error`)\n* `database.latencyMs` — Latência da conexão com o banco (ms)\n\n### Exemplo de Uso\n\n```bash\ncurl \"https://brapi.dev/health\"\n```\n\n### Caso de Uso\n\nIdeal para monitoramento com ferramentas como UptimeRobot, Datadog, ou checks de disponibilidade em pipelines CI/CD.\n\n**Plano Mínimo:** Gratuito\n**Autenticação:** Não necessária (Público)\n", "responses": { "200": { "description": "API operando normalmente.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } } } } } }, "/api/available": { "get": { "tags": [ "Utilitários" ], "operationId": "getAvailable", "summary": "Listar Ações e Índices Disponíveis", "description": "\nRetorna a lista completa de **ações e índices** disponíveis para consulta na API brapi.\n\n### Funcionalidades\n\n* **Ações brasileiras:** Todas as ações, FIIs, BDRs e ETFs negociados na bolsa brasileira\n* **Índices:** Índices do mercado brasileiro com cotação disponível na API\n* **Filtro por Nome:** Use `search` para filtrar por código ou nome do ativo\n\n### Características\n\n* **Sem Autenticação:** Este endpoint é **público** e não requer token\n* **Cache:** Dados cacheados por 15 minutos\n* **Atualização automática:** Conforme novos ativos são listados na bolsa brasileira\n\n### Exemplos de Uso\n\n```bash\n# Listar todos os ativos\ncurl \"https://brapi.dev/api/available\"\n\n# Buscar por código de ticker\ncurl \"https://brapi.dev/api/available?search=PETR\"\n\n# Buscar por nome da empresa\ncurl \"https://brapi.dev/api/available?search=banco\"\n```\n\n### Índices Disponíveis\n\n* `^BVSP` — Ibovespa (Índice Bovespa)\n* `IFIX.SA` — Índice de Fundos Imobiliários\n\n### Campos da Resposta\n\n* `stocks` — Array com códigos das ações (ex: [\"PETR4\", \"VALE3\", \"ITUB4\", ...])\n* `indexes` — Array com códigos dos índices (ex: [\"^BVSP\", \"IFIX.SA\"])\n\n### Como Usar\n\nUse os códigos retornados como parâmetro no endpoint `/api/quote/{tickers}` para obter cotações detalhadas.\n\n**Fonte:** Bolsa de Valores do Brasil\n\n**Plano Mínimo:** Gratuito\n**Autenticação:** Não necessária (Público)\n", "parameters": [ { "schema": { "type": "string", "description": "Filtrar ações e índices por nome ou código", "example": "PETR" }, "required": false, "name": "search", "in": "query" } ], "responses": { "200": { "description": "Lista de ações e índices disponíveis retornada com sucesso, opcionalmente filtrada pelo parâmetro de busca.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "Política de cache (s-maxage=900, stale-while-revalidate)" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvailableResponse" } } } }, "500": { "description": "**Erro Interno.** Erro interno ao processar a requisição.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/crypto": { "get": { "tags": [ "Criptomoedas" ], "operationId": "getCrypto", "summary": "Obter Cotações de Criptomoedas", "description": "\nRetorna cotações atualizadas de uma ou mais criptomoedas, com conversão para diferentes moedas fiduciárias.\n\n### Funcionalidades:\n* **Cotação Atual:** Preço, variação 24h, volume, market cap\n* **Múltiplas Moedas:** Consulte várias criptos em uma requisição (separadas por vírgula)\n* **Conversão de Moeda:** BRL (padrão), USD, EUR e outras\n* **Dados Históricos:** OHLCV via parâmetros `range` e `interval`\n\n### Autenticação:\nBearer token ou query param `token`. Obtenha em brapi.dev/dashboard.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/crypto?coin=BTC¤cy=BRL\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/crypto?coin=BTC,ETH,SOL¤cy=USD\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/crypto?coin=BTC¤cy=BRL&range=1mo&interval=1d\"\n```\n\n### Moedas de Conversão:\nBRL (Real), USD (Dólar), EUR (Euro), GBP (Libra) e outras\n\n### Campos da Resposta:\n* `coin` — Símbolo da criptomoeda\n* `coinName` — Nome completo\n* `currency` — Moeda de cotação\n* `regularMarketPrice` — Preço atual\n* `regularMarketChange` — Variação em valor absoluto\n* `regularMarketChangePercent` — Variação percentual (%)\n* `regularMarketDayHigh` / `regularMarketDayLow` — Máxima/Mínima do dia\n* `regularMarketVolume` — Volume negociado\n\n**Plano Mínimo:** Startup\n**Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Sigla(s) das criptomoedas separadas por vírgula", "example": "BTC,ETH" }, "required": false, "name": "coin", "in": "query" }, { "schema": { "type": "string", "description": "Moeda para cotação (padrão: BRL)", "example": "BRL" }, "required": false, "name": "currency", "in": "query" }, { "schema": { "type": "string", "description": "Período para dados históricos" }, "required": false, "name": "range", "in": "query" }, { "schema": { "type": "string", "description": "Intervalo dos dados históricos" }, "required": false, "name": "interval", "in": "query" } ], "responses": { "200": { "description": "Cotações das criptomoedas solicitadas na moeda especificada retornadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CryptoResponseSimple" } } } }, "400": { "description": "**Requisição Inválida.** Parâmetro `coin` não fornecido ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "**Não Autorizado.** Token de autenticação não fornecido ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "**Acesso Proibido.** Seu plano não tem acesso ao módulo de criptomoedas.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "**Erro Interno.** Erro interno ao processar a requisição.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "**Serviço Indisponível.** Serviço externo temporariamente indisponível.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/crypto/available": { "get": { "tags": [ "Criptomoedas" ], "operationId": "getCryptoAvailable", "summary": "Listar Criptomoedas Disponíveis", "description": "\nRetorna a lista de criptomoedas disponíveis para consulta no endpoint `/api/v2/crypto`.\n\n### Criptomoedas Populares:\n* **BTC** — Bitcoin\n* **ETH** — Ethereum\n* **BNB** — Binance Coin\n* **SOL** — Solana\n* **ADA** — Cardano\n* **XRP** — Ripple\n* **DOGE** — Dogecoin\n* **DOT** — Polkadot\n* **MATIC** — Polygon\n* **LTC** — Litecoin\n* E centenas de outras...\n\n### Uso:\nUse os símbolos retornados como valor do parâmetro `coin` no endpoint principal.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/crypto/available\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/crypto/available?search=BTC\"\n```\n\n**Plano Mínimo:** Startup\n**Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Filtrar criptomoedas por símbolo", "example": "BTC" }, "required": false, "name": "search", "in": "query" } ], "responses": { "200": { "description": "Lista de símbolos de criptomoedas disponíveis retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CryptoAvailableResponse" } } } } } } }, "/api/v2/currency": { "get": { "tags": [ "Câmbio" ], "operationId": "getCurrency", "summary": "Obter Cotações de Câmbio", "description": "\nRetorna cotações atualizadas de pares de moedas, com preço de compra/venda, variação e extremos do dia.\n\n### Funcionalidades:\n* **Cotação Atual:** Preço de compra (bid), venda (ask), máxima, mínima, variação\n* **Múltiplos Pares:** Consulte vários em uma requisição (separados por vírgula)\n* **Formato:** `ORIGEM-DESTINO` (ex: `USD-BRL`)\n\n### Autenticação:\nBearer token ou query param `token`. Obtenha em brapi.dev/dashboard.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/currency?currency=USD-BRL\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/currency?currency=USD-BRL,EUR-BRL,GBP-BRL\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/currency?currency=BTC-BRL\"\n```\n\n### Pares de Moedas Populares:\n* `USD-BRL` — Dólar Americano / Real\n* `EUR-BRL` — Euro / Real\n* `GBP-BRL` — Libra Esterlina / Real\n* `ARS-BRL` — Peso Argentino / Real\n* `EUR-USD` — Euro / Dólar\n* `BTC-BRL` — Bitcoin / Real\n* `ETH-BRL` — Ethereum / Real\n\n### Campos da Resposta:\n* `fromCurrency` / `toCurrency` — Par de moedas\n* `name` — Nome do par\n* `bidPrice` — Preço de compra\n* `askPrice` — Preço de venda\n* `high` / `low` — Máxima/Mínima do dia\n* `bidVariation` — Variação do preço de compra\n* `percentageChange` — Variação percentual (%)\n\n### Fonte dos Dados:\nBanco Central do Brasil (PTAX) / Yahoo Finance\n\n**Plano Mínimo:** Startup\n**Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Par(es) de moedas separados por vírgula (ex: USD-BRL,EUR-BRL)", "example": "USD-BRL" }, "required": false, "name": "currency", "in": "query" } ], "responses": { "200": { "description": "Cotações dos pares de moedas solicitados retornadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrencyResponseSimple" } } } }, "400": { "description": "**Requisição Inválida.** Parâmetro `currency` não fornecido ou formato inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "**Não Autorizado.** Token de autenticação não fornecido ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "**Acesso Proibido.** Seu plano não tem acesso ao módulo de câmbio.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "**Erro Interno.** Erro interno ao processar a requisição.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "**Serviço Indisponível.** Serviço externo temporariamente indisponível.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/currency/historical": { "get": { "tags": [ "Câmbio" ], "operationId": "getCurrencyHistorical", "summary": "Histórico de Cotações de Câmbio", "description": "\nRetorna séries históricas diárias de câmbio em três formas, todas\nderivadas das mesmas cotações PTAX de fechamento:\n\n- **Direto** (X-BRL) — cotação diária do par armazenado. Disponível a partir do plano Startup.\n- **Inverso** (BRL-X) — calculado como `1 / X-BRL`. Requer plano Pro.\n- **Cross-rate** (X-Y, nenhum dos dois é BRL) — calculado como\n `X-BRL / Y-BRL` em cada data com observação em ambas as séries.\n Requer plano Pro.\n\n### Moedas Suportadas\n\nUSD, EUR, GBP, JPY, CHF, CAD, AUD, DKK, NOK, SEK contra BRL e entre si.\n\nPara cotações em tempo real (incluindo cripto), use `/api/v2/currency`.\n\n### Exemplos\n\n```bash\n# Direto\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \\\n \"https://brapi.dev/api/v2/currency/historical?currency=USD-BRL,EUR-BRL\"\n\n# Inverso\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \\\n \"https://brapi.dev/api/v2/currency/historical?currency=BRL-USD\"\n\n# Cross-rate\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \\\n \"https://brapi.dev/api/v2/currency/historical?currency=USD-EUR,GBP-EUR\"\n\n# Período customizado\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \\\n \"https://brapi.dev/api/v2/currency/historical?currency=USD-BRL&startDate=2020-01-01&endDate=2025-12-31\"\n```\n\n**Plano Mínimo:** Startup | **Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Pares de moedas separados por vírgula (ex: USD-BRL,EUR-BRL). Máximo 20.", "example": "USD-BRL,EUR-BRL" }, "required": true, "name": "currency", "in": "query" }, { "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Data de início no formato YYYY-MM-DD.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Data de fim no formato YYYY-MM-DD.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "description": "Ordem das observações pela data. Padrão: desc.", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "Máximo de observações por par. Padrão: 365.", "example": 365 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Histórico de cotações PTAX retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrencyHistoricalResponse" } } } }, "400": { "description": "**Requisição Inválida.** Parâmetros ausentes ou inválidos.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "**Não Autorizado.**", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "**Acesso Proibido.** Plano sem acesso ao módulo de câmbio.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "**Erro Interno.**", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/currency/available": { "get": { "tags": [ "Câmbio" ], "operationId": "getCurrencyAvailable", "summary": "Listar Pares de Moedas Disponíveis", "description": "\nRetorna a lista de pares de moedas disponíveis para consulta no endpoint `/api/v2/currency`.\n\n### Formato:\nORIGEM-DESTINO, onde ORIGEM é o código da moeda de origem e DESTINO a moeda de destino\n\n### Pares Disponíveis:\n* **Moedas Fiduciárias:** USD-BRL, EUR-BRL, GBP-BRL, ARS-BRL, CAD-BRL, AUD-BRL, JPY-BRL, CNY-BRL\n* **Cross Rates:** EUR-USD, GBP-USD\n* **Criptomoedas:** BTC-BRL, ETH-BRL\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/currency/available\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/currency/available?search=USD\"\n```\n\n**Plano Mínimo:** Startup\n**Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Filtrar pares de moedas por nome ou descrição", "example": "USD" }, "required": false, "name": "search", "in": "query" } ], "responses": { "200": { "description": "Lista de pares de moedas disponíveis retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrencyAvailableResponse" } } } } } } }, "/api/v2/dictionary": { "get": { "tags": [ "Utilitários" ], "summary": "Dicionário de Campos da API", "description": "Retorna o dicionário completo de todos os campos disponíveis na API, com nome em português, descrição detalhada e fórmula de cálculo.\n\n### Funcionalidades\n\n* **Busca:** Filtre por nome, descrição, categoria ou endpoint\n* **Categorias:** Agrupe campos por área (fii, treasury, quote, balance-sheet, income-statement, etc.)\n* **Fórmulas:** Veja como cada indicador é calculado\n\n### Exemplos de Uso\n\n```bash\n# Listar todos os campos\ncurl \"https://brapi.dev/api/v2/dictionary\"\n\n# Buscar por termo\ncurl \"https://brapi.dev/api/v2/dictionary?search=patrimônio\"\n\n# Filtrar por categoria\ncurl \"https://brapi.dev/api/v2/dictionary?category=fii\"\n\n# Filtrar campos do Tesouro Direto\ncurl \"https://brapi.dev/api/v2/dictionary?category=treasury\"\n```\n\n### Campos de Cada Entrada\n\n* `key` — Identificador do campo (ex: `dividendYield12m`)\n* `label` — Nome em português (ex: \"Dividend Yield 12 meses\")\n* `description` — Descrição detalhada\n* `calculation` — Fórmula de cálculo (quando aplicável)\n* `endpoints` — Endpoints onde o campo aparece\n* `category` — Categoria do campo\n* `type` — Tipo de dado (number, string, boolean, date)\n* `unit` — Unidade (%, R$, etc.)\n\n### Caso de Uso\n\nIdeal para construir interfaces dinâmicas, tooltips, ou documentação automatizada a partir dos campos da API.\n\n**Plano Mínimo:** Gratuito\n**Autenticação:** Não necessária (Público)", "parameters": [ { "schema": { "type": "string", "description": "Termo de busca para filtrar campos (busca em key, label, description e category)", "example": "patrimônio" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "description": "Filtrar por categoria (ex: fii, treasury, quote, balance-sheet, income-statement)", "example": "treasury" }, "required": false, "name": "category", "in": "query" } ], "responses": { "200": { "description": "Lista de campos do dicionário", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DictionaryResponse" } } } } } } }, "/api/v2/fii/list": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "listFii", "summary": "Listar Fundos Imobiliários", "description": "\nRetorna a lista paginada de todos os Fundos de Investimento Imobiliário (FIIs) registrados, com dados do instrumento e indicadores atuais. Ideal para descobrir novos FIIs, comparar rentabilidades e construir carteiras diversificadas.\n\n### Funcionalidades:\n* **Filtro por símbolos:** Consulte FIIs específicos com `symbols=HGLG11,MXRF11`\n* **Filtro por CNPJs:** Consulte FIIs específicos com `cnpjs=11728688000147`\n* **Busca por nome ou símbolo:** Encontre FIIs rapidamente por texto (ex: \"hglg\" retorna HGLG11)\n* **Filtros por segmento:** Papel (Títulos/CRI), Tijolo (Imóveis físicos), Híbrido (Misto), FOF (Fundo de Fundos)\n* **Filtros por setor:** Logística, Shoppings, Escritórios, Lajes Corporativas, Títulos e Val. Mob., Residencial, Hospital, Hotel, Educacional, Híbrido, Multicategoria, Varejo, Outros\n* **Filtros por mandato:** Renda, Híbrido, Títulos e Valores Mobiliários, etc.\n* **Filtros por tipo de gestão:** Ativa, Definida\n* **Dados do administrador:** Nome, CNPJ, endereço, telefones, site e email informados pela CVM\n* **Ordenação flexível:** Ordene por qualquer campo (DY, P/VP, Preço, Total de Investidores, etc.)\n* **Paginação:** Controle o número de resultados por página\n\n### Autenticação:\nEste endpoint lista o universo de FIIs e requer um token de API válido. Para testar sem token, filtre por símbolos sandbox com **MXRF11** ou **HGLG11**.\n\n### Exemplos de Requisição:\n```bash\n# Listar todos os FIIs (primeiros 20)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/list\"\n\n# Buscar FIIs específicos por símbolo\ncurl \"https://brapi.dev/api/v2/fii/list?symbols=HGLG11,MXRF11\"\n\n# Buscar FII por CNPJ\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/list?cnpjs=11728688000147\"\n\n# Buscar FIIs por nome (ex: HGLG)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/list?search=hglg\"\n\n# Filtrar por setor (Logística) e ordenar por Dividend Yield decrescente\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/list?segmentoAtuacao=Logística&sortBy=dividendYield12m&sortOrder=desc&limit=10\"\n\n# Filtrar por tipo de segmento (Tijolo) e tipo de gestão (Ativa)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/list?segmentType=tijolo&tipoGestao=Ativa&page=1&limit=20\"\n```\n\n### FIIs Populares:\nMXRF11 (Multisegmento), HGLG11 (Logística), KNCR11 (Logística), XPLG11 (Logística), XPML11 (Logística), KNRI11 (Renda), BTLG11 (Logística), VISC11 (Varejo)\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária para listagem completa\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (sem limite rígido; valores altos como 10000 são aceitos)", "example": 20 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "description": "Lista de símbolos de FIIs separados por vírgula. Máximo de 20 símbolos.", "example": "HGLG11,MXRF11" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Lista de CNPJs de FIIs separados por vírgula, com ou sem formatação. Máximo de 20 CNPJs.", "example": "11728688000147" }, "required": false, "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Buscar por nome, símbolo ou CNPJ", "example": "hglg" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "enum": [ "papel", "tijolo", "hibrido", "fof" ], "description": "Tipo de segmento do indicador" }, "required": false, "name": "segmentType", "in": "query" }, { "schema": { "type": "string", "description": "Segmento de atuação (Logística, Shoppings, Escritórios, etc.)" }, "required": false, "name": "segmentoAtuacao", "in": "query" }, { "schema": { "type": "string", "description": "Mandato (Renda, Híbrido, Títulos e Valores Mobiliários, etc.)" }, "required": false, "name": "mandate", "in": "query" }, { "schema": { "type": "string", "description": "Tipo de gestão (Ativa, Definida)" }, "required": false, "name": "tipoGestao", "in": "query" } ], "responses": { "200": { "description": "Lista paginada de FIIs com indicadores retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiListResponse" } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/indicators": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiIndicators", "summary": "Obter Indicadores Fundamentalistas", "description": "\nRetorna os indicadores fundamentalistas mais recentes para um ou mais FIIs. Use este endpoint para análises de valuation, rentabilidade e comparações entre fundos.\n\n### Funcionalidades:\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição (separados por vírgula)\n* **Indicadores de Valuation:** Preço atual, Valor Patrimonial por Cota (VP/Cota), Preço/VP (P/VP)\n* **Indicadores de Rentabilidade:** Dividend Yield 12 meses, Dividend Yield 1 mês, Retorno mensal\n* **Dados de Liquidez:** Total de investidores (cotistas), Cotas emitidas, Patrimônio Líquido, Ativo Total\n* **Classificação:** Tipo de segmento (Papel, Tijolo, Híbrido, FOF)\n* **Dados do administrador:** Nome, CNPJ, endereço, telefones, site e email informados pela CVM\n\n### Campos da Resposta:\n* **price** — Preço atual da cota (R$)\n* **navPerShare** — Valor Patrimonial por Cota (VP/Cota) em R$\n* **priceToNav** — Razão Preço/Valor Patrimonial (P/VP) — valores < 1 indicam desconto\n* **dividendYield12m** — Dividend Yield acumulado nos últimos 12 meses (%)\n* **dividendYield1m** — Dividend Yield do último mês (%)\n* **monthlyReturn** — Retorno mensal (%)\n* **totalInvestors** — Total de investidores (cotistas) do fundo\n* **sharesOutstanding** — Número de cotas emitidas\n* **equity** — Patrimônio Líquido (R$)\n* **totalAssets** — Ativo Total (R$)\n* **segmentType** — Tipo de segmento (papel, tijolo, hibrido, fof)\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Consultar um FII (sem autenticação - teste)\ncurl \"https://brapi.dev/api/v2/fii/indicators?symbols=MXRF11\"\n\n# Consultar múltiplos FIIs\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/indicators?symbols=HGLG11,KNCR11,XPLG11\"\n```\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Indicadores atuais dos FIIs retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiIndicatorsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/indicators/history": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiIndicatorsHistory", "summary": "Obter Histórico de Indicadores", "description": "\nRetorna a série temporal mensal dos indicadores fundamentalistas. Analise tendências de valuation, rentabilidade e crescimento patrimonial ao longo do tempo.\n\n### Funcionalidades:\n* **Histórico desde setembro/2016:** Dados mensais de mais de 8 anos\n* **Granularidade mensal:** Um ponto de dados por mês para cada FII\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição\n* **Filtro por período:** Especifique startDate e endDate (padrão: últimos 12 meses)\n* **Ordenação flexível:** Ordene por qualquer campo (referenceDate, price, DY, P/VP, etc.)\n* **Análises de tendência:** Identifique padrões de rentabilidade, valuation e crescimento\n\n### Campos da Resposta:\nOs mesmos indicadores do endpoint /indicators, com adição de referenceDate (data do último dia do mês de referência).\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Histórico dos últimos 12 meses (padrão)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/indicators/history?symbols=HGLG11,MXRF11\"\n\n# Histórico em período específico (2023-2024)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/indicators/history?symbols=KNCR11&startDate=2023-01-01&endDate=2024-12-31\"\n\n# Histórico ordenado por Dividend Yield decrescente\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/indicators/history?symbols=XPLG11,BTLG11&sortBy=dividendYield12m&sortOrder=desc\"\n```\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico mensal de indicadores retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiIndicatorsHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/historical": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiHistoricalPrice", "summary": "Obter Cotações Históricas (OHLCV)", "description": "\nRetorna a série histórica de preços OHLCV (Abertura, Máxima, Mínima, Fechamento, Volume) diários. Use para backtesting, análise técnica e construção de modelos de previsão.\n\n### Funcionalidades:\n* **Dados OHLCV completos:** Abertura, Máxima, Mínima, Fechamento, Volume, Fechamento Ajustado\n* **Granularidade diária:** Um ponto de dados por dia de negociação\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição\n* **Filtro por período:** Especifique startDate e endDate (padrão: últimos 12 meses)\n* **Ordenação:** Ascendente ou descendente por data\n* **Timestamp UNIX:** Datas em segundos desde 1º de janeiro de 1970\n\n### Campos da Resposta:\n* **date** — Timestamp UNIX em segundos (número inteiro)\n* **open** — Preço de abertura (R$)\n* **high** — Preço máximo do dia (R$)\n* **low** — Preço mínimo do dia (R$)\n* **close** — Preço de fechamento (R$)\n* **volume** — Volume negociado (número de cotas)\n* **adjustedClose** — Preço de fechamento ajustado (R$)\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Histórico dos últimos 12 meses (padrão, ordem decrescente)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/historical?symbols=HGLG11\"\n\n# Histórico em período específico com ordem crescente\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/historical?symbols=MXRF11,KNCR11&startDate=2024-01-01&endDate=2024-12-31&sortOrder=asc\"\n```\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação por data", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Série histórica OHLCV por FII retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiHistoricalResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/portfolio": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiPortfolio", "summary": "Obter Composição da Carteira", "description": "\nRetorna a composição normalizada da carteira dos FIIs a partir dos informes trimestrais da CVM. Use para entender o que um FII possui: CRIs, cotas de outros FIIs, imóveis, direitos e terrenos.\n\n### Funcionalidades:\n* **Resposta agrupada por FII:** Cada fundo vem com resumo, alocações e listas por tipo de ativo.\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição.\n* **Filtro por trimestre:** Use `referenceDate=YYYY-MM-DD`. Sem esse parâmetro, retorna o trimestre mais recente disponível por FII.\n* **Versionamento:** Informes podem ter retificações. Por padrão, retorna apenas a versão mais recente do trimestre retornado. Use `allVersions=true` para todas as versões do trimestre consultado.\n* **Payload sob controle:** `summary` sempre vem. Use `include=allocations`, `include=financialAssets`, `include=fundHoldings`, `include=properties`, `include=lands` ou `include=rights` para escolher listas.\n\n### Campos da Resposta:\n* **summary** — Totais por FII, valor declarado e vacância consolidada dos imóveis.\n* **allocations** — Contagem e valor por classe de ativo.\n* **financialAssets** — CRIs, cotas, SPEs e outros ativos financeiros.\n* **fundHoldings** — Cotas de outros FIIs, útil para FoFs.\n* **properties** — Imóveis físicos com área, endereço, vacância e participação na receita.\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Carteira mais recente do HGLG11\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/portfolio?symbols=HGLG11\"\n\n# Carteira em um trimestre específico\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/portfolio?symbols=HGLG11&referenceDate=2025-03-31\"\n\n# Apenas resumo e alocações\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/portfolio?symbols=HGLG11&include=allocations\"\n```\n\n### Fonte dos Dados:\nCVM (Informe Trimestral FII)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de referência trimestral no formato YYYY-MM-DD. Se omitida, retorna o trimestre mais recente por FII.", "example": "2025-03-31" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "string", "description": "Listas separadas por vírgula: allocations, properties, financialAssets, fundHoldings, lands, rights. summary sempre é retornado. Se omitido, retorna todas as listas.", "example": "allocations,fundHoldings" }, "required": false, "name": "include", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Incluir todas as versões do trimestre retornado (padrão: false, retorna apenas a mais recente)", "example": "false" }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Carteira detalhada dos FIIs retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiPortfolioResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/properties": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiProperties", "summary": "Obter Imóveis e Vacância", "description": "\nRetorna os imóveis físicos dos FIIs com vacância em primeiro plano. Use este endpoint para análise de FIIs de tijolo, galpões, lajes, shoppings e qualquer carteira imobiliária física.\n\n### Funcionalidades:\n* **Vacância consolidada:** `summary.vacancyRate` é ponderada por área quando possível.\n* **Imóveis item a item:** Nome, endereço, área, unidades, vacância, inadimplência e participação na receita.\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição.\n* **Filtro por trimestre:** Use `referenceDate=YYYY-MM-DD`. Sem esse parâmetro, retorna o trimestre mais recente disponível por FII.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/properties?symbols=HGLG11\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/properties?symbols=HGLG11,MXRF11&referenceDate=2026-03-31\"\n```\n\n### Fonte dos Dados:\nCVM (Informe Trimestral FII)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de referência trimestral no formato YYYY-MM-DD. Se omitida, retorna o trimestre mais recente por FII.", "example": "2026-03-31" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "revenueShare", "area", "vacancyRate", "name" ], "default": "revenueShare", "description": "Campo para ordenar os imóveis. Padrão: revenueShare.", "example": "revenueShare" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação dos imóveis.", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Incluir todas as versões do trimestre retornado (padrão: false, retorna apenas a mais recente)", "example": "false" }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Imóveis e vacância dos FIIs retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiPropertiesResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/properties/history": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiPropertiesHistory", "summary": "Histórico de Imóveis e Vacância", "description": "\nRetorna a série trimestral compacta dos imóveis e da vacância dos FIIs. Use este endpoint para gráficos e comparações de vacância, área total e quantidade de imóveis ao longo do tempo.\n\n### Funcionalidades:\n* **Série trimestral:** Um ponto por FII, trimestre e versão do informe.\n* **Resumo compacto:** Retorna apenas `summary` por trimestre, sem a lista completa de imóveis.\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição.\n* **Filtro por período:** Use `startDate=YYYY-MM-DD` e `endDate=YYYY-MM-DD`. O padrão são os últimos 12 meses.\n* **Versionamento:** Por padrão retorna a versão mais recente de cada trimestre. Use `allVersions=true` para incluir retificações.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/properties/history?symbols=HGLG11\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/properties/history?symbols=HGLG11,XPLG11&startDate=2024-01-01&endDate=2026-03-31\"\n```\n\n### Fonte dos Dados:\nCVM (Informe Trimestral FII)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Incluir todas as versões de cada trimestre (padrão: false, retorna apenas a mais recente)", "example": "false" }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Histórico trimestral de imóveis e vacância retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiPropertiesHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/portfolio/history": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiPortfolioHistory", "summary": "Histórico da Carteira", "description": "\nRetorna a série trimestral compacta da composição da carteira dos FIIs. Use este endpoint para acompanhar evolução de alocação, valor declarado, quantidade de ativos, imóveis e exposição por classe ao longo do tempo.\n\n### Funcionalidades:\n* **Série trimestral:** Um ponto por FII, trimestre e versão do informe.\n* **Resumo de carteira:** Retorna `summary` e `allocations`, sem listas detalhadas de ativos.\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição.\n* **Filtro por período:** Use `startDate=YYYY-MM-DD` e `endDate=YYYY-MM-DD`. O padrão são os últimos 12 meses.\n* **Versionamento:** Por padrão retorna a versão mais recente de cada trimestre. Use `allVersions=true` para incluir retificações.\n\n### Exemplos de Requisição:\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/portfolio/history?symbols=HGLG11\"\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/portfolio/history?symbols=HGLG11,MXRF11&startDate=2024-01-01&endDate=2026-03-31\"\n```\n\n### Fonte dos Dados:\nCVM (Informe Trimestral FII)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Incluir todas as versões de cada trimestre (padrão: false, retorna apenas a mais recente)", "example": "false" }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Histórico trimestral da carteira retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiPortfolioHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/reports": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiReports", "summary": "Obter Relatórios Gerenciais", "description": "\nRetorna os relatórios gerenciais mensais publicados na CVM, com composição patrimonial detalhada. Analise a alocação de ativos, estrutura de passivos e evolução do patrimônio dos FIIs.\n\n### Funcionalidades:\n* **Relatórios mensais:** Um relatório por mês para cada FII\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição\n* **Filtro por período:** Especifique startDate e endDate (padrão: últimos 12 meses)\n* **Versionamento:** Relatórios podem ter múltiplas versões (retificações). Por padrão, retorna apenas a mais recente. Use `allVersions=true` para todas as versões.\n* **Paginação:** Controle o número de resultados por página\n* **Ordenação:** Ordene por qualquer campo (referenceDate, totalAssets, equity, etc.)\n\n### KPIs Inclusos:\n* **Ativo Total** — Patrimônio total do fundo (R$)\n* **Patrimônio Líquido** — Equity (R$)\n* **Cotas** — Número de cotas emitidas\n* **VP/Cota** — Valor Patrimonial por Cota (R$)\n* **Taxa de Administração** — Taxa anual (%)\n* **Retorno Mensal** — Retorno do mês (%)\n* **Dividend Yield Mensal** — DY do mês (%)\n* **Total de Investidores** — Número de cotistas\n\n### Composição de Ativos:\n* **Caixa** — Disponibilidades (R$)\n* **Títulos Públicos** — Tesouro Direto, LTN, etc. (R$)\n* **Títulos Privados** — Debêntures, CDB, etc. (R$)\n* **Fundos RF** — Fundos de Renda Fixa (R$)\n* **Imóveis** — Propriedades físicas (R$)\n* **CRI** — Certificados de Recebíveis Imobiliários (R$)\n* **LCI** — Letras de Crédito Imobiliário (R$)\n* **Cotas de FIIs** — Investimentos em outros FIIs (R$)\n* **Recebíveis** — Aluguéis, rendas a receber (R$)\n\n### Composição de Passivos:\n* **Distribuições a Pagar** — Proventos não pagos (R$)\n* **Taxas Admin a Pagar** — Taxas de administração (R$)\n* **Obrigações Imobiliárias** — Financiamentos, empréstimos (R$)\n* **Total de Passivos** — Soma de todas as obrigações (R$)\n\n### Administrador:\n* **administratorName** — Nome da instituição administradora\n* **administratorCnpj** — CNPJ da instituição administradora\n* **administratorAddress**, **administratorAddressNumber**, **administratorAddressComplement** — Endereço informado à CVM\n* **administratorDistrict**, **administratorCity**, **administratorState**, **administratorZipCode** — Localização do administrador\n* **administratorPhone1**, **administratorPhone2**, **administratorPhone3** — Telefones de contato\n* **administratorWebsite**, **administratorEmail** — Site e email de contato\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Relatórios dos últimos 12 meses (apenas versão mais recente)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/reports?symbols=HGLG11\"\n\n# Relatórios em período específico com paginação\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/reports?symbols=MXRF11,KNCR11&startDate=2024-01-01&endDate=2024-12-31&page=1&limit=10\"\n\n# Todas as versões dos relatórios (incluindo retificações)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/reports?symbols=XPLG11&allVersions=true&sortBy=referenceDate&sortOrder=desc\"\n```\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (sem limite rígido; valores altos como 10000 são aceitos)", "example": 20 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Incluir todas as versões dos relatórios (padrão: false, retorna apenas a mais recente)", "example": "false" }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Relatórios mensais paginados dos FIIs retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiReportsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/dividends": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiDividends", "summary": "Obter Histórico de Proventos", "description": "\nRetorna o histórico de pagamentos de proventos (Rendimentos, Amortizações) dos FIIs. Analise a rentabilidade histórica e padrões de distribuição de cada fundo.\n\n### Funcionalidades:\n* **Histórico completo:** Rendimentos e amortizações desde a criação do fundo\n* **Múltiplos FIIs:** Consulte até 20 FIIs em uma única requisição\n* **Filtro por período:** Especifique startDate e endDate (padrão: últimos 12 meses)\n* **Ordenação:** Ordene por data de pagamento, taxa, data de aprovação, etc.\n* **Tipos de proventos:** Rendimentos (distribuições mensais) e Amortizações (devolução de capital)\n\n### Campos da Resposta:\n* **symbol** — Ticker do FII\n* **label** — Tipo do provento (RENDIMENTO, AMORTIZAÇÃO)\n* **rate** — Valor por cota distribuído (R$)\n* **paymentDate** — Data efetiva de pagamento quando disponível; quando a data real não estiver disponível, pode usar a data de referência informada pela CVM\n* **lastDatePrior** — Data-com (último dia para ter direito ao provento)\n* **approvedOn** — Data de aprovação do provento\n* **relatedTo** — Período relacionado (quando aplicável)\n* **isinCode** — Código ISIN (quando aplicável)\n* **remarks** — Observações sobre a origem do registro, quando aplicável\n\n### Importante:\nQuando disponível, `paymentDate` representa a data efetiva de pagamento. Para alguns fundos e períodos, a CVM informa apenas a data de referência do relatório; nesses casos, `paymentDate` pode coincidir com essa referência.\n\n### Autenticação:\nOs FIIs **MXRF11** e **HGLG11** podem ser consultados sem autenticação para testes. Para acessar outros FIIs, é necessário um token de API válido.\n\n### Exemplos de Requisição:\n```bash\n# Histórico de proventos dos últimos 12 meses\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/dividends?symbols=HGLG11\"\n\n# Histórico em período específico, ordenado por data decrescente\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/fii/dividends?symbols=MXRF11,KNCR11&startDate=2023-01-01&endDate=2024-12-31&sortBy=paymentDate&sortOrder=desc\"\n```\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Pro\n**Autenticação:** Necessária (exceto MXRF11 e HGLG11)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos separados por vírgula (máximo 20). Exemplo: HGLG11,MXRF11", "example": "HGLG11,MXRF11" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico de rendimentos dos FIIs retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FiiDividendsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/financials": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiFinancials", "summary": "Relatórios financeiros DFIN de FIIs", "description": "Consulta dados financeiros estruturados de FIIs provenientes dos documentos DFIN oficiais da CVM. Aceita símbolo ou CNPJ.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos de FIIs separados por vírgula (máximo 20)", "example": "HGLG11,MXRF11" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "11728688000147" }, "required": false, "name": "cnpjs", "in": "query" }, { "schema": { "type": "integer", "nullable": true, "description": "Ano do documento", "example": 2025 }, "required": false, "name": "year", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2025-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo de ordenação: referenceDate, symbol, cnpj, year", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Relatórios financeiros", "content": { "application/json": { "schema": { "type": "object", "properties": { "financials": { "type": "array", "items": { "$ref": "#/components/schemas/FiiFinancialReport" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "financials", "pagination", "requestedAt", "took" ] } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/fii/annual-reports": { "get": { "tags": [ "Fundos Imobiliários" ], "operationId": "getFiiAnnualReports", "summary": "Informes anuais de FIIs", "description": "Consulta informes anuais oficiais de FIIs da CVM. FIAGRO, FI-Infra, FIDC e FIP permanecem em endpoints próprios.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos de FIIs separados por vírgula (máximo 20)", "example": "HGLG11,MXRF11" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "11728688000147" }, "required": false, "name": "cnpjs", "in": "query" }, { "schema": { "type": "integer", "nullable": true, "description": "Ano do documento", "example": 2025 }, "required": false, "name": "year", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2025-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2025-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "description": "Campo de ordenação: referenceDate, symbol, cnpj, year", "example": "referenceDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "description": "Seções opcionais conforme estrutura do informe anual", "example": "summary,governance" }, "required": false, "name": "include", "in": "query" } ], "responses": { "200": { "description": "Informes anuais", "content": { "application/json": { "schema": { "type": "object", "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/FiiAnnualReport" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "reports", "pagination", "requestedAt", "took" ] } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/list": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Lista fundos brasileiros por símbolo, CNPJ, busca e tipo", "description": "Descobre FIIs, FIAGROs, FI-Infra/FIFs, FIDCs, FIPs e outros fundos a partir da identidade canônica de fundos.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "enum": [ "fii", "fiagro", "fiinfra", "fif", "fidc", "fip", "etf", "other" ] }, "required": false, "name": "assetType", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "status", "in": "query" } ], "responses": { "200": { "description": "Fundos encontrados", "content": { "application/json": { "schema": { "type": "object", "properties": { "funds": { "type": "array", "items": { "$ref": "#/components/schemas/FundListItem" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "funds", "pagination", "requestedAt", "took" ] }, "example": { "funds": [ { "symbol": "JURO11", "cnpj": "42730834000100", "formattedCnpj": "42.730.834/0001-00", "name": "SPARTA INFRA", "legalName": "SPARTA INFRA FIC FI INFRA RENDA FIXA CP", "assetType": "fiinfra", "cvmClassType": null, "cvmClassification": null, "anbimaClassification": null, "b3Classification": "Financeiro/Fundos/FI-INFRA", "isin": null, "administratorName": null, "administratorCnpj": null, "managerName": null, "managerCnpj": null, "status": null, "price": 96.99, "navPerShare": 99.19945, "priceToNav": 0.9777272, "equity": 2040699000, "totalAssets": 2041704100, "totalInvestors": 92710, "updatedAt": "2026-06-21T21:06:37.434Z" } ], "pagination": { "page": 1, "limit": 20, "totalItems": 1, "totalPages": 1, "hasNextPage": false }, "requestedAt": "2026-06-22T02:10:56.319Z", "took": 902 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/indicators": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Indicadores atuais de fundos", "description": "Retorna indicadores atuais para fundos específicos. Use `/api/v2/funds/list` para descobrir fundos antes de consultar indicadores.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "enum": [ "fii", "fiagro", "fiinfra", "fif", "fidc", "fip", "etf", "other" ] }, "required": false, "name": "assetType", "in": "query" } ], "responses": { "200": { "description": "Indicadores", "content": { "application/json": { "schema": { "type": "object", "properties": { "funds": { "type": "array", "items": { "$ref": "#/components/schemas/FundIndicator" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "funds", "requestedAt", "took" ] }, "example": { "funds": [ { "symbol": "JURO11", "cnpj": "42730834000100", "name": "SPARTA INFRA", "assetType": "fiinfra", "asOfDate": "2026-06-18T00:00:00.000Z", "price": 96.99, "navPerShare": 99.19945, "priceToNav": 0.9777272, "equity": 2040699000, "totalAssets": 2041704100, "totalInvestors": 92710, "dailyApplications": 0, "dailyRedemptions": 0, "sharesOutstanding": null, "monthlyReturn": null, "patrimonialMonthlyReturn": null, "dividendYieldMonthly": null } ], "requestedAt": "2026-06-22T02:10:56.524Z", "took": 189 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/nav/history": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Histórico do valor patrimonial por cota", "description": "Retorna a série do valor patrimonial por cota para fundos. FI/FIF usam informes diários; FIDCs usam informes mensais por classe ou série, incluindo a rentabilidade mensal oficial.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico do valor da cota", "content": { "application/json": { "schema": { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/components/schemas/FundNavHistory" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "history", "pagination", "requestedAt", "took" ] }, "example": { "history": [ { "symbol": "JURO11", "cnpj": "42730834000100", "date": "2026-06-18T00:00:00.000Z", "classOrSeries": null, "totalAssets": 2041704100, "navPerShare": 99.19945, "equity": 2040699000, "dailyApplications": 0, "dailyRedemptions": 0, "totalInvestors": 92710, "monthlyReturn": null }, { "symbol": "JURO11", "cnpj": "42730834000100", "date": "2026-06-17T00:00:00.000Z", "classOrSeries": null, "totalAssets": 2044940400, "navPerShare": 99.36075, "equity": 2044017200, "dailyApplications": 0, "dailyRedemptions": 0, "totalInvestors": 92779, "monthlyReturn": null } ], "pagination": { "page": 1, "limit": 20, "totalItems": 114, "totalPages": 6, "hasNextPage": true }, "requestedAt": "2026-06-22T02:10:56.827Z", "took": 300 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/profile": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Perfil mensal CVM FI/FIF", "description": "Retorna perfil mensal de investidores, risco, liquidez, concentração e crédito privado.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "include", "in": "query" } ], "responses": { "200": { "description": "Perfis", "content": { "application/json": { "schema": { "type": "object", "properties": { "profiles": { "type": "array", "items": { "$ref": "#/components/schemas/FundProfile" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "profiles", "requestedAt", "took" ] }, "example": { "profiles": [ { "symbol": "JURO11", "cnpj": "42730834000100", "referenceDate": "2026-05-31T00:00:00.000Z", "investorBreakdown": { "other": 0, "fundsOrClubs": 1, "nonResidents": 0, "otherPercent": 0, "legalEntities": 0, "individualRetail": 0, "fundsOrClubsPercent": 100, "nonResidentsPercent": 0, "legalEntitiesPercent": 0, "individualRetailPercent": 0 }, "risk": { "riskModel": "Modelos Não-Paramétricos", "portfolioVar": 0, "dailyQuotaVariationPercent": 0, "privateCreditExposurePercent": 0, "stressedDailyQuotaVariationPercent": 0 }, "liquidity": null, "concentration": { "topCotistaPercent": 0 }, "privateCredit": { "exposurePercent": 0 } } ], "requestedAt": "2026-06-22T02:10:56.983Z", "took": 152 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/dividends": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Dividendos oficiais de fundos listados não-FII", "description": "Retorna eventos exatos de dividendos/rendimentos para FIAGRO, FI-Infra/FIF, FIDC e FIP listados quando a fonte oficial fornece data de declaração, data-com/ex, data de pagamento, valor por cota e rótulo. Os filtros startDate/endDate usam a data de pagamento (`paymentDate`). FIIs continuam no endpoint dedicado `/api/v2/fii/dividends`. Este endpoint não inventa datas a partir de relatórios mensais e não expõe metadados internos de fonte.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string", "enum": [ "lastDatePrior", "paymentDate", "declaredDate", "symbol", "rate" ], "default": "paymentDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "enum": [ "fiagro", "fiinfra", "fif", "fidc", "fip", "other" ] }, "required": false, "name": "assetType", "in": "query" } ], "responses": { "200": { "description": "Dividendos oficiais", "content": { "application/json": { "schema": { "type": "object", "properties": { "dividends": { "type": "array", "items": { "$ref": "#/components/schemas/FundDividend" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "dividends", "pagination", "requestedAt", "took" ] }, "example": { "dividends": [ { "symbol": "JURO11", "cnpj": "42730834000100", "assetType": "fiinfra", "declaredDate": "2026-05-29T00:00:00.000Z", "lastDatePrior": "2026-05-29T00:00:00.000Z", "paymentDate": "2026-06-13T00:00:00.000Z", "rate": 0.5, "label": "RENDIMENTO", "isinCode": "BRJUROCTF002" } ], "pagination": { "page": 1, "limit": 20, "totalItems": 1, "totalPages": 1, "hasNextPage": false }, "requestedAt": "2026-06-22T02:10:56.983Z", "took": 152 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/fiagro/reports": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Relatórios mensais FIAGRO", "description": "Retorna relatórios mensais FIAGRO com patrimônio, cotistas, rentabilidade e valores a distribuir.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "XPCA11" }, "required": false, "example": "XPCA11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "41269527000101" }, "required": false, "example": "41269527000101", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" }, { "schema": { "type": "boolean", "nullable": true, "default": false }, "required": false, "name": "allVersions", "in": "query" } ], "responses": { "200": { "description": "Relatórios FIAGRO", "content": { "application/json": { "schema": { "type": "object", "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/FiagroReport" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "reports", "pagination", "requestedAt", "took" ] }, "example": { "reports": [ { "symbol": "XPCA11", "cnpj": "41269527000101", "name": "XP CRÉDITO AGRÍCOLA-FUNDO DE INVESTIMENTO NAS CADEIAS PROD", "referenceDate": "2026-05-01T00:00:00.000Z", "version": 1, "isin": "BRXPCACTF004", "market": "BOLSA", "administratorName": "XP INVESTIMENTOS CORRETORA DE CÂMBIO, TÍTULOS E VAL MOB S/A", "managerName": "XP VISTA ASSET MANAGEMENT LTDA.", "totalAssets": 492323580, "netEquity": 487325340, "sharesOutstanding": 45523076, "navPerShare": 10.71, "totalInvestors": 94254, "monthlyReturn": 0.11, "patrimonialMonthlyReturn": -0.92, "dividendYieldMonthly": 1.03, "amortizationRateMonthly": 0, "liquidityNeeds": null, "incomeToDistribute": 4567754.5, "totalLiabilities": 4998232 } ], "pagination": { "page": 1, "limit": 20, "totalItems": 5, "totalPages": 1, "hasNextPage": false }, "requestedAt": "2026-06-22T02:10:57.433Z", "took": 293 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/fiagro/portfolio": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Carteira e alocação FIAGRO", "description": "Retorna resumo de patrimônio, alocações, investidores e passivos do FIAGRO.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "XPCA11" }, "required": false, "example": "XPCA11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "41269527000101" }, "required": false, "example": "41269527000101", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "boolean", "nullable": true, "default": false }, "required": false, "name": "allVersions", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "include", "in": "query" } ], "responses": { "200": { "description": "Carteiras FIAGRO", "content": { "application/json": { "schema": { "type": "object", "properties": { "funds": { "type": "array", "items": { "$ref": "#/components/schemas/FiagroPortfolio" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "funds", "requestedAt", "took" ] }, "example": { "funds": [ { "symbol": "XPCA11", "cnpj": "41269527000101", "referenceDate": "2026-05-01T00:00:00.000Z", "summary": { "netEquity": 487325339.56, "totalAssets": 492323571.36, "totalInvested": 460334438.28, "liquidityNeeds": null, "totalLiabilities": 4998231.8 }, "allocations": { "cpr": 0, "cra": 299574550.49, "fii": 0, "fip": 10045714.33, "lca": 0, "lci": 0, "cdca": 0, "fidc": 99610927.4, "fiagro": 42988149.25, "ruralRealEstate": 0 }, "investors": { "total": 94254, "individuals": 94165, "nonResidents": 6, "financialCompanies": 0, "nonFinancialCompanies": 79 }, "liabilities": { "adminFeesPayable": 354189.17, "totalLiabilities": 4998231.8, "incomeToDistribute": 4567754.46 } } ], "requestedAt": "2026-06-22T02:10:57.586Z", "took": 146 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/portfolio": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Carteira oficial CVM CDA para fundos FI/FIF", "description": "Retorna carteira oficial CVM CDA agrupada por títulos públicos, cotas de fundos, crédito privado, recebíveis e valores a pagar.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)", "example": "JURO11" }, "required": false, "example": "JURO11", "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "42730834000100" }, "required": false, "example": "42730834000100", "name": "cnpjs", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "include", "in": "query" } ], "responses": { "200": { "description": "Carteiras", "content": { "application/json": { "schema": { "type": "object", "properties": { "funds": { "type": "array", "items": { "$ref": "#/components/schemas/FundPortfolio" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "funds", "requestedAt", "took" ] }, "example": { "funds": [ { "symbol": "JURO11", "cnpj": "42730834000100", "name": "SPARTA INFRA FI EM COTAS DE FUNDOS INCENTIVADOS DE INVESTIMENTO EM INFRAESTRUTURA RENDA FIXA", "referenceDate": "2026-05-31T00:00:00.000Z", "summary": { "marketValue": 2083851261, "holdingsCount": 7, "publicBondsValue": 6403800, "fundHoldingsValue": 2053162240, "creditAssetsValue": 0, "listedSecuritiesValue": 0, "receivablesValue": 12371910, "payablesValue": 11913311 }, "publicBonds": [ { "bucket": "publicBonds", "assetType": "Título público federal", "assetName": "NOTAS DO TESOURO NACIONAL SERIE B", "issuerName": null, "issuerCnpj": null, "isin": "BRSTNCNTB716", "selicCode": "760199", "quantity": 1434, "marketValue": 6403800, "costValue": null, "maturityDate": "2029-05-15T00:00:00.000Z", "confidential": false, "details": { "applicationType": "Operações Compromissadas", "negotiationType": "Para negociação", "issueDate": "2024-01-17T00:00:00.000Z", "relatedIssuer": false, "fundClassType": "CLASSES - FIF" } } ], "fundHoldings": [ { "bucket": "fundHoldings", "assetType": "Fundo de Investimento e de Cotas", "assetName": "SPARTA INFRA MASTER VI FUNDO INCENTIVADO DE INVESTIMENTO EM INFRAESTRUTURA RENDA FIXA", "issuerName": null, "issuerCnpj": "54773359000120", "isin": null, "selicCode": null, "quantity": 9950000, "marketValue": 972734460, "costValue": null, "maturityDate": null, "confidential": false, "details": { "applicationType": "Cotas de Fundos", "relatedIssuer": true, "fundClassType": "CLASSES - FIF" } } ], "creditAssets": [], "listedSecurities": [], "receivables": [ { "bucket": "receivables", "assetType": "Outros", "assetName": "VALORES A RECEBER", "issuerName": null, "issuerCnpj": null, "isin": null, "selicCode": null, "quantity": null, "marketValue": 12371910, "costValue": null, "maturityDate": null, "confidential": false, "details": { "applicationType": "Valores a receber", "negotiationType": "Para negociação", "fundClassType": "CLASSES - FIF" } } ], "payables": [ { "bucket": "payables", "assetType": "Outros", "assetName": "VALORES A PAGAR", "issuerName": null, "issuerCnpj": null, "isin": null, "selicCode": null, "quantity": null, "marketValue": 11913311, "costValue": null, "maturityDate": null, "confidential": false, "details": { "applicationType": "Valores a pagar", "negotiationType": "Para negociação", "fundClassType": "CLASSES - FIF" } } ], "confidentialSummary": null } ], "requestedAt": "2026-06-22T02:10:57.134Z", "took": 147 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/fidc/reports": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Relatórios mensais FIDC", "description": "Retorna relatórios mensais FIDC com ativos, carteira, patrimônio líquido, classe e condomínio.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "05754060000113" }, "required": false, "example": "05754060000113", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Relatórios FIDC", "content": { "application/json": { "schema": { "type": "object", "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/FidcReport" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "reports", "pagination", "requestedAt", "took" ] }, "example": { "reports": [ { "symbol": null, "cnpj": "05754060000113", "name": "CATERPILLAR FUNDO DE INVESTIMENTO EM DIREITOS CREDITÓRIOS DO SEGMENTO INDUSTRIAL II - RESP LIMITADA", "referenceDate": "2026-05-31T00:00:00.000Z", "administratorName": "BEM - DISTRIBUIDORA DE TITULOS E VALORES MOBILIARIOS LTDA.", "class": null, "condominiumType": "ABERTO", "assets": 1642889200, "portfolioValue": 1642755000, "netEquity": 1642653000, "averageNetEquity": 1620125200, "liabilities": 236119.5 } ], "pagination": { "page": 1, "limit": 20, "totalItems": 5, "totalPages": 1, "hasNextPage": false }, "requestedAt": "2026-06-22T02:10:57.882Z", "took": 292 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/fidc/portfolio": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Carteira, risco e cotistas FIDC", "description": "Retorna carteira, vencimentos, inadimplência, risco, cotistas e cedentes do FIDC.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "05754060000113" }, "required": false, "example": "05754060000113", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "referenceDate", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "include", "in": "query" } ], "responses": { "200": { "description": "Carteira FIDC", "content": { "application/json": { "schema": { "type": "object", "properties": { "funds": { "type": "array", "items": { "$ref": "#/components/schemas/FidcPortfolio" } }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "funds", "requestedAt", "took" ] }, "example": { "funds": [ { "symbol": null, "cnpj": "05754060000113", "referenceDate": "2026-05-31T00:00:00.000Z", "sectors": { "brand": 0, "finance": 0, "commerce": 0, "industry": 0, "judicial": 0, "services": 1265864074.47, "factoring": 0, "realEstate": 0, "agribusiness": 0, "creditRights": 0, "publicSector": 0 }, "maturityBuckets": { "upTo30Days": 695649558.05, "upTo60Days": 570214516.42, "upTo90Days": 0, "upTo120Days": 0, "upTo150Days": 0, "upTo180Days": 0, "upTo360Days": 0, "upTo720Days": 0, "over1080Days": 0, "upTo1080Days": 0 }, "delinquencyBuckets": { "upTo30Days": 0, "upTo60Days": 0, "upTo90Days": 0, "upTo120Days": 0, "upTo150Days": 0, "upTo180Days": 0, "upTo360Days": 0, "upTo720Days": 0, "over1080Days": 0, "upTo1080Days": 0 }, "riskBuckets": { "debtorA": 0, "debtorB": 0, "debtorC": 0, "debtorD": 0, "debtorE": 0, "debtorF": 0, "debtorG": 0, "debtorH": 0, "debtorAA": 1265864074.47 }, "quotaClasses": [ { "investors": 1, "quotaCount": 27809423.4357832, "quotaValue": 59.0682179, "classOrSeries": "Subclasse Senior Subclasse 1" } ], "investors": { "seniorPf": 0, "subordinatedPf": 0, "seniorNonResident": 1, "subordinatedNonResident": 0, "seniorFinancialInstitution": 0, "subordinatedFinancialInstitution": 0 }, "cedentes": { "top1Cnpj": "61064911000177", "top2Cnpj": "61064911001734", "top1Percent": 65.78, "top2Percent": 11.29 } } ], "requestedAt": "2026-06-22T02:10:58.032Z", "took": 145 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/funds/fip/reports": { "get": { "tags": [ "Fundos" ], "security": [ { "Bearer": [] } ], "summary": "Relatórios estruturados FIP", "description": "Retorna relatórios trimestrais e quadrimestrais FIP com patrimônio, capital, cotas e composição de investidores em campos normalizados.", "parameters": [ { "schema": { "type": "string", "description": "Símbolos B3 separados por vírgula (máximo 20)" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "CNPJs separados por vírgula, com ou sem formatação", "example": "06033235000166" }, "required": false, "example": "06033235000166", "name": "cnpjs", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD", "example": "2026-01-01" }, "required": false, "example": "2026-01-01", "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD", "example": "2026-06-30" }, "required": false, "example": "2026-06-30", "name": "endDate", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "example": 1, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página (padrão 20). Sem limite rígido; valores altos são aceitos.", "example": 20 }, "required": false, "example": 20, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "example": "desc", "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "enum": [ "trimestral", "quadrimestral" ] }, "required": false, "name": "reportType", "in": "query" } ], "responses": { "200": { "description": "Relatórios FIP", "content": { "application/json": { "schema": { "type": "object", "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/FipReport" } }, "pagination": { "$ref": "#/components/schemas/FundPaginationMeta" }, "requestedAt": { "type": "string", "format": "date-time", "description": "Data e hora da requisição em formato ISO 8601", "example": "2025-01-24T17:32:38.000Z" }, "took": { "type": "integer", "minimum": 0, "description": "Tempo de processamento em milissegundos", "example": 45 } }, "required": [ "reports", "pagination", "requestedAt", "took" ] }, "example": { "reports": [ { "symbol": null, "cnpj": "06033235000166", "name": "CRT FIP - MULTIESTRATÉGIA", "reportType": "quadrimestral", "referenceDate": "2026-04-30T00:00:00.000Z", "netEquity": 28866473.76, "targetAudience": "Investidores qualificados", "isInvestmentEntity": true, "investedInOtherFips": 0, "capital": { "committed": 13162950.24, "subscribed": 13162950.24, "paidIn": 13162950.24 }, "quotas": { "subscribed": 103, "paidIn": 13162950.24 }, "quotaClass": { "name": "1", "fundType": "CLASSES - FIP", "subscribedQuotas": 103, "paidInQuotas": 103, "quotaValue": 280257.02679611, "investors": 1, "hasDistinctEconomicRights": false, "hasSpecialPoliticalRights": false }, "investorComposition": { "totalInvestors": 1, "totalSubscribedQuotaPercent": 100, "byType": { "closedPensionFunds": { "investors": 1, "subscribedQuotaPercent": 100 } } } } ], "pagination": { "page": 1, "limit": 20, "totalItems": 1, "totalPages": 1, "hasNextPage": false }, "requestedAt": "2026-06-22T02:10:58.323Z", "took": 288 } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/expirations": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionExpirations", "summary": "Vencimentos", "description": "Lista os vencimentos disponíveis das opções sobre um futuro.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo (ex.: `BGI`, `ICF`).", "example": "BGI" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "`true` inclui vencimentos passados. Padrão: `false`." }, "required": false, "name": "includeExpired", "in": "query" } ], "responses": { "200": { "description": "Vencimentos.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionExpirationsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/strikes": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionStrikes", "summary": "Strikes", "description": "Lista os strikes disponíveis para um ativo num vencimento. Filtra por call ou put.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo (ex.: `BGI`).", "example": "BGI" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD).", "example": "2026-06-30" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por `call` ou `put`." }, "required": false, "name": "side", "in": "query" } ], "responses": { "200": { "description": "Strikes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionStrikesResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/chain": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionChain", "summary": "Cadeia (calls + puts)", "description": "Cadeia completa de calls e puts de um vencimento, com o último preço de cada série.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo (ex.: `BGI`).", "example": "BGI" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD).", "example": "2026-06-30" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "description": "Data da cotação (YYYY-MM-DD). Padrão: último pregão." }, "required": false, "name": "date", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por `call` ou `put`." }, "required": false, "name": "side", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike mínimo (em reais)." }, "required": false, "name": "minStrike", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike máximo (em reais)." }, "required": false, "name": "maxStrike", "in": "query" } ], "responses": { "200": { "description": "Cadeia.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionChainResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/historical": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionHistorical", "summary": "Histórico da opção", "description": "Série diária de uma opção sobre futuro, com OHLC e volume.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código da opção (ex.: `BGIM26C028000`).", "example": "BGIM26C028000" }, "required": true, "name": "symbol", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial (YYYY-MM-DD). Padrão: 12 meses atrás.", "example": "2026-05-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final (YYYY-MM-DD). Padrão: hoje.", "example": "2026-06-01" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionHistoricalResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/analytics": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionAnalytics", "summary": "Gregas e IV", "description": "Retorna volatilidade implícita e gregas EOD calculadas para opções sobre futuros de um vencimento. Opções europeias usam Black-76; opções americanas usam aproximação binomial sobre futuros. Quando não há dados suficientes, os campos calculados ficam `null` e `nullReason` explica o motivo.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo (ex.: `BGI`).", "example": "BGI" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento (YYYY-MM-DD).", "example": "2026-06-30" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "description": "Data da cotação (YYYY-MM-DD). Padrão: último pregão." }, "required": false, "name": "date", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por `call` ou `put`." }, "required": false, "name": "side", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike mínimo (em reais)." }, "required": false, "name": "minStrike", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike máximo (em reais)." }, "required": false, "name": "maxStrike", "in": "query" }, { "schema": { "type": "integer", "minimum": 1, "maximum": 500, "description": "Limita a quantidade de séries retornadas na cadeia analítica. Padrão: todas as séries do filtro.", "example": 50 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Análises.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionAnalyticsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/options/analytics/history": { "get": { "tags": [ "Opções sobre Futuros" ], "operationId": "getFutureOptionAnalyticsHistory", "summary": "Histórico de gregas e IV", "description": "Retorna a série temporal EOD de volatilidade implícita e gregas calculadas para uma única opção sobre futuro.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código da opção (ex.: `BGIM26C028000`).", "example": "BGIM26C028000" }, "required": true, "name": "symbol", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial (YYYY-MM-DD). Padrão: 12 meses atrás.", "example": "2026-05-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final (YYYY-MM-DD). Padrão: hoje.", "example": "2026-06-01" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico de análises.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureOptionAnalyticsHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/list": { "get": { "tags": [ "Futuros" ], "operationId": "getFutureList", "summary": "Listar contratos futuros", "description": "Retorna a lista de contratos futuros, com filtros por ativo, segmento e vencimento.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Filtra por código do ativo (ex.: `WIN`, `BGI`, `DI1`).", "example": "BGI" }, "required": false, "name": "asset", "in": "query" }, { "schema": { "type": "string", "enum": [ "financial", "agribusiness" ], "description": "Filtra por segmento." }, "required": false, "name": "segment", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "`true` inclui contratos vencidos. Padrão: `false`." }, "required": false, "name": "includeExpired", "in": "query" }, { "schema": { "type": "integer", "minimum": 1, "default": 1, "description": "Número da página (começa em 1)." }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50, "description": "Itens por página (máx. 100)." }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "enum": [ "symbol", "expirationDate", "underlyingAsset" ], "default": "expirationDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Lista de contratos.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureListResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/quote": { "get": { "tags": [ "Futuros" ], "operationId": "getFutureQuotes", "summary": "Cotação do dia", "description": "Retorna a cotação do último pregão para os contratos pedidos. Máx. 20 símbolos por requisição.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Contratos separados por vírgula (máx. 20).", "example": "WINM26,BGIF27,DI1F27" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Cotações.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureQuoteResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/specs": { "get": { "tags": [ "Futuros" ], "operationId": "getFutureSpecs", "summary": "Especificações do contrato", "description": "Retorna só os dados do contrato (vencimento, multiplicador, lote, ISIN), sem preço.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Contratos separados por vírgula (máx. 20).", "example": "WINM26,BGIF27,DI1F27" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Especificações.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureSpecsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/historical": { "get": { "tags": [ "Futuros" ], "operationId": "getFutureHistorical", "summary": "Histórico do contrato", "description": "Série diária de um contrato, com OHLC, ajuste e taxa (em DI/DAP).", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do contrato (ex.: `WINM26`).", "example": "WINM26" }, "required": true, "name": "symbol", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial (YYYY-MM-DD). Padrão: 12 meses atrás." }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final (YYYY-MM-DD). Padrão: hoje." }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureHistoricalResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/futures/term-structure": { "get": { "tags": [ "Futuros" ], "operationId": "getFutureTermStructure", "summary": "Curva de vencimentos", "description": "Retorna todos os contratos do mesmo ativo, com o último pregão de cada um, do vencimento mais próximo para o mais distante.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo (ex.: `BGI`, `WIN`, `DI1`).", "example": "BGI" }, "required": true, "name": "asset", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "`true` inclui contratos vencidos. Padrão: `false`." }, "required": false, "name": "includeExpired", "in": "query" } ], "responses": { "200": { "description": "Curva de vencimentos.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FutureTermStructureResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/inflation": { "get": { "tags": [ "Indicadores" ], "operationId": "getInflation", "summary": "Obter Dados de Inflação (IPCA)", "description": "\nRetorna dados históricos do **IPCA (Índice Nacional de Preços ao Consumidor Amplo)**, o índice oficial de inflação do Brasil, medido pelo IBGE.\n\n### Funcionalidades\n\n* **Dados Mensais:** Variação percentual mensal do IPCA\n* **Histórico Completo:** Dados desde janeiro/2000 até o mês atual\n* **Filtros de Período:** Use `start` e `end` para definir período específico (formato DD/MM/YYYY)\n* **Ordenação:** Ordene por data ou valor, crescente ou decrescente\n\n### Autenticação\n\nBearer token ou query param `token`. Requer plano Startup.\n\n### Exemplos de Uso\n\n```bash\n# Padrão (últimos 12 meses)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/inflation\"\n\n# Histórico completo\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/inflation?historical=true\"\n\n# Período específico\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/inflation?start=01/01/2023&end=31/12/2023\"\n\n# Ordenado por valor (decrescente)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/inflation?historical=true&sortBy=value&sortOrder=desc\"\n```\n\n### Parâmetros de Ordenação\n\n* `sortBy`: `date` (padrão) ou `value`\n* `sortOrder`: `desc` (padrão) ou `asc`\n\n### Campos da Resposta\n\n* `date` — Data no formato DD/MM/YYYY\n* `value` — Variação percentual do IPCA no mês\n* `epochDate` — Data em timestamp Unix (milissegundos)\n\n### Sobre o IPCA\n\nO IPCA é o índice oficial de inflação do Brasil, calculado mensalmente pelo IBGE. Ele mede a variação de preços de uma cesta de produtos e serviços consumidos pelas famílias brasileiras.\n\n### Fonte dos Dados\n\nBanco Central do Brasil (BCB) — indicador IPCA publicado como série temporal oficial\n\n**Plano Mínimo:** Startup | **Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Incluir dados históricos (true/false)", "example": "false" }, "required": false, "name": "historical", "in": "query" }, { "schema": { "type": "string", "description": "Data de início (DD/MM/YYYY)", "example": "01/01/2023" }, "required": false, "name": "start", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim (DD/MM/YYYY)", "example": "31/12/2023" }, "required": false, "name": "end", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação (date ou value)", "example": "date" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "description": "Ordem de classificação (asc ou desc)", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Dados históricos de inflação (IPCA) retornados com sucesso conforme os filtros aplicados. Array contém variações percentuais mensais ordenadas conforme solicitado.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InflationResponseSimple" } } } }, "401": { "description": "**Não Autorizado.** Token de autenticação não fornecido ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "**Acesso Proibido.** Seu plano não tem acesso ao módulo de indicadores econômicos.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "**Erro Interno.** Erro interno ao processar a requisição.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "**Serviço Indisponível.** Serviço externo temporariamente indisponível.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/inflation/available": { "get": { "tags": [ "Indicadores" ], "operationId": "getInflationAvailable", "summary": "Listar Países com Dados de Inflação", "description": "\nRetorna a lista de países disponíveis para consulta de dados de inflação.\n\n### Países Disponíveis\n\n* **brazil** — Dados do IPCA (IBGE)\n\nUse o valor retornado como referência para futuras expansões do endpoint.\n\n### Exemplo de Uso\n\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/inflation/available\"\n```\n\n**Plano Mínimo:** Startup | **Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "responses": { "200": { "description": "Lista de países disponíveis para dados de inflação retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InflationAvailableResponse" } } } } } } }, "/api/v2/macro/available": { "get": { "tags": [ "Macroeconomia" ], "operationId": "getMacroAvailable", "summary": "Listar séries macroeconômicas disponíveis", "description": "\nLista as séries macroeconômicas disponíveis com slug, nome, unidade, frequência,\ncategoria e data de início do histórico. Endpoint público (use para descobrir\nslugs antes de chamar `/api/v2/macro` ou `/api/v2/macro/latest`).\n\n### Filtros opcionais\n\n- `q` — busca textual em slug, alias, nome e descrição (case-insensitive).\n Quando presente, os resultados vêm ordenados por relevância.\n- `category` — filtra por categoria (ex: `interestRate`, `inflation`).\n\nOs filtros podem ser combinados.\n", "parameters": [ { "schema": { "type": "string", "minLength": 1, "description": "Filtro textual aplicado a slug, alias, nome e descrição (case-insensitive, substring). Quando informado, os resultados vêm ordenados por relevância.", "example": "juros" }, "required": false, "name": "q", "in": "query" }, { "schema": { "type": "string", "description": "Filtrar por categoria (ex: `interestRate`, `inflation`).", "example": "interestRate" }, "required": false, "name": "category", "in": "query" } ], "responses": { "200": { "description": "Lista de séries disponíveis retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MacroAvailableResponse" } } } } } } }, "/api/v2/macro": { "get": { "tags": [ "Macroeconomia" ], "operationId": "getMacroSeries", "summary": "Séries históricas de indicadores macroeconômicos", "description": "\nRetorna observações históricas para uma ou mais séries macroeconômicas\nbrasileiras (taxas de juros, inflação, agregados monetários e atividade).\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Slugs separados por vírgula (máx. 20). Slugs disponíveis — interestRate: `selic`, `selicovernight`, `cdi`, `tr`; inflation: `ipca`, `ipca12m`, `inpc`, `igpm`, `igpdi`; activity: `ibcbr`, `pibmensal`; labor: `desemprego`; monetary: `m1`, `m4`; external: `reservas`. Veja `/api/v2/macro/available` para metadados completos (unidade, frequência, descrição) e busca por texto.", "example": "selic,ipca" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial (YYYY-MM-DD). Padrão: 12 meses atrás.", "example": "2025-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final (YYYY-MM-DD). Padrão: hoje.", "example": "2026-04-30" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Ordenação por data.", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "Máximo de observações por série (padrão 20). Sem teto — passe `limit=10000` para histórico completo.", "example": 20 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Observações retornadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MacroSeriesDataResponse" } } } }, "400": { "description": "Parâmetros inválidos.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Token ausente ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Plano sem acesso ao módulo de macroeconomia.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/macro/latest": { "get": { "tags": [ "Macroeconomia" ], "operationId": "getMacroSeriesLatest", "summary": "Último valor de cada série macroeconômica", "description": "\nSnapshot dos valores mais recentes para uma lista de séries (ou todas, se\n`symbols` for omitido).\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Slugs separados por vírgula. Omitir retorna o último valor de TODAS as séries disponíveis. Slugs: selic, selicovernight, cdi, tr, ipca, ipca12m, inpc, igpm, igpdi, ibcbr, pibmensal, desemprego, m1, m4, reservas. Veja `/api/v2/macro/available` para metadados.", "example": "selic,cdi,ipca" }, "required": false, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Snapshot retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MacroSeriesLatestResponse" } } } }, "400": { "description": "Parâmetros inválidos.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Token ausente ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Plano sem acesso ao módulo de macroeconomia.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/expirations": { "get": { "tags": [ "Opções" ], "operationId": "listOptionExpirations", "summary": "Listar vencimentos de opções", "description": "Retorna os vencimentos disponíveis para um ativo subjacente. Sem token, o sandbox aceita apenas `underlying=PETR4`.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo subjacente (ação, ETF ou índice) das opções que você quer listar.", "example": "PETR4" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false", "description": "Se `true`, inclui vencimentos já passados. Padrão `false` retorna apenas vencimentos futuros." }, "required": false, "name": "includeExpired", "in": "query" } ], "responses": { "200": { "description": "Vencimentos retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionExpirationsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/strikes": { "get": { "tags": [ "Opções" ], "operationId": "listOptionStrikes", "summary": "Listar preços de exercício de opções", "description": "Retorna os strikes disponíveis em um vencimento específico. Sem token, o sandbox aceita apenas `underlying=PETR4`.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo subjacente (ação, ETF ou índice) das opções que você quer listar.", "example": "PETR4" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento das opções, no formato YYYY-MM-DD. Use `/expirations` para descobrir os vencimentos disponíveis.", "example": "2026-12-18" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por tipo da opção: `call` (compra) ou `put` (venda). Omita para retornar ambos." }, "required": false, "name": "side", "in": "query" } ], "responses": { "200": { "description": "Preços de exercício retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionStrikesResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/chain": { "get": { "tags": [ "Opções" ], "operationId": "getOptionSeries", "summary": "Listar séries negociadas de opções", "description": "Retorna as séries negociadas de um vencimento, combinando metadados do contrato com o último OHLCV disponível até a data solicitada. Sem token, o sandbox aceita apenas `underlying=PETR4`.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo subjacente (ação, ETF ou índice) das opções que você quer listar.", "example": "PETR4" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento das opções, no formato YYYY-MM-DD. Use `/expirations` para descobrir os vencimentos disponíveis.", "example": "2026-12-18" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "description": "Data EOD usada para buscar preço e volume do dia, no formato YYYY-MM-DD. Padrão: último pregão disponível.", "example": "2026-06-01" }, "required": false, "name": "date", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por tipo da opção: `call` (compra) ou `put` (venda). Omita para retornar ambos." }, "required": false, "name": "side", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike mínimo a considerar. Útil para limitar a resposta a uma faixa de preços de exercício." }, "required": false, "name": "minStrike", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike máximo a considerar. Útil para limitar a resposta a uma faixa de preços de exercício." }, "required": false, "name": "maxStrike", "in": "query" } ], "responses": { "200": { "description": "Séries retornadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionSeriesResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/historical": { "get": { "tags": [ "Opções" ], "operationId": "getOptionHistorical", "summary": "Obter histórico diário de uma série de opção", "description": "Retorna o histórico diário EOD de uma única série, identificada por `symbol` e `expirationDate`. Sem token, o sandbox aceita apenas símbolos com prefixo `PETR` (opções de PETR4).", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolo da opção", "example": "PETRF783" }, "required": true, "name": "symbol", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento no formato YYYY-MM-DD", "example": "2026-12-18" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Preço de exercício. Use quando o mesmo símbolo aparecer mais de uma vez no mesmo vencimento.", "example": 7.29 }, "required": false, "name": "strike", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD (padrão: 12 meses)", "example": "2026-05-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2026-06-01" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Ordem dos pontos em `history` por data: `asc` do mais antigo ao mais recente, `desc` do mais recente ao mais antigo. Padrão `desc`." }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionHistoricalResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/analytics": { "get": { "tags": [ "Opções" ], "operationId": "getOptionAnalytics", "summary": "Obter gregas e volatilidade implícita de opções", "description": "Retorna IV e gregas EOD calculadas para as séries de um vencimento. Os cálculos usam apenas preços EOD observados; quando uma série não tem dados suficientes, os campos calculados ficam `null` e `nullReason` explica o motivo. Sem token, o sandbox aceita apenas `underlying=PETR4`.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Código do ativo subjacente (ação, ETF ou índice) das opções que você quer listar.", "example": "PETR4" }, "required": true, "name": "underlying", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento das opções, no formato YYYY-MM-DD. Use `/expirations` para descobrir os vencimentos disponíveis.", "example": "2026-12-18" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "string", "description": "Data EOD usada para buscar preço e volume do dia, no formato YYYY-MM-DD. Padrão: último pregão disponível.", "example": "2026-06-01" }, "required": false, "name": "date", "in": "query" }, { "schema": { "type": "string", "enum": [ "call", "put" ], "description": "Filtra por tipo da opção: `call` (compra) ou `put` (venda). Omita para retornar ambos." }, "required": false, "name": "side", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike mínimo a considerar. Útil para limitar a resposta a uma faixa de preços de exercício." }, "required": false, "name": "minStrike", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Strike máximo a considerar. Útil para limitar a resposta a uma faixa de preços de exercício." }, "required": false, "name": "maxStrike", "in": "query" }, { "schema": { "type": "integer", "minimum": 1, "maximum": 500, "description": "Limita a quantidade de séries retornadas na cadeia analítica. Padrão: todas as séries do filtro.", "example": 50 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Análises retornadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionAnalyticsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/options/analytics/history": { "get": { "tags": [ "Opções" ], "operationId": "getOptionAnalyticsHistory", "summary": "Obter histórico de gregas e IV de uma série de opção", "description": "Retorna a série temporal EOD de IV e gregas calculadas para uma única opção. Sem token, o sandbox aceita apenas símbolos com prefixo `PETR`.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolo da opção", "example": "PETRF783" }, "required": true, "name": "symbol", "in": "query" }, { "schema": { "type": "string", "description": "Data de vencimento no formato YYYY-MM-DD", "example": "2026-12-18" }, "required": true, "name": "expirationDate", "in": "query" }, { "schema": { "type": "number", "nullable": true, "description": "Preço de exercício. Use quando o mesmo símbolo aparecer mais de uma vez no mesmo vencimento.", "example": 7.29 }, "required": false, "name": "strike", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD (padrão: 12 meses)", "example": "2026-05-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2026-06-01" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Ordem dos pontos em `history` por data: `asc` do mais antigo ao mais recente, `desc` do mais recente ao mais antigo. Padrão `desc`." }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico de análises retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptionAnalyticsHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/prime-rate": { "get": { "tags": [ "Indicadores" ], "operationId": "getPrimeRate", "summary": "Obter Dados da Taxa SELIC", "description": "\nRetorna dados históricos da **Taxa SELIC (Sistema Especial de Liquidação e de Custódia)**, a taxa básica de juros da economia brasileira, definida pelo COPOM (Comitê de Política Monetária) do Banco Central.\n\n### Funcionalidades\n\n* **Dados Diários:** Taxa SELIC diária (meta anualizada, % a.a.)\n* **Histórico Completo:** Dados desde janeiro/2000 até a data atual\n* **Filtros de Período:** Use `start` e `end` (formato DD/MM/YYYY)\n* **Ordenação:** Por data ou valor, crescente ou decrescente\n\n### Autenticação\n\nBearer token ou query param `token`. Requer plano Startup.\n\n### Exemplos de Uso\n\n```bash\n# Padrão (últimos 12 meses)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/prime-rate\"\n\n# Histórico completo\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/prime-rate?historical=true\"\n\n# Período específico\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/prime-rate?start=01/01/2023&end=31/12/2023\"\n\n# Ordenado por valor (decrescente)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/prime-rate?historical=true&sortBy=value&sortOrder=desc\"\n```\n\n### Parâmetros de Ordenação\n\n* `sortBy`: `date` (padrão) ou `value`\n* `sortOrder`: `desc` (padrão) ou `asc`\n\n### Campos da Resposta\n\n* `date` — Data no formato DD/MM/YYYY\n* `value` — Taxa SELIC meta anualizada (% a.a.)\n* `epochDate` — Data em timestamp Unix (milissegundos)\n\n### Sobre a SELIC\n\nA SELIC é a taxa básica de juros da economia brasileira e influencia todas as demais taxas de juros do país (empréstimos, financiamentos, aplicações financeiras). Ela é definida pelo COPOM a cada 45 dias e serve como referência para o CDI.\n\n### Fonte dos Dados\n\nBanco Central do Brasil (BCB) — meta SELIC publicada como série temporal oficial\n\n**Plano Mínimo:** Startup | **Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Incluir dados históricos (true/false)", "example": "false" }, "required": false, "name": "historical", "in": "query" }, { "schema": { "type": "string", "description": "Data de início (DD/MM/YYYY)", "example": "01/01/2023" }, "required": false, "name": "start", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim (DD/MM/YYYY)", "example": "31/12/2023" }, "required": false, "name": "end", "in": "query" }, { "schema": { "type": "string", "description": "Campo para ordenação (date ou value)", "example": "date" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "description": "Ordem de classificação (asc ou desc)", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Dados históricos da taxa SELIC retornados com sucesso conforme os filtros aplicados. Array contém taxas diárias (% a.a.) ordenadas conforme solicitado.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrimeRateResponseSimple" } } } }, "401": { "description": "**Não Autorizado.** Token de autenticação não fornecido ou inválido.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "**Acesso Proibido.** Seu plano não tem acesso ao módulo de indicadores econômicos.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "500": { "description": "**Erro Interno.** Erro interno ao processar a requisição.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "**Serviço Indisponível.** Serviço externo temporariamente indisponível.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/prime-rate/available": { "get": { "tags": [ "Indicadores" ], "operationId": "getPrimeRateAvailable", "summary": "Listar Países com Dados de Taxa de Juros", "description": "\nRetorna a lista de países disponíveis para consulta de dados de taxa de juros.\n\n### Países Disponíveis\n\n* **brazil** — Taxa SELIC (Banco Central)\n\nUse o valor retornado como referência para futuras expansões do endpoint.\n\n### Exemplo de Uso\n\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/prime-rate/available\"\n```\n\n**Plano Mínimo:** Startup | **Autenticação:** Necessária\n", "security": [ { "Bearer": [] } ], "responses": { "200": { "description": "Lista de países disponíveis para dados de taxa de juros retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrimeRateAvailableResponse" } } } } } } }, "/api/quote/list": { "get": { "tags": [ "Cotações" ], "operationId": "getQuoteList", "summary": "Listar Ativos Disponíveis", "description": "\nRetorna uma lista paginada de todos os ativos disponíveis na API (Ações, FIIs, BDRs, ETFs, Índices). Use este endpoint para construir screeners, exploradores de ações ou para descobrir novos ativos.\n\n### Funcionalidades:\n* **Busca por Nome ou Ticker:** Encontre ativos digitando \"Petrobras\", \"PETR4\" ou qualquer termo.\n* **Filtros por Tipo:** Ações (stock), Fundos Imobiliários (fund), BDRs (bdr).\n* **Filtros por Subtipo:** Units, FIIs, ETFs, FI-Infra, FI-Agro, FIPs, FIDCs e BDRs via `subType`.\n* **Filtros por Setor:** Energia, Financeiro, Tecnologia, Saúde, etc.\n* **Ordenação Flexível:** Ordene por volume, preço, market cap ou nome.\n* **Paginação:** Controle o número de resultados com `limit` e `page`.\n\n### Autenticação:\nRequer token Bearer. Obtenha seu token em [brapi.dev/dashboard](https://brapi.dev/dashboard).\n\n### Exemplos de Requisição:\n```bash\n# Listar todos os ativos (primeiros 100)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/list\"\n\n# Buscar por nome ou ticker\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/list?search=petrobras\"\n\n# Filtrar por tipo e ordenar por volume\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/list?type=stock&sortBy=volume&sortOrder=desc&limit=10\"\n\n# Filtrar por subtipo\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/list?subType=fi-agro&limit=10\"\n\n# Listar apenas FIIs de um setor específico\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/list?type=fund§or=Logística&limit=20\"\n```\n\n### Parâmetros de Ordenação:\n* `volume` — Volume de negociação do dia\n* `close` — Preço de fechamento\n* `market_cap_basic` — Capitalização de mercado\n* `name` — Nome da empresa (alfabético)\n\n### Tipos de Ativo:\n* `stock` — Ações (Ações ordinárias e preferenciais)\n* `fund` — Fundos Imobiliários (FIIs) e ETFs\n* `bdr` — BDRs (Brazilian Depositary Receipts)\n\n**Plano Mínimo:** Gratuito\n**Autenticação:** Necessária (Bearer Token)\n", "parameters": [ { "schema": { "type": "string", "description": "Termo de busca para filtrar ativos" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "enum": [ "name", "close", "change", "change_abs", "volume", "market_cap_basic" ], "description": "Campo para ordenação" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "description": "Ordem de classificação" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "string", "description": "Número máximo de resultados" }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "description": "Número da página (paginação)" }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "string", "description": "Filtrar por setor" }, "required": false, "name": "sector", "in": "query" }, { "schema": { "type": "string", "enum": [ "stock", "fund", "bdr" ], "description": "Filtrar por tipo de ativo" }, "required": false, "name": "type", "in": "query" }, { "schema": { "type": "string", "enum": [ "stock", "unit", "fii", "etf", "fi-infra", "fi-agro", "fip", "fidc", "bdr" ], "description": "Filtrar por classificação aditiva: stock, unit, fii, etf, fi-infra, fi-agro, fip, fidc ou bdr" }, "required": false, "name": "subType", "in": "query" }, { "schema": { "type": "string", "description": "Token de autenticação (alternativa ao header Authorization)" }, "required": false, "name": "token", "in": "query" } ], "responses": { "200": { "description": "Lista de ativos retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuoteListResponse" } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/quote/{tickers}": { "get": { "tags": [ "Cotações" ], "operationId": "getQuote", "summary": "Consultar Cotação e Dados de Ativos", "description": "\n**O ENDPOINT MAIS IMPORTANTE DA API.** Obtém dados detalhados e abrangentes de um ou múltiplos ativos (ações, FIIs, BDRs) em uma única requisição. Combine cotações em tempo real, dados históricos, fundamentos e dividendos conforme necessário.\n\n### Funcionalidades:\n* **Cotação em Tempo Real:** Preço atual, variação absoluta e percentual, volume, máxima/mínima do dia, range de 52 semanas.\n* **Dados Históricos:** Preços OHLCV (Open, High, Low, Close, Volume) com intervalos flexíveis (1d, 5d, 1wk, 1mo, 3mo) e períodos (1d até max).\n* **Fundamentos:** Balanço Patrimonial, DRE, Fluxo de Caixa, DVA, Indicadores-chave (P/L, P/VP, ROE, etc) via parâmetro `modules`.\n* **Dividendos:** Histórico completo de proventos em dinheiro (dividendos, JCP) e bonificações.\n\n### Autenticação:\nRequer token Bearer no header ou como query param. Tickers de teste **PETR4** e **VALE3** funcionam sem autenticação.\n\n```bash\n# Via header (recomendado)\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/quote/PETR4\"\n\n# Via query param\ncurl \"https://brapi.dev/api/quote/PETR4?token=SEU_TOKEN\"\n```\n\n### Exemplos de Requisição:\n```bash\n# Simples: apenas cotação atual\ncurl \"https://brapi.dev/api/quote/PETR4?token=SEU_TOKEN\"\n\n# Múltiplos tickers em uma requisição\ncurl \"https://brapi.dev/api/quote/PETR4,VALE3,ITUB4?token=SEU_TOKEN\"\n\n# Com dados históricos (últimos 12 meses, diário)\ncurl \"https://brapi.dev/api/quote/PETR4?range=1y&interval=1d&token=SEU_TOKEN\"\n\n# Com módulos de fundamentos (balanço e DRE)\ncurl \"https://brapi.dev/api/quote/PETR4?modules=balanceSheetHistory,incomeStatementHistory&token=SEU_TOKEN\"\n\n# Completo: histórico + dividendos + estatísticas-chave\ncurl \"https://brapi.dev/api/quote/PETR4?range=6mo&interval=1d÷nds=true&modules=balanceSheetHistory,defaultKeyStatistics&token=SEU_TOKEN\"\n```\n\n### Módulos Disponíveis:\n* `summaryProfile` — Perfil da empresa (CNPJ, setor, descrição, website, funcionários)\n* `balanceSheetHistory` — Balanço Patrimonial anual\n* `balanceSheetHistoryQuarterly` — Balanço Patrimonial trimestral\n* `incomeStatementHistory` — DRE anual (Demonstração de Resultado do Exercício)\n* `incomeStatementHistoryQuarterly` — DRE trimestral\n* `financialData` — Indicadores financeiros atuais (TTM - Trailing Twelve Months)\n* `financialDataHistory` — Histórico anual de indicadores financeiros\n* `financialDataHistoryQuarterly` — Histórico trimestral de indicadores financeiros\n* `defaultKeyStatistics` — Estatísticas-chave (P/L, P/VP, ROE, Dividend Yield, etc)\n* `defaultKeyStatisticsHistory` — Histórico anual de estatísticas-chave\n* `defaultKeyStatisticsHistoryQuarterly` — Histórico trimestral de estatísticas-chave\n* `cashflowHistory` — Fluxo de Caixa anual\n* `cashflowHistoryQuarterly` — Fluxo de Caixa trimestral\n* `valueAddedHistory` — DVA anual (Demonstração de Valor Adicionado)\n* `valueAddedHistoryQuarterly` — DVA trimestral\n\n### Intervalos Válidos (histórico):\n* `1d` — Diário\n* `5d` — 5 dias\n* `1wk` — Semanal\n* `1mo` — Mensal\n* `3mo` — Trimestral\n\n### Períodos Válidos (range):\n* `1d` — Último dia\n* `5d` — Últimos 5 dias\n* `1mo` — Último mês\n* `3mo` — Últimos 3 meses\n* `6mo` — Últimos 6 meses\n* `1y` — Último ano\n* `2y` — Últimos 2 anos\n* `5y` — Últimos 5 anos\n* `10y` — Últimos 10 anos\n* `ytd` — Ano até hoje\n* `max` — Máximo disponível\n\n### Campos Principais da Resposta:\n* `symbol` — Ticker do ativo (ex: PETR4)\n* `shortName` — Nome curto da empresa\n* `currency` — Moeda (BRL)\n* `regularMarketPrice` — Preço atual em BRL\n* `regularMarketChange` — Variação absoluta\n* `regularMarketChangePercent` — Variação percentual (%)\n* `regularMarketVolume` — Volume de negociação do dia\n* `regularMarketDayHigh` — Máxima do dia\n* `regularMarketDayLow` — Mínima do dia\n* `fiftyTwoWeekHigh` — Máxima de 52 semanas\n* `fiftyTwoWeekLow` — Mínima de 52 semanas\n* `marketCap` — Capitalização de mercado\n* `historicalDataPrice` — Array de dados OHLCV (quando `range`/`interval` fornecidos)\n* `dividendsData` — Histórico de dividendos (quando `dividends=true`)\n\n### Tickers Populares (Teste):\n* `PETR4` — Petrobras (Energia)\n* `VALE3` — Vale (Mineração)\n* `ITUB4` — Itaú Unibanco (Financeiro)\n* `BBDC4` — Bradesco (Financeiro)\n* `ABEV3` — Ambev (Consumo)\n* `WEGE3` — WEG (Indústria)\n* `RENT3` — Localiza (Transporte)\n* `BBAS3` — Banco do Brasil (Financeiro)\n* `MGLU3` — Magazine Luiza (Varejo)\n\n### Fonte dos Dados:\nCVM (Comissão de Valores Mobiliários)\n\n**Plano Mínimo:** Gratuito (limitado a 1 ticker/requisição e módulos básicos)\n**Autenticação:** Necessária para produção (tickers de teste PETR4 e VALE3 funcionam sem token)\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Ticker(s) de ativos separados por vírgula (ex: PETR4 ou PETR4,VALE3,ITUB4)", "example": "PETR4,VALE3" }, "required": true, "name": "tickers", "in": "path" }, { "schema": { "type": "string", "enum": [ "1d", "2d", "5d", "7d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max" ], "description": "Período para dados históricos de preço" }, "required": false, "name": "range", "in": "query" }, { "schema": { "type": "string", "enum": [ "1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo" ], "description": "Intervalo/granularidade dos dados históricos" }, "required": false, "name": "interval", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial para dados históricos (formato YYYY-MM-DD)", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final para dados históricos (formato YYYY-MM-DD)", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "true", "false" ], "description": "Incluir histórico de dividendos e JCP" }, "required": false, "name": "dividends", "in": "query" }, { "schema": { "type": "string", "description": "Módulos de dados adicionais separados por vírgula", "example": "summaryProfile,balanceSheetHistory,financialData" }, "required": false, "name": "modules", "in": "query" }, { "schema": { "type": "string", "description": "Token de autenticação (alternativa ao header Authorization)" }, "required": false, "name": "token", "in": "query" } ], "responses": { "200": { "description": "Dados dos ativos recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuoteTickersResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/sdks": { "get": { "tags": [ "Utilitários" ], "operationId": "getSdks", "summary": "Listar SDKs Oficiais", "description": "Retorna página com informações sobre as SDKs oficiais da brapi para integração rápida.\n\n### SDKs Disponíveis\n\n* **TypeScript/JavaScript:** `npm install brapi` — GitHub: https://github.com/brapi-dev/brapi-typescript\n* **Python:** `pip install brapi` — GitHub: https://github.com/brapi-dev/brapi-python\n\n### Nota\n\nRecomendamos o uso das SDKs para autenticação automática, tipagem completa e retry inteligente.\n\n**Plano Mínimo:** Gratuito\n**Autenticação:** Não necessária (Público)", "responses": { "200": { "description": "Página HTML de SDKs", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/api/v2/stocks/quote": { "get": { "tags": [ "Ações" ], "operationId": "getStockQuotes", "summary": "Cotações v2 de ações", "description": "\nRetorna apenas o snapshot de cotação para um ou mais tickers B3.\n\nUse este endpoint quando você precisa de preço, variação, volume, market cap,\nfaixa do dia, faixa de 52 semanas e logo, sem carregar módulos financeiros,\nhistórico ou dividendos do endpoint legado `/api/quote/{tickers}`.\n\nEste é o primeiro endpoint composável de ações em `/api/v2/stocks/*`. Para\ndescobrir tickers válidos, use `/api/v2/tickers`; para resolver tickers\nantigos, use `/api/v2/tickers/resolve`.\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Cotações recuperadas com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockQuoteResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/historical": { "get": { "tags": [ "Ações" ], "operationId": "getStockHistorical", "summary": "Histórico v2 de ações", "description": "\nRetorna séries históricas OHLCV para um ou mais tickers B3.\n\nUse este endpoint quando você precisa apenas de preços históricos. Para\nsnapshot de cotação, use `/api/v2/stocks/quote`; para descobrir tickers,\nuse `/api/v2/tickers`.\n\nO endpoint aceita `range`/`interval` ou `startDate`/`endDate` e respeita\nos mesmos limites de plano do comportamento histórico legado em\n`/api/quote/{tickers}`.\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "1d", "2d", "5d", "7d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max" ], "description": "Janela histórica. Padrão: 1mo.", "example": "1y" }, "required": false, "name": "range", "in": "query" }, { "schema": { "type": "string", "enum": [ "1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo" ], "description": "Granularidade da série. Padrão: 1d.", "example": "1d" }, "required": false, "name": "interval", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Ordenação dos pontos históricos por data.", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico recuperado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockHistoricalResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/dividends": { "get": { "tags": [ "Ações" ], "operationId": "getStockDividends", "summary": "Dividendos v2 de ações", "description": "\nRetorna dividendos, JCP e eventos de ações para tickers B3 stock-like.\n\nEste endpoint substitui o uso de `/api/quote/{tickers}?dividends=true` para\nnovas integrações que precisam apenas de proventos de ações. Para rendimentos\nde FIIs, use `/api/v2/fii/dividends`, que possui uma fonte e semântica\nespecíficas para FIIs.\n", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra por paymentDate/ex-date.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra por paymentDate/ex-date.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "paymentDate", "lastDatePrior", "approvedOn", "rate" ], "default": "paymentDate", "description": "Campo usado para ordenar eventos.", "example": "paymentDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Ordenação dos eventos.", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Dividendos recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockDividendsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/profile": { "get": { "tags": [ "Ações" ], "operationId": "getStockProfile", "summary": "Perfil v2 de ações", "description": "Retorna o perfil cadastral/empresarial do ticker via o módulo legado summaryProfile.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockProfileResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/statistics": { "get": { "tags": [ "Ações" ], "operationId": "getStockStatistics", "summary": "Estatísticas v2 de ações", "description": "Retorna indicadores estatísticos atuais ou históricos. Use mode=history e period=annual|quarterly para séries; startDate/endDate filtram as linhas históricas por date/endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "current", "history" ], "default": "current", "description": "`current` retorna o indicador atual/TTM; `history` retorna a série anual ou trimestral.", "example": "current" }, "required": false, "name": "mode", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockStatisticsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/financial-data": { "get": { "tags": [ "Ações" ], "operationId": "getStockFinancialData", "summary": "Dados financeiros v2 de ações", "description": "Retorna dados financeiros atuais/TTM ou históricos. Use mode=history e period=annual|quarterly para séries; startDate/endDate filtram as linhas históricas por date/endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "current", "history" ], "default": "current", "description": "`current` retorna o indicador atual/TTM; `history` retorna a série anual ou trimestral.", "example": "current" }, "required": false, "name": "mode", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockFinancialDataResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/balance-sheet": { "get": { "tags": [ "Ações" ], "operationId": "getStockBalanceSheet", "summary": "Balanço patrimonial v2", "description": "Retorna histórico anual ou trimestral de balanço patrimonial. Use period=quarterly para dados trimestrais; startDate/endDate filtram por endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockBalanceSheetResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/income-statement": { "get": { "tags": [ "Ações" ], "operationId": "getStockIncomeStatement", "summary": "DRE v2", "description": "Retorna histórico anual ou trimestral de demonstração de resultado. Use period=quarterly para dados trimestrais; startDate/endDate filtram por endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockIncomeStatementResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/cash-flow": { "get": { "tags": [ "Ações" ], "operationId": "getStockCashFlow", "summary": "Fluxo de caixa v2", "description": "Retorna histórico anual ou trimestral de fluxo de caixa. Use period=quarterly para dados trimestrais; startDate/endDate filtram por endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockCashFlowResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/stocks/value-added": { "get": { "tags": [ "Ações" ], "operationId": "getStockValueAdded", "summary": "DVA v2", "description": "Retorna histórico anual ou trimestral de demonstração de valor adicionado. Use period=quarterly para dados trimestrais; startDate/endDate filtram por endDate.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Ex.: PETR4,VALE3. Tickers antigos são resolvidos para o ticker atual quando houver renome conhecido.", "example": "PETR4,VALE3" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "enum": [ "annual", "quarterly" ], "default": "annual", "description": "Período dos dados históricos.", "example": "annual" }, "required": false, "name": "period", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final em YYYY-MM-DD. Filtra linhas por date/endDate.", "example": "2024-12-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Dados fundamentalistas recuperados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockValueAddedResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/treasury/list": { "get": { "tags": [ "Renda Fixa" ], "summary": "Lista títulos do Tesouro Direto", "description": "Retorna os títulos do Tesouro Direto atualmente ofertados, com taxas e preços indicativos mais recentes. Requer plano Pro, exceto pelos três títulos sandbox documentados.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página", "example": 20 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "description": "Busca por símbolo público do Tesouro Direto ou nome do título. Exemplo: tesouro-selic-01032031", "example": "tesouro-selic-01032031" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "enum": [ "selic", "prefixado", "ipca", "igpm" ], "description": "Filtra pelo indexador do título", "example": "selic" }, "required": false, "name": "indexer", "in": "query" }, { "schema": { "type": "string", "enum": [ "zero", "semestral" ], "description": "Filtra pelo tipo de cupom", "example": "zero" }, "required": false, "name": "couponType", "in": "query" }, { "schema": { "type": "string", "enum": [ "symbol", "bondType", "maturityDate", "durationDays", "baseDate", "buyRate", "sellRate", "buyPrice", "sellPrice", "basePrice" ], "default": "maturityDate", "description": "Campo para ordenação", "example": "maturityDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc", "description": "Direção da ordenação", "example": "asc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Lista paginada de títulos do Tesouro Direto", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TreasuryListResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "Serviço externo temporariamente indisponível", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/treasury/indicators": { "get": { "tags": [ "Renda Fixa" ], "summary": "Consulta indicadores atuais de títulos do Tesouro Direto", "description": "Retorna a última taxa/preço indicativo para cada símbolo solicitado. Símbolos desconhecidos são omitidos de results.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos do Tesouro Direto separados por vírgula (máximo 20). Exemplo: tesouro-selic-01032031,tesouro-ipca-15052035", "example": "tesouro-selic-01032031,tesouro-ipca-15052035" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Indicadores atuais retornados com sucesso", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TreasuryIndicatorsResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "Serviço externo temporariamente indisponível", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/treasury/indicators/history": { "get": { "tags": [ "Renda Fixa" ], "summary": "Consulta histórico diário de indicadores do Tesouro Direto", "description": "Retorna a série diária de taxas e preços indicativos por título do Tesouro Direto. Quando startDate e endDate são omitidos, usa os últimos 12 meses.", "security": [ { "Bearer": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Símbolos do Tesouro Direto separados por vírgula (máximo 20). Exemplo: tesouro-selic-01032031,tesouro-ipca-15052035", "example": "tesouro-selic-01032031,tesouro-ipca-15052035" }, "required": true, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Data de início no formato YYYY-MM-DD", "example": "2025-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data de fim no formato YYYY-MM-DD", "example": "2026-05-15" }, "required": false, "name": "endDate", "in": "query" }, { "schema": { "type": "string", "enum": [ "baseDate", "buyRate", "sellRate", "buyPrice", "sellPrice", "basePrice" ], "default": "baseDate", "description": "Campo para ordenação dentro da série histórica", "example": "baseDate" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" } ], "responses": { "200": { "description": "Histórico diário retornado com sucesso", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TreasuryIndicatorsHistoryResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "403": { "description": "Acesso negado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Acesso negado - permissões insuficientes para este recurso", "example": { "error": true, "message": "Você não tem permissão para acessar este recurso", "code": "FORBIDDEN" } } ] } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "429": { "description": "Limite de requisições excedido", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Limite de requisições excedido", "example": { "error": true, "message": "Limite de requisições excedido. Tente novamente mais tarde.", "code": "RATE_LIMIT_EXCEEDED" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "Serviço externo temporariamente indisponível", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Serviço externo temporariamente indisponível", "example": { "error": true, "message": "Serviço externo temporariamente indisponível. Tente novamente em alguns minutos.", "code": "EXTERNAL_API_ERROR" } } ] } } } } } } }, "/api/v2/tickers/renames": { "get": { "tags": [ "Tickers" ], "operationId": "getTickerRenames", "summary": "Listar renomes de tickers", "description": "\nLista renomes conhecidos de tickers B3. Use este endpoint para descobrir quando\num ticker antigo passou a negociar sob outro código, incluindo cadeias de renome\nnormalizadas para o ticker canônico atual.\n\n### Exemplos\n\n```bash\ncurl \"https://brapi.dev/api/v2/tickers/renames?symbols=VVAR3\"\ncurl \"https://brapi.dev/api/v2/tickers/renames?search=BHIA\"\ncurl \"https://brapi.dev/api/v2/tickers/renames?startDate=2024-01-01\"\n```\n\n**Plano mínimo:** Gratuito\n**Autenticação:** Não necessária\n", "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula. Filtra renomes envolvendo qualquer ticker informado.", "example": "VVAR3,BHIA3" }, "required": false, "name": "symbols", "in": "query" }, { "schema": { "type": "string", "description": "Busca textual em ticker antigo, novo ou canônico", "example": "BHIA" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "description": "Data inicial do evento no formato YYYY-MM-DD", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "description": "Data final do evento no formato YYYY-MM-DD", "example": "2026-12-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Renomes retornados com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TickerRenamesResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/tickers/resolve": { "get": { "tags": [ "Tickers" ], "operationId": "resolveTickers", "summary": "Resolver tickers antigos", "description": "\nResolve tickers antigos para o ticker atual recomendado. Tickers sem renome\nconhecido são retornados sem alteração, o que permite normalizar uma lista antes\nde chamar endpoints de dados de mercado.\n\n### Exemplos\n\n```bash\ncurl \"https://brapi.dev/api/v2/tickers/resolve?symbols=VVAR3,PETR4\"\ncurl \"https://brapi.dev/api/v2/tickers/resolve?symbols=NINJ3,REAG3\"\n```\n\n**Plano mínimo:** Gratuito\n**Autenticação:** Não necessária\n", "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula, máximo 20", "example": "VVAR3,PETR4" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Tickers resolvidos com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TickerResolveResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/tickers/coverage": { "get": { "tags": [ "Tickers" ], "operationId": "getTickerCoverage", "summary": "Verificar cobertura por ticker", "description": "\nVerifica quais superfícies de dados da brapi estão disponíveis para cada ticker\ninformado e recomenda os endpoints corretos para continuar a integração.\n\nUse este endpoint quando precisar responder \"o que posso consultar para este\nativo?\" antes de chamar cotações, histórico, dividendos, fundamentos ou\nendpoints específicos de FIIs.\n\n### Exemplos\n\n```bash\ncurl \"https://brapi.dev/api/v2/tickers/coverage?symbols=PETR4,MXRF11\"\ncurl \"https://brapi.dev/api/v2/tickers/coverage?symbols=VVAR3\"\n```\n\n**Plano mínimo:** Gratuito\n**Autenticação:** Não necessária\n", "parameters": [ { "schema": { "type": "string", "description": "Tickers separados por vírgula, máximo 20", "example": "PETR4,MXRF11,VVAR3" }, "required": true, "name": "symbols", "in": "query" } ], "responses": { "200": { "description": "Cobertura retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TickerCoverageResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/tickers": { "get": { "tags": [ "Tickers" ], "operationId": "getTickers", "summary": "Listar tickers disponíveis", "description": "\nLista tickers e instrumentos B3 disponíveis na brapi usando o padrão v2.\n\nUse este endpoint para descoberta de símbolos, autocomplete, validação de ticker\ne telas de screening. Ele substitui gradualmente `/api/quote/list` para novas\nintegrações, mas não retorna módulos, dividendos ou histórico completo. Para\ndados de mercado de ações em novas integrações, use os endpoints composáveis\n`/api/v2/stocks/*`. Para FIIs, use `/api/v2/fii/*`.\n\n### Escopo\n\nEste catálogo cobre instrumentos B3 em formato de ticker: ações, FIIs, ETFs,\nBDRs, units e índices. Não inclui opções, futuros, Tesouro Direto, cripto,\ncâmbio ou séries macroeconômicas, que possuem endpoints próprios.\n\n### Exemplos\n\n```bash\ncurl \"https://brapi.dev/api/v2/tickers?search=PETR&limit=10\"\ncurl \"https://brapi.dev/api/v2/tickers?type=fund&subType=fii&limit=20\"\ncurl \"https://brapi.dev/api/v2/tickers?sortBy=volume&sortOrder=desc&limit=10\"\n```\n\n**Plano mínimo:** Gratuito\n**Autenticação:** Não necessária\n", "parameters": [ { "schema": { "type": "string", "description": "Busca textual por ticker, nome da empresa ou ticker antigo", "example": "PETR" }, "required": false, "name": "search", "in": "query" }, { "schema": { "type": "string", "enum": [ "symbol", "name", "close", "change", "volume", "marketCap" ], "default": "volume", "description": "Campo para ordenação", "example": "volume" }, "required": false, "name": "sortBy", "in": "query" }, { "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc", "description": "Direção da ordenação", "example": "desc" }, "required": false, "name": "sortOrder", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 1, "description": "Página (começa em 1)", "example": 1 }, "required": false, "name": "page", "in": "query" }, { "schema": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 20, "description": "Itens por página. Máximo de 2000.", "example": 20 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string", "description": "Filtra por setor", "example": "Finance" }, "required": false, "name": "sector", "in": "query" }, { "schema": { "type": "string", "enum": [ "stock", "fund", "bdr" ], "description": "Filtra por tipo amplo do ativo", "example": "stock" }, "required": false, "name": "type", "in": "query" }, { "schema": { "type": "string", "enum": [ "stock", "unit", "fii", "etf", "fi-infra", "fi-agro", "fip", "fidc", "bdr" ], "description": "Filtra por subtipo: stock, unit, fii, etf, fi-infra, fi-agro, fip, fidc ou bdr", "example": "fii" }, "required": false, "name": "subType", "in": "query" } ], "responses": { "200": { "description": "Lista de tickers retornada com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TickerListResponse" } } } }, "400": { "description": "Requisição inválida", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Requisição inválida - parâmetros incorretos ou ausentes", "example": { "error": true, "message": "Parâmetros inválidos", "code": "BAD_REQUEST" } } ] } } } }, "500": { "description": "Erro interno do servidor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v2/user/usage": { "get": { "tags": [ "Conta" ], "operationId": "getUserUsage", "summary": "Obter uso atual da conta autenticada", "description": "\nRetorna o uso atual da conta autenticada com dados frescos do Postgres.\n\n### O que retorna\n\n* `planName` — plano atual da conta (`free`, `startup`, `pro`)\n* `planLimit` — limite de requisições do plano\n* `currentUsage` — uso atual contabilizado no banco\n* `remainingUsage` — saldo restante dentro da janela atual\n* `usageWindow` — janela usada para contagem (`billing-cycle` ou `rolling-30d`)\n* `subscriptionPeriod` — período atual de assinatura salvo no usuário\n\n### Autenticação\n\nBearer token ou query param `token`.\n\n### Exemplo\n\n```bash\ncurl -H \"Authorization: Bearer SEU_TOKEN\" \"https://brapi.dev/api/v2/user/usage\"\n```\n", "security": [ { "Bearer": [] } ], "responses": { "200": { "description": "Uso da conta retornado com sucesso.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUsageResponse" } } } }, "401": { "description": "Token ausente, inválido ou inativo.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Token de autenticação ausente ou inválido", "example": { "error": true, "message": "Token de autenticação inválido ou ausente", "code": "UNAUTHORIZED" } } ] } } } }, "404": { "description": "Usuário associado ao token não encontrado.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ErrorResponse" }, { "description": "Recurso não encontrado", "example": { "error": true, "message": "Recurso não encontrado", "code": "NOT_FOUND" } } ] } } } }, "500": { "description": "Erro interno ao buscar o uso da conta.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }}Como usar esta especificação
1. Ferramentas de Desenvolvimento
- Swagger UI: Visualize e teste a API interativamente
- Postman: Importe a especificação para criar coleções automaticamente
- Insomnia: Gere requisições baseadas na especificação
- OpenAPI Generator: Gere SDKs em diversas linguagens
2. Integração em Projetos
- Frontend: Use para gerar tipos TypeScript automaticamente
- Backend: Valide requisições e respostas contra o schema
- Documentação: Gere documentação automática para sua aplicação
3. Validação e Testes
- Valide suas requisições contra o schema oficial
- Use para testes automatizados de integração
- Garanta compatibilidade com futuras versões da API
Informações Técnicas
- Versão OpenAPI: 3.0.0
- Versão da API: 3.0.0
- Formato: JSON
- Atualização: Automática a cada deploy
- Compatibilidade: Todas as ferramentas que suportam OpenAPI 3.0+
Próximos Passos
- Comece com a documentação geral para entender os conceitos básicos
- Explore os endpoints de ações para ver exemplos práticos
- Veja exemplos de código em diferentes linguagens
- Configure sua conta para obter seu token de API
Esta especificação é gerada automaticamente e sempre reflete o estado atual da API brapi.