What this API does
The Brapi Brazilian Finance API provides developers with direct access to real-time and historical financial data from the Brazilian market, including stocks traded on B3, FIIs (Investment Funds in Real Estate), ETFs (Exchange-Traded Funds), and cryptocurrencies. It delivers accurate market quotes, intraday data, and historical price trends, making it suitable for various financial applications.
How it works
The API employs a RESTful interface, allowing developers to perform GET requests to retrieve data from multiple endpoints. Data is available in JSON format, which simplifies integration into trading platforms, financial analytics tools, and portfolio management applications. The API supports multiple endpoints for fetching current stock prices, historical data, and currency exchange rates.
Authentication
Authentication is facilitated through API keys. Developers must sign up to receive their API key, which is required to make requests. This ensures secure access to the API's functionalities while protecting user data.
Example usage
/quote/BRAZILIAN_STOCK_SYMBOL- Retrieves the current price for a specified Brazilian stock./historical/BRAZILIAN_STOCK_SYMBOL- Provides historical price data for a given stock./currencies- Lists current currency rates, including BRL exchange rates./etf/BRAZILIAN_ETF_SYMBOL- Fetches the current price of a specified ETF./fii/BRAZILIAN_FII_SYMBOL- Gets the current price for a specific FII.
Limits
The Brapi API allows for 1,000 free requests per month per account. Additional requests may require a paid plan, which developers can explore through the official website.
Ideal use cases
- Developing trading platforms that require real-time stock data.
- Creating financial analytics tools for data analysis.
- Integrating cryptocurrency prices into finance-related applications.
- Building portfolio management systems that track investments in Brazilian stocks and funds.