How to Integrate BCCH Data into Your App: Complete API Guide

How to Integrate BCCH Data into Your App: Complete API Guide

Introduction

In the rapidly evolving world of fintech, access to accurate and timely financial data is crucial for developers, economists, and analysts. One such vital data point is the Banco Central de Chile Monetary Policy Rate (BCCH_MPR), which serves as a benchmark for interest rates in Chile. Integrating this data into your application can enhance financial analysis, improve decision-making, and provide users with valuable insights. This blog post serves as a comprehensive guide to integrating BCCH data into your app using the Interest Rates API from interestratesapi.com. We will cover all relevant endpoints, provide code examples, and discuss best practices for implementation.

Understanding the Importance of BCCH_MPR Data

The BCCH_MPR is a critical indicator of the monetary policy stance of the Banco Central de Chile. It influences lending rates, investment decisions, and overall economic activity. By integrating BCCH_MPR data into your application, you can:

  • Provide users with real-time insights into monetary policy changes.
  • Enhance financial modeling and forecasting capabilities.
  • Support risk assessment and management strategies.
  • Facilitate compliance with regulatory requirements.

Without access to such data, developers may struggle to deliver accurate financial products, leading to poor user experiences and missed opportunities. The Interest Rates API from interestratesapi.com offers a robust solution to these challenges.

API Overview

The Interest Rates API provides a variety of endpoints to access interest rate data, including the BCCH_MPR. Below, we will explore each endpoint in detail, including their purposes, request formats, and response structures.

1. Fetching Available Symbols

The first step in integrating BCCH_MPR data is to retrieve the list of available symbols. This can be done using the /api/v1/symbols endpoint.

Endpoint: GET /api/v1/symbols

This endpoint returns a catalogue of available rate symbols, allowing you to confirm the existence of BCCH_MPR and other relevant symbols.

cURL Example:

curl "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=CLP&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"count": 1,
"symbols": [
{
"symbol": "BCCH_MPR",
"name": "Banco Central de Chile Monetary Policy Rate",
"category": "central_bank",
"country_code": "CL",
"currency_code": "CLP",
"frequency": "monthly",
"description": "The interest rate set by the Banco Central de Chile."
}
]
}

This response confirms that the BCCH_MPR symbol is available for use in subsequent API calls.

2. Retrieving the Latest BCCH_MPR Value

Once you have confirmed the availability of the BCCH_MPR symbol, the next step is to retrieve its latest value using the /api/v1/latest endpoint.

Endpoint: GET /api/v1/latest

This endpoint provides the most recent value for specified symbols, including BCCH_MPR.

cURL Example:

curl "https://interestratesapi.com/api/v1/latest?symbols=BCCH_MPR&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"date": "2026-06-18",
"base": "CLP",
"rates": {
"BCCH_MPR": 5.33
},
"dates": {
"BCCH_MPR": "2026-06-18"
},
"currencies": {
"BCCH_MPR": "CLP"
}
}

This response indicates that the latest BCCH_MPR value is 5.33% as of June 18, 2026.

3. Accessing Historical BCCH_MPR Data

To analyze trends over time, you may need to access historical data for the BCCH_MPR. This can be achieved using the /api/v1/historical endpoint.

Endpoint: GET /api/v1/historical

This endpoint allows you to retrieve the BCCH_MPR value for a specific date.

cURL Example:

curl "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=BCCH_MPR&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"date": "2025-06-15",
"base": "CLP",
"rates": {
"BCCH_MPR": 5.30
},
"currencies": {
"BCCH_MPR": "CLP"
}
}

This response shows that the BCCH_MPR was 5.30% on June 15, 2025.

4. Analyzing BCCH_MPR Time Series Data

For a more comprehensive analysis, you can retrieve a time series of BCCH_MPR values over a specified date range using the /api/v1/timeseries endpoint.

Endpoint: GET /api/v1/timeseries

This endpoint provides a series of BCCH_MPR values between two dates.

cURL Example:

curl "https://interestratesapi.com/api/v1/timeseries?start=2025-06-01&end=2026-06-01&symbols=BCCH_MPR&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"base": "CLP",
"start_date": "2025-06-01",
"end_date": "2026-06-01",
"rates": {
"BCCH_MPR": {
"2025-06-01": 5.30,
"2025-07-01": 5.35,
"2025-08-01": 5.40
}
},
"frequencies": {
"BCCH_MPR": "monthly"
},
"currencies": {
"BCCH_MPR": "CLP"
}
}

This response provides a monthly series of BCCH_MPR values, allowing for trend analysis over the specified period.

5. Evaluating Fluctuations in BCCH_MPR

To assess the changes in the BCCH_MPR over a specified period, you can use the /api/v1/fluctuation endpoint.

Endpoint: GET /api/v1/fluctuation

This endpoint returns statistics on the fluctuations of the BCCH_MPR between two dates.

cURL Example:

curl "https://interestratesapi.com/api/v1/fluctuation?start=2025-06-01&end=2026-06-01&symbols=BCCH_MPR&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"rates": {
"BCCH_MPR": {
"start_date": "2025-06-01",
"end_date": "2026-06-01",
"start_value": 5.30,
"end_value": 5.40,
"change": 0.10,
"change_pct": 1.89,
"high": 5.40,
"low": 5.30
}
}
}

This response indicates that the BCCH_MPR increased by 0.10% over the specified period, highlighting its volatility.

6. Obtaining OHLC Data for BCCH_MPR

For applications requiring candlestick data, the /api/v1/ohlc endpoint provides Open, High, Low, and Close (OHLC) values for the BCCH_MPR.

Endpoint: GET /api/v1/ohlc

This endpoint computes OHLC data on-the-fly from daily data.

cURL Example:

curl "https://interestratesapi.com/api/v1/ohlc?symbols=BCCH_MPR&period=monthly&start=2025-06-01&end=2026-06-01&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"period": "monthly",
"start_date": "2025-06-01",
"end_date": "2026-06-01",
"rates": {
"BCCH_MPR": [
{
"period": "2025-06",
"open": 5.30,
"high": 5.40,
"low": 5.30,
"close": 5.35,
"data_points": 30
}
]
}
}

This response provides the OHLC data for the BCCH_MPR for June 2025, which can be useful for technical analysis.

7. Comparing Loan Interest Costs

Finally, the /api/v1/convert endpoint allows you to compare the total interest cost of loans based on different rates.

Endpoint: GET /api/v1/convert

This endpoint compares the total interest cost of a simple loan at the latest rate of each symbol.

cURL Example:

curl "https://interestratesapi.com/api/v1/convert?from=BCCH_MPR&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_KEY"

JSON Response Example:

{
"success": true,
"amount": 100000,
"term_months": 12,
"from": {
"symbol": "BCCH_MPR",
"rate": 5.33,
"date": "2026-06-18",
"total_interest": 5330.00,
"total_payment": 105330.00
},
"to": {
"symbol": "ECB_MRO",
"rate": 4.50,
"date": "2026-06-18",
"total_interest": 4500.00,
"total_payment": 104500.00
},
"difference": {
"rate_spread": 0.83,
"interest_saved": 830.00
}
}

This response shows the total interest costs for a loan of 100,000 CLP at both the BCCH_MPR and ECB_MRO rates, highlighting potential savings.

Error Handling and Rate Limits

When integrating with the Interest Rates API, it is essential to handle errors gracefully. Common error responses include:

  • 401: Missing or invalid api_key.
  • 403: Account without an active plan.
  • 404: No symbols matched or no data for the requested date/range.
  • 422: Validation error (e.g., wrong date format, invalid symbol).
  • 429: Request quota exhausted.

For rate limit errors (429), the response will include headers such as:

  • X-RateLimit-Limit: The maximum number of requests allowed in a given time period.
  • X-RateLimit-Remaining: The number of requests remaining in the current time window.
  • X-RateLimit-Reset: The time when the rate limit will reset.

Implementing proper error handling will ensure a smooth user experience and prevent application crashes.

Mini Project: Node.js/Express Endpoint

To demonstrate the integration of BCCH_MPR data, we will create a simple Node.js/Express endpoint that fetches, caches, and serves the latest BCCH_MPR rate data.

const express = require('express');
const axios = require('axios');
const app = express();
const PORT = process.env.PORT || 3000;

const API_KEY = 'YOUR_KEY';
const BASE_URL = 'https://interestratesapi.com/api/v1/latest?symbols=BCCH_MPR&api_key=' + API_KEY;

app.get('/bcch-mpr', async (req, res) => {
try {
const response = await axios.get(BASE_URL);
res.json(response.data);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch data' });
}
});

app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});

This simple Express application fetches the latest BCCH_MPR data and serves it at the /bcch-mpr endpoint. You can expand this application by adding caching mechanisms and error handling as needed.

Conclusion

Integrating BCCH data into your application using the Interest Rates API from interestratesapi.com is a straightforward process that can significantly enhance your financial applications. By leveraging the various endpoints available, you can access real-time data, historical trends, and perform comparative analyses. This guide has provided you with the necessary tools and examples to get started. For more information, explore Interest Rates API features and get started with Interest Rates API today!

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key

Related posts