Banxico API Integration Guide for Mexican Financial Data
The Banxico API provides access to critical Mexican financial data including USD/MXN exchange rates, TIIE interest rates, and UDI values. For developers building financial applications in Mexico, integrating this data is essential for currency conversion, loan pricing, and inflation adjustments. However, working directly with Banco de México’s official API can involve administrative hurdles and limited documentation. This guide explores both the official Banxico API and a commercial alternative, API Pull’s Banxico API, which simplifies integration with sandbox environments, responsive support, and reliable uptime.
What is the Banxico API and Why Do You Need It?
The Banxico API, officially known as the Sistema de Información Económica (SIE) web service, allows developers to consultar economic indicators published by the Bank of Mexico. Through this API, you can obtener real-time and historical data on exchange rates, interest rates, and inflation-adjusted units. The data is used across industries for pricing loans, performing currency conversions, and adjusting contracts for inflation.
The Official Banxico API vs. Commercial Providers
Banco de México offers a free API, but it comes with limitations: you must request a token via email, the documentation is only available in Spanish, and there is no sandbox environment. Commercial providers like API Pull remove these barriers by offering a RESTful JSON API, comprehensive documentation, a test environment, and dedicated support. For example, API Pull’s Banxico API returns the same data as the official source but with faster response times and easier integration.
Key Data Endpoints: Exchange Rates, TIIE, and UDI
The Banxico API provides access to a catálogo of series that cover the most important financial indicators. Below are the three most commonly used endpoints.
| Indicator | Description | Common Use Case |
|---|---|---|
| USD/MXN Exchange Rate | Daily fix from Banco de México | Currency conversion for payments, FX trading |
| TIIE (Interbank Equilibrium Interest Rate) | Reference rate for Mexican peso loans | Setting loan interest rates, pricing derivatives |
| UDI (Investment Units) | Inflation-indexed unit | Adjusting contracts, AFORE calculations |
Real-time USD/MXN Exchange Rate
You can pull the current exchange rate or a único series of historical rates. This is critical for fintechs processing cross-border payments or ACH transactions. The API returns a JSON object with the date and rate. For example, a request for the latest rate might return {"series": {"idSerie": "SF43718", "datos": [{"fecha": "2025-04-01", "dato": "20.1234"}]}}. Always refer to the official documentation for exact field names.
TIIE (Interbank Equilibrium Interest Rate) for Lending
TIIE is the benchmark rate for most loans in Mexico. Financial institutions use it to set variable interest rates. The Banxico API provides daily TIIE rates for 28-day, 91-day, and 182-day tenors. This data is essential for loan pricing and risk management.
UDI (Investment Units) for Inflation-Adjusted Calculations
UDI is used to adjust contracts, insurance premiums, and AFORE (retirement fund) contributions. The API returns the daily UDI value, which you can use to convert nominal amounts to real terms. For example, insurance companies use UDI to calculate policy payouts adjusted for inflation.
How to Integrate the Banxico API into Your Application
Integrating the Banxico API via API Pull involves three steps: sign up, obtain an API key, and make HTTP requests to the endpoints. The process is similar to using any REST API, but here we focus on the conceptual flow.
Authentication and API Keys
After signing up at API Pull, you receive a unique API key. This token is included in the Authorization header of every request. Unlike the official Banxico API, you don’t need to wait for email approval.
Request and Response Examples (Conceptual)
To fetch the current USD/MXN exchange rate, you send a GET request to the Banxico API endpoint. The response is a JSON object containing the series data. For example:
{
"series": {
"idSerie": "SF43718",
"datos": [
{
"fecha": "2024-12-01",
"dato": "18.5432"
}
]
}
}
Note: The exact endpoint path, parameter names, and response fields are documented in the official API Pull Banxico API documentation. Always refer to that for precise implementation.
Handling Rate Limits and Errors
API Pull implements rate limiting to ensure fair usage. If you exceed the limit, the API returns a 429 HTTP status. Your application should handle this by retrying with exponential backoff. Common errors include invalid tokens (401) and missing parameters (400). The response body includes a message explaining the error.
Common Use Cases Across Industries
The Banxico API is used in a wide range of productos financieros and applications.
Fintech and ACH Payments
Fintechs process ACH payments with currency conversion. They use the Banxico API to get the real-time USD/MXN rate and apply it to the transaction amount. This ensures accurate conversion and compliance with regulatory requirements.
AML Compliance and Fraud Detection
When performing AML checks, financial institutions need to know the value of transactions in Mexican pesos. The Banxico API provides the exchange rate used to convert foreign amounts for reporting to the CNBV. This data is also used in AML screening to detect suspicious transactions that might involve money laundering or terrorist financing.
AFORE and Retirement Fund Management
AFORE administrators calculate retirement fund balances using UDI and TIIE. The Banxico API proporciona the daily UDI value, which is used to adjust contributions and returns. TIIE is used to calculate the guaranteed interest rate on certain accounts.
ATM and Currency Exchange Operations
ATM networks use the Banxico API to display real-time exchange rates when processing foreign card transactions. This ensures customers see accurate conversion amounts before completing the transaction.
When This is the Wrong Tool
While the Banxico API is excellent for current and recent historical data, it has limitations.
Alternatives for Historical Data, Bulk Processing, or Non-Mexico Data
- Historical data: The official Banxico API only provides data for the last 10 years. For deeper historical analysis, consider INEGI or other economic databases.
- Bulk processing: The Banxico API does not have a bulk endpoint. If you need to process thousands of queries, you’ll need to implement a queuing system or use a commercial provider that offers higher rate limits.
- Non-Mexico data: The Banxico API only covers Mexican economic indicators. For global currencies or commodities, use other forex APIs.
If your use case requires real-time streaming data or sub-second latency, the Banxico API may not be appropriate. In those cases, consider a dedicated financial data provider.
Getting Started with API Pull’s Banxico API
API Pull’s Banxico API is designed for developers who need reliable access to Mexican financial data without the hassle of dealing with official bureaucracy.
Sandbox Environment and Test Keys
Sign up for a free account at apipull.com. Once registered, you can access the sandbox environment with test data. This allows you to build and test your integration without using real API calls. The sandbox uses synthetic data that mimics the structure of real responses.
Pricing and Support
API Pull offers a pay-as-you-go pricing model with volume discounts for high-usage accounts. Support is available via email and a knowledge base. The docs page includes code examples in Python, JavaScript, and PHP.
Next Steps
Start by exploring the Banxico API Q&A page for common questions and answers. Then, sign up for the free sandbox, obtain your API key, and make your first request. Once you’re comfortable, move to production and start building your financial application.
By using API Pull’s Banxico API, you save time on integration and gain access to a developer-friendly platform that grows with your business. Whether you’re building a fintech app, an AML compliance system, or a currency exchange service, the Banxico API is the starting point for accurate Mexican financial data.

