---
name: brapi-market-data
description: Query Brazilian stocks, FIIs, dividends, fundamentals, historical prices, currencies, crypto, and macro indicators. Use when an agent needs current or historical financial market data from Brazil.
license: MIT
---

# brapi market data

Use this skill when a task needs Brazilian financial market data.

## Request workflow

1. Read https://brapi.dev/llms.txt to choose the narrowest endpoint.
2. Read https://brapi.dev/openapi.json for the operation ID, parameters, and response schema.
3. Use PETR4, VALE3, MGLU3, or ITUB4 for a first request without a token.
4. Use `/api/v2` endpoints and `symbols` query parameters for new integrations.
5. Read rate-limit headers on every response.
6. Wait for `Retry-After` after HTTP 429.

## Interpret responses

- Use https://brapi.dev/api/v2/dictionary when a field, unit, formula, or null value is unclear.
- Keep the response timestamp and the market-data timestamp when presenting results.
- Treat missing data as unknown. Do not convert null values to zero.

## Interfaces

- Use REST for deterministic integrations, pipelines, dashboards, and typed clients.
- Use MCP Streamable HTTP at https://brapi.dev/api/mcp/mcp for conversational lookups.
- Use the `get_dictionary` MCP tool to explain response fields instead of guessing.
- Use https://brapi.dev/auth.md for authentication and OAuth details.
- Use https://brapi.dev/versioning.md before changing a legacy integration.
