{
  "openapi": "3.1.0",
  "info": {
    "title": "brapi GPT Actions API",
    "version": "1.0.0",
    "description": "Read-only Brazilian financial market data for a Custom GPT. Use OAuth 2.0 authorization code flow with the mcp:read scope. See https://brapi.dev/gpt.md for setup.",
    "contact": {
      "name": "brapi",
      "url": "https://brapi.dev"
    }
  },
  "servers": [
    {
      "url": "https://brapi.dev",
      "description": "brapi API"
    }
  ],
  "tags": [
    {
      "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": "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": "Utilitários",
      "description": "Ferramentas auxiliares para descobrir ativos disponíveis e verificar a saúde da API."
    }
  ],
  "paths": {
    "/api/available": {
      "get": {
        "tags": ["Utilitários"],
        "operationId": "getAvailable",
        "summary": "Listar ações e índices disponíveis",
        "description": "Lista todos os ativos que a API aceita: ações, FIIs, BDRs e ETFs da B3, mais os índices com cotação disponível. Filtre por código ou nome com search. Endpoint público, sem token. A resposta fica em cache por 15 minutos e é atualizada conforme novos ativos entram na bolsa. Para busca com filtros…",
        "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/tickers": {
      "get": {
        "tags": ["Tickers"],
        "operationId": "getTickers",
        "summary": "Listar tickers da B3",
        "description": "Catálogo de tickers e instrumentos da B3: ações, FIIs, ETFs, BDRs, units e índices. Use para autocomplete, validação de entrada e telas de screening. O endpoint devolve identidade e metadados, não cotação, dividendos nem histórico. O catálogo não cobre opções, futuros, Tesouro Direto, cripto,…",
        "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",
              "description": "Filtra pelo subsetor B3",
              "example": "Comércio"
            },
            "required": false,
            "name": "subsector",
            "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/tickers/resolve": {
      "get": {
        "tags": ["Tickers"],
        "operationId": "resolveTickers",
        "summary": "Resolver tickers antigos",
        "description": "Converte tickers antigos no código atual. Ticker sem renome conhecido volta igual. Passe a lista inteira do seu banco de uma vez e use a resposta para normalizar antes de consultar dados de mercado. Assim uma carteira antiga não gera 404 num papel que só mudou de nome. Plano gratuito, sem…",
        "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": "Responde o que a brapi tem para cada ticker e indica o endpoint certo para continuar. Chame antes de montar a integração, para descobrir se um ativo tem fundamentos, dividendos, histórico ou dados de FII, em vez de tentar cada endpoint e tratar 404. Envie até 20 tickers por chamada. Para listas…",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Tickers separados por vírgula, máximo 20. Agrupe os símbolos em lotes; não faça uma requisição individual por ticker.",
              "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/stocks/quote": {
      "get": {
        "tags": ["Ações"],
        "operationId": "getStockQuotes",
        "summary": "Cotação de ações",
        "description": "Preço e variação do último pregão para um ou mais tickers da B3. Cada item traz preço atual, variação em reais e em porcentagem, volume, market cap, máxima e mínima do dia, faixa de 52 semanas e a URL do logo. Peça vários tickers de uma vez em symbols=PETR4,VALE3. Tickers antigos são resolvidos…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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 de preços de ações",
        "description": "Série OHLCV por pregão: abertura, máxima, mínima, fechamento, fechamento ajustado e volume. Use includeRaw=true para incluir os preços OHLC originais armazenados no banco da brapi. O parâmetro vale para intervalos diários. Estes campos podem ser nulos quando o banco não tem o valor original. O…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "description": "Inclui os preços OHLC originais armazenados no banco da brapi para intervalos diários. Disponível no plano Pro.",
              "example": "true"
            },
            "required": false,
            "name": "includeRaw",
            "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 e JCP de ações",
        "description": "Proventos pagos por ações da B3: dividendos, juros sobre capital próprio, bonificações e subscrições. Cada evento traz o valor por ação, a data de aprovação, a data-com (lastDatePrior), a data ex (exDate) quando disponível e a data de pagamento. Filtre por startDate e endDate, e ordene por…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "description": "Inclui rawRate, o valor por ação convertido para a escala dos preços brutos com base histórica. Pode ser nulo quando não houver dados.",
              "example": "true"
            },
            "required": false,
            "name": "includeRaw",
            "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 da empresa",
        "description": "Dados cadastrais da companhia por trás do ticker: razão social, setor, indústria, endereço, site, telefone, número de funcionários e descrição da atividade.",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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": "Múltiplos e estatísticas",
        "description": "Múltiplos de mercado e indicadores por ação: P/L, P/VP, beta, dividend yield, lucro por ação, valor patrimonial por ação e market cap. O padrão mode=current traz o valor mais recente. Com mode=history você recebe a série, escolhendo period=annual ou period=quarterly e recortando com startDate e…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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 consolidados",
        "description": "Receita, lucro, EBITDA, margens, dívida líquida, caixa e fluxo de caixa livre em um único objeto. O padrão `mode=current` traz os últimos doze meses. Com `mode=history` você recebe a série, escolhendo `period=annual` ou `period=quarterly` e recortando com `startDate` e `endDate`.",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/income-statement": {
      "get": {
        "tags": ["Ações"],
        "operationId": "getStockIncomeStatement",
        "summary": "DRE (demonstração de resultado)",
        "description": "Receita, custos, lucro bruto, despesas operacionais, resultado financeiro, impostos e lucro líquido por exercício. Use `period=quarterly` para trimestres e `startDate`/`endDate` para recortar a janela pela data de encerramento.",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/balance-sheet": {
      "get": {
        "tags": ["Ações"],
        "operationId": "getStockBalanceSheet",
        "summary": "Balanço patrimonial",
        "description": "Ativo, passivo e patrimônio líquido conforme os demonstrativos entregues à CVM. Uma linha por exercício, do mais recente para o mais antigo. Use `period=quarterly` para trimestres e `startDate`/`endDate` para recortar a janela pela data de encerramento.",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/cash-flow": {
      "get": {
        "tags": ["Ações"],
        "operationId": "getStockCashFlow",
        "summary": "Fluxo de caixa (DFC)",
        "description": "Caixa gerado nas atividades operacionais, de investimento e de financiamento, mais a variação de caixa do exercício. Use `period=quarterly` para trimestres e `startDate`/`endDate` para recortar a janela pela data de encerramento.",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/fii/list": {
      "get": {
        "tags": ["Fundos Imobiliários"],
        "operationId": "listFii",
        "summary": "Listar fundos imobiliários",
        "description": "Lista paginada dos FIIs registrados, com dados do fundo e os indicadores atuais de cada um. Serve para montar screener, comparar rentabilidade ou descobrir fundos de um segmento. Filtre por symbols, por cnpjs ou por texto livre em search, que casa nome e símbolo. Restrinja por segmentType (papel,…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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": "Indicadores de FIIs",
        "description": "Indicadores mais recentes de um ou mais fundos imobiliários. Cada FII traz preço da cota, valor patrimonial por cota (navPerShare), P/VP (priceToNav), dividend yield de 12 meses e do último mês, retorno mensal, total de cotistas, cotas emitidas, patrimônio líquido, ativo total e o segmento…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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": "Histórico de indicadores de FIIs",
        "description": "Série mensal dos mesmos indicadores de /api/v2/fii/indicators, com um ponto por mês e o campo referenceDate no último dia do mês. O histórico começa em setembro de 2016. A janela padrão são os últimos 12 meses, e você muda com startDate e endDate. Ordene por qualquer campo com sortBy, como…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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": "Histórico de preços de FIIs",
        "description": "Série diária de preços das cotas: open, high, low, close, volume e adjustedClose, em reais. O campo date vem como timestamp UNIX em segundos. Use adjustedClose para calcular retorno. Ele considera desdobramentos e proventos, e o fechamento puro não. Janela padrão de 12 meses, ajustável com…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/dividends": {
      "get": {
        "tags": ["Fundos Imobiliários"],
        "operationId": "getFiiDividends",
        "summary": "Dividendos e rendimentos de FIIs",
        "description": "Histórico de rendimentos e amortizações pagos pelos FIIs. Cada evento traz label (RENDIMENTO ou AMORTIZAÇÃO), rate com o valor por cota em reais, paymentDate, lastDatePrior com a data-com, exDate quando disponível, approvedOn, relatedTo, isinCode e remarks com a origem do registro. Rendimento é a…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/portfolio": {
      "get": {
        "tags": ["Fundos Imobiliários"],
        "operationId": "getFiiPortfolio",
        "summary": "Carteira de FIIs",
        "description": "O que o fundo tem em carteira, a partir do informe trimestral da CVM: CRIs, cotas de outros FIIs, imóveis, direitos e terrenos. summary sempre vem, com os totais por fundo, o valor declarado e a vacância consolidada dos imóveis. As listas detalhadas você pede em include, aceitando allocations,…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/macro/available": {
      "get": {
        "tags": ["Macroeconomia"],
        "operationId": "getMacroAvailable",
        "summary": "Listar séries macroeconômicas",
        "description": "Todas as séries macroeconômicas disponíveis, com slug, nome, unidade, frequência, categoria e a data em que o histórico começa. Chame este endpoint antes de /api/v2/macro ou /api/v2/macro/latest para descobrir os slugs. q faz busca em slug, alias, nome e descrição, sem diferenciar maiúsculas, e…",
        "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 macroeconômicas",
        "description": "Observações históricas de uma ou mais séries macroeconômicas brasileiras: taxas de juros, inflação, agregados monetários e atividade. Identifique cada série pelo slug. Para descobrir os slugs disponíveis, chame /api/v2/macro/available antes. Séries têm frequências diferentes. SELIC é diária, IPCA…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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",
        "description": "O valor mais recente de cada série pedida em symbols. Sem symbols, devolve todas. Serve para um painel que mostra SELIC, IPCA e CDI atuais sem baixar o histórico inteiro. A data de cada valor muda com a frequência da série. O IPCA mais recente pode ser de um mês atrás enquanto a SELIC é de…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/prime-rate": {
      "get": {
        "tags": ["Indicadores"],
        "operationId": "getPrimeRate",
        "summary": "Taxa SELIC",
        "description": "Série da taxa SELIC, a taxa básica de juros da economia brasileira, definida pelo COPOM. Os dados são diários e começam em janeiro de 2000. O valor é a meta anualizada, em porcentagem ao ano. Filtre o período com start e end no formato DD/MM/YYYY. Ordene por data ou por valor. A meta muda só nas…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/inflation": {
      "get": {
        "tags": ["Indicadores"],
        "operationId": "getInflation",
        "summary": "IPCA (inflação oficial)",
        "description": "Série do IPCA, o índice oficial de inflação do Brasil, publicada pelo Banco Central. Os dados são mensais e começam em janeiro de 2000. Cada ponto é a variação percentual do mês, não o acumulado do ano. Filtre o período com start e end no formato DD/MM/YYYY. Ordene por data ou por valor. O IPCA…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/currency": {
      "get": {
        "tags": ["Câmbio"],
        "operationId": "getCurrency",
        "summary": "Cotação de câmbio",
        "description": "Cotação de pares de moedas, no formato ORIGEM-DESTINO, como USD-BRL. Cada par traz preço de compra (bid), de venda (ask), máxima, mínima e variação do dia. Peça vários pares na mesma chamada em currency=USD-BRL,EUR-BRL,GBP-BRL. A diferença entre bid e ask é o spread. Casas de câmbio e bancos…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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 câmbio",
        "description": "Série diária de câmbio, montada a partir das cotações PTAX de fechamento do Banco Central. O endpoint devolve três formas do mesmo dado. O par direto (USD-BRL) vem da série armazenada e está disponível a partir do plano Startup. O par inverso (BRL-USD) é calculado como 1 / X-BRL e exige plano…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/crypto": {
      "get": {
        "tags": ["Criptomoedas"],
        "operationId": "getCrypto",
        "summary": "Cotação de criptomoedas",
        "description": "Cotação de uma ou mais criptomoedas, convertida para a moeda que você escolher. Cada moeda traz preço, variação de 24 horas, volume e market cap. O padrão é currency=BRL, e você pode pedir USD, EUR e outras. Peça várias de uma vez em coin=BTC,ETH,SOL. Para série histórica, passe range e interval.…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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/treasury/indicators": {
      "get": {
        "tags": ["Renda Fixa"],
        "operationId": "getTreasuryIndicators",
        "summary": "Indicadores do Tesouro Direto",
        "description": "Última taxa e preço indicativo de cada título pedido. A taxa é a rentabilidade anual contratada até o vencimento. Em título indexado, ela é o que você ganha acima do IPCA ou da SELIC, não o retorno total. Símbolo desconhecido some de results em vez de gerar erro. Compare o que você pediu com o…",
        "security": [
          {
            "BrapiOAuth": ["mcp:read"]
          }
        ],
        "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"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "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"
        }
      },
      "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"
        ]
      },
      "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"]
      },
      "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"]
      },
      "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
        }
      },
      "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
        }
      },
      "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",
                    "exDate": "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",
                    "exDate": "2025-12-18T03:00:00.000Z",
                    "remarks": ""
                  }
                ],
                "subscriptions": []
              }
            }
          ],
          "requestedAt": "2026-06-14T05:03:16.000Z",
          "took": 203
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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": "ri.fundoslistados@btgpactual.com",
              "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": "adm.fundos@xpi.com.br",
              "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
        }
      },
      "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": "ri.fundoslistados@btgpactual.com"
            }
          ],
          "requestedAt": "2026-02-08T16:25:18.077Z",
          "took": 47
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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",
              "exDate": "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",
              "exDate": "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
        }
      },
      "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
        }
      },
      "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. 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
        }
      },
      "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. 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
        }
      },
      "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. 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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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
        }
      },
      "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"]
      },
      "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"
          },
          "subsector": {
            "type": "string",
            "nullable": true,
            "description": "Subsetor B3 quando disponível",
            "example": "Petróleo, Gás e Biocombustíveis"
          },
          "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",
          "subsector",
          "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"
          },
          "subsectors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subsetores B3 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", "subsectors", "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"]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"]
      },
      "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"]
      },
      "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"]
      },
      "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"]
      },
      "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"]
      },
      "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"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "FiiHistoricalSeries": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "historicalDataPrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiiHistoricalPrice"
            }
          }
        },
        "required": ["symbol", "historicalDataPrice"]
      },
      "FiiDividend": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "approvedOn": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string"
          },
          "lastDatePrior": {
            "type": "string"
          },
          "exDate": {
            "type": "string",
            "nullable": true
          },
          "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",
          "exDate",
          "paymentDate",
          "rate",
          "relatedTo",
          "isinCode",
          "remarks"
        ]
      },
      "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"
        ]
      },
      "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"
        }
      },
      "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"]
      },
      "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
          }
        }
      },
      "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"]
      },
      "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"]
      },
      "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"
        ]
      },
      "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/crypto para criptomoedas."
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          }
        },
        "required": ["pair", "code", "message"]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"]
      },
      "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"
                },
                "rawRate": {
                  "type": "number",
                  "nullable": true,
                  "description": "Valor por ação convertido para a escala dos preços brutos com base histórica. Retornado com includeRaw=true."
                },
                "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)"
                },
                "exDate": {
                  "type": "string",
                  "nullable": true,
                  "description": "Data ex (primeiro dia sem direito ao provento)"
                },
                "remarks": {
                  "type": "string",
                  "description": "Observações"
                }
              },
              "required": [
                "assetIssued",
                "paymentDate",
                "rate",
                "relatedTo",
                "approvedOn",
                "isinCode",
                "label",
                "lastDatePrior",
                "exDate",
                "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"
                },
                "exDate": {
                  "type": "string",
                  "nullable": true,
                  "description": "Data ex do evento corporativo"
                },
                "remarks": {
                  "type": "string",
                  "description": "Observações"
                }
              },
              "required": [
                "assetIssued",
                "factor",
                "completeFactor",
                "approvedOn",
                "isinCode",
                "label",
                "lastDatePrior",
                "exDate",
                "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)"
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "MacroSeriesObservation": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "example": "2026-04-30"
          },
          "value": {
            "type": "number",
            "example": 14.75
          }
        },
        "required": ["date", "value"]
      },
      "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
          },
          "rawOpen": {
            "type": "number",
            "nullable": true,
            "description": "Preço de abertura original armazenado no banco da brapi. Retornado com includeRaw=true em intervalos diários no plano Pro. Pode ser nulo quando não houver valor no banco."
          },
          "rawHigh": {
            "type": "number",
            "nullable": true,
            "description": "Preço máximo original armazenado no banco da brapi. Retornado com includeRaw=true em intervalos diários no plano Pro. Pode ser nulo quando não houver valor no banco."
          },
          "rawLow": {
            "type": "number",
            "nullable": true,
            "description": "Preço mínimo original armazenado no banco da brapi. Retornado com includeRaw=true em intervalos diários no plano Pro. Pode ser nulo quando não houver valor no banco."
          },
          "rawClose": {
            "type": "number",
            "nullable": true,
            "description": "Preço de fechamento original armazenado no banco da brapi. Retornado com includeRaw=true em intervalos diários no plano Pro. Pode ser nulo quando não houver valor no banco."
          }
        },
        "required": [
          "date",
          "open",
          "high",
          "low",
          "close",
          "volume",
          "adjustedClose"
        ]
      },
      "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"
        ]
      }
    },
    "securitySchemes": {
      "BrapiOAuth": {
        "type": "oauth2",
        "description": "OAuth 2.0 authorization code flow shared with the brapi MCP server.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://brapi.dev/oauth/authorize",
            "tokenUrl": "https://brapi.dev/oauth/token",
            "scopes": {
              "mcp:read": "Read-only access to brapi market-data endpoints."
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "brapi GPT Action setup",
    "url": "https://brapi.dev/gpt.md"
  }
}
