Guide · Mexico economic indicators

Banxico API: how to get Mexico's FIX exchange rate, today's UDIS and the TIIE from Banco de México

How to get official Banco de México indicators from your code or an AI agent: what the SIE publishes, how its API works directly, and how to receive the FIX exchange rate, the UDI value, the TIIE, the policy target rate and inflation as clean JSON with Better Llama's MCP tool, with no token to request.

What is Banxico's SIE and which indicators does it publish?

The Sistema de Información Económica (SIE) is Banco de México's time-series repository. Among many others, it holds the series people look up most in Mexico:

  • FIX exchange rate (series SF43718): the pesos per dollar Banxico determines every business day, used to settle dollar obligations payable in Mexico.
  • UDIS (SP68257): the daily value of the Unidad de Inversión, which tracks inflation and is used in loans, mortgages and indexed contracts.
  • TIIE at 28, 91 and 182 days and the overnight funding TIIE: the benchmark interbank interest rates.
  • The monetary policy target rate and annual INPC inflation.

Banco de México generally authorizes reproducing and using the information it publishes, as long as the source and the Bank's web address are mentioned (terms of use, in Spanish). That is why every answer from our tool carries the citation «Fuente: Banco de México (SIE)» with the link https://www.banxico.org.mx/SieAPIRest/.

Two ways to get Banxico data by API

1. The SIE REST API, directly

The SIE API needs a free token, requested on Banxico's site and sent in the Bmx-Token header. For example, the latest FIX and UDIS values:

curl · SIE API
curl -s -H "Bmx-Token: $BANXICO_TOKEN" \
  "https://www.banxico.org.mx/SieAPIRest/service/v1/series/SF43718,SP68257/datos/oportuno?mediaType=json"

Real response (Saturday, November 21, 2026):

json
{"bmx": {"series": [
  {"idSerie": "SF43718", "titulo": "Tipo de cambio Pesos por dólar E.U.A. Tipo de cambio para solventar obligaciones denominadas en moneda extranjera Fecha de determinación (FIX)",
   "datos": [{"fecha": "20/11/2026", "dato": "19.0228"}]},
  {"idSerie": "SP68257", "titulo": "Valor de UDIS",
   "datos": [{"fecha": "25/11/2026", "dato": "8.932476"}]}]}}

The integration is up to you: dates come as dd/mm/yyyy, values as text, and the UDIS «timely value» is the one for November 25, because Banxico publishes the UDI in advance. If you need the value in force today, you have to request a range and pick it yourself.

2. Better Llama's Banxico tool (over MCP)

Our tool Mexico FIX exchange rate, UDIS, TIIE and inflation (Banxico), mexico_banxico_indicators, queries that same API and returns a ready-to-use result:

  • No token to request: during the beta we use ours, with a 30-minute cache. To use yours, send it in the X-Banxico-Token header.
  • Simple names (fix, udis, tiie_28, tasa_objetivo…) instead of series codes, up to eight per call.
  • The value in force today in Mexico City time, with the advance value apart in published_ahead and a notice in warnings.
  • ISO dates, numeric values, unit and series code, and the source attribution in every answer.

Use it as an MCP tool from Claude, Cursor or other agents, or over HTTP with JSON-RPC from any language.

Step by step: get Banxico indicators

Step 1. Choose the indicators

Pass one or more of these names in indicators. These are the real values the tool returned on November 21, 2026 at 18:18 Chile time:

IndicatorSIE seriesDateValue
fixFIX exchange rate (SF43718)2026-11-2019.0228 pesos per dollar
udisUDI value (SP68257)2026-11-218.923181 pesos per UDI
tasa_objetivoPolicy target rate (SF61745)2026-11-216.25 % per year
tiie_2828-day TIIE (SF60648)2026-11-206.5147 % per year
tiie_fondeoOvernight funding TIIE (SF331451)2026-11-206.29 % per year
inflacion_anualAnnual inflation (INPC) (SP30578)2026-103.75 %

Step 2. Connect the MCP server

Use the MCP https://mcp.betterllama.com/mcp in your client or call it over HTTP with JSON-RPC, as in the examples. No account or sign-up is needed during the beta.

Step 3. Build your query

ParameterWhat it does
indicatorsOne or more of fix, udis, tiie_28, tiie_91, tiie_182, tiie_fondeo, tasa_objetivo, inflacion_anual. Default ["fix"]
dateA day (YYYY-MM-DD): the value in force that day, that is, the latest published on or before that date. Do not combine with fromDate/toDate
fromDate / toDateFrom and to (YYYY-MM-DD, inclusive): the series for the range, newest first. Up to 2 years for daily series
maxItemsMaximum points per series (1 to 1000, default 100)

If you ask for a day with no data, such as a weekend or a bank holiday, you get the latest published value and a notice. For example, there was no FIX on Monday, November 16, 2026, and the tool returns Friday the 13th's (18.5525).

This is the real FIX series from November 9 to 21, 2026, as the tool returns it with fromDate and toDate:

Determination dateFIX (pesos per dollar)
2026-11-2019.0228
2026-11-1919.027
2026-11-1818.6723
2026-11-1718.4677
2026-11-1318.5525
2026-11-1218.6188
2026-11-1118.6192
2026-11-1018.6678
2026-11-0918.5983

Step 4. Call the tool with curl

A JSON-RPC POST returns the result as JSON. This call asks for today's FIX, UDIS and target rate:

curl
curl -s https://mcp.betterllama.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "mexico_banxico_indicators", "arguments": {"indicators": ["fix", "udis", "tasa_objetivo"]}}}'

The same in Python

Today's values and a week of FIX:

python
import json
import requests

URL = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream"}

def banxico(arguments):
    body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
            "params": {"name": "mexico_banxico_indicators", "arguments": arguments}}
    resp = requests.post(URL, json=body, headers=HEADERS, timeout=60)
    resp.raise_for_status()
    return json.loads(resp.json()["result"]["content"][0]["text"])

# Value in force today for FIX, UDIS and the 28-day TIIE
today = banxico({"indicators": ["fix", "udis", "tiie_28"]})
for r in today["results"]:
    print(r["indicator"], r["latest"]["date"], r["latest"]["value"], r["unit"])

# FIX exchange rate for the week
series = banxico({"indicators": ["fix"], "fromDate": "2026-11-16", "toDate": "2026-11-21"})
for p in series["results"][0]["points"]:
    print(p["date"], p["value"])

Real output (November 21, 2026, 18:21 Chile time):

output
fix 2026-11-20 19.0228 MXN por 1 USD
udis 2026-11-21 8.923181 MXN por 1 UDI
tiie_28 2026-11-20 6.5147 % anual
2026-11-20 19.0228
2026-11-19 19.027
2026-11-18 18.6723
2026-11-17 18.4677

From JavaScript or any other language, a POST with the same JSON-RPC body is enough (for example, with fetch).

Use the Banxico API from an AI agent (MCP)

Add the Better Llama MCP server to your client (Claude, Cursor, VS Code or any other with remote MCP). One MCP brings mexico_banxico_indicators and the rest of the catalog, with no sign-up during the beta.

Cursor · mcp.json
{
  "mcpServers": {
    "better-llama": {
      "url": "https://mcp.betterllama.com/mcp"
    }
  }
}
Claude Code
claude mcp add --transport http better-llama https://mcp.betterllama.com/mcp

Setup for Claude, Codex, Gemini CLI, Windsurf, VS Code and other clients: connect your agent.

Ready-to-run Python and Node.js examples, with config files for each client: examples repository on GitHub.

Then ask, for example: «What is today's FIX exchange rate, what is the UDI worth and how did the dollar move in Mexico this week? Cite the source.»

Beta: free and with no sign-up while we test the service.

Which fields it returns

Each item in results has indicator (the name you asked for), seriesId (SIE code), name, unit, frequency and latest with date (ISO) and value (numeric). If Banxico has already published a value for a future date, it goes in published_ahead. With a range you also get requestedRange, count and points. The answer includes warnings, attribution, source, sourceUpdatedAt (date of the newest value) and retrievedAt.

Real, complete response to the curl call above (November 21, 2026, 18:21 Chile time). The UDI in force that Saturday was 8.923181 pesos, and Banxico had already published the one for November 25:

json
{
  "tool": "mexico_banxico_indicators",
  "count": 3,
  "results": [
    {
      "indicator": "fix",
      "seriesId": "SF43718",
      "name": "Tipo de cambio FIX (pesos por dólar E.U.A., fecha de determinación)",
      "unit": "MXN por 1 USD",
      "frequency": "diaria",
      "latest": {
        "date": "2026-11-20",
        "value": 19.0228
      }
    },
    {
      "indicator": "udis",
      "seriesId": "SP68257",
      "name": "Valor de la UDI (Unidad de Inversión)",
      "unit": "MXN por 1 UDI",
      "frequency": "diaria",
      "latest": {
        "date": "2026-11-21",
        "value": 8.923181
      },
      "published_ahead": {
        "date": "2026-11-25",
        "value": 8.932476
      }
    },
    {
      "indicator": "tasa_objetivo",
      "seriesId": "SF61745",
      "name": "Tasa objetivo de política monetaria del Banco de México",
      "unit": "% anual",
      "frequency": "diaria",
      "latest": {
        "date": "2026-11-21",
        "value": 6.25
      },
      "published_ahead": {
        "date": "2026-11-22",
        "value": 6.25
      }
    }
  ],
  "warnings": [
    "udis: Banxico ya publicó el valor para 2026-11-25 (posterior a hoy, 2026-11-21 en Ciudad de México); latest es el vigente hoy (2026-11-21) y el adelantado va en \"published_ahead\".",
    "tasa_objetivo: Banxico ya publicó el valor para 2026-11-22 (posterior a hoy, 2026-11-21 en Ciudad de México); latest es el vigente hoy (2026-11-21) y el adelantado va en \"published_ahead\"."
  ],
  "attribution": "Fuente: Banco de México (SIE), https://www.banxico.org.mx/SieAPIRest/ — reutilización permitida citando la fuente. Datos sin modificar salvo formato; no constituyen asesoramiento. sourceUpdatedAt es la fecha del dato más reciente publicado por Banxico en esta respuesta.",
  "source": "https://www.banxico.org.mx/SieAPIRest/",
  "sourceUpdatedAt": "2026-11-21",
  "retrievedAt": "2026-11-21T21:21:26.078Z"
}

If you reuse the data, cite «Fuente: Banco de México (SIE)» with the link https://www.banxico.org.mx/SieAPIRest/, as Banco de México's terms of use require.

Pricing

Free during the beta, with no sign-up and a limit of 60 requests per minute per IP. If paid plans come later, we will announce them on betterllama.com first. You do not need your own SIE token.

Frequently asked questions

Does Banxico have an API?

Yes. Banco de México offers the SIE (Sistema de Información Económica) REST API, which returns any series by its code and needs a free token. Better Llama's mexico_banxico_indicators tool queries that API and returns the most used indicators as clean JSON over MCP or JSON-RPC, without you requesting a token.

How do I get today's FIX exchange rate by API?

Call mexico_banxico_indicators with indicators ["fix"] and no dates: it returns the latest FIX determined. On November 21, 2026 that was November 20's: 19.0228 pesos per dollar.

What are UDIS worth today?

Ask for indicators ["udis"]: latest has the value in force today in Mexico City and published_ahead the one Banxico has already published for a future date. On November 21, 2026 the UDI was worth 8.923181 pesos.

What happens on weekends and holidays?

FIX and TIIE are only determined on bank business days. If you ask for a date with no data, the tool returns the latest published value and says so in warnings. UDIS do have a value every day.

Do I need an SIE token?

No. During the beta the server uses a Better Llama token. If you need more quota, you can send your own free token in the X-Banxico-Token header; it is used only for that request and never stored.

How up to date is the data?

It is what Banxico publishes in the SIE at query time, with up to 30 minutes of caching. sourceUpdatedAt gives the date of the newest value in the answer.

Can I reuse Banxico data?

Yes. Banco de México generally authorizes reproducing and using the information it publishes, citing the source and its web address. Cite «Fuente: Banco de México (SIE), https://www.banxico.org.mx/SieAPIRest/»; every answer carries the attribution field with the citation.

Is Better Llama affiliated with Banco de México?

No. Better Llama is an independent project, not affiliated with, sponsored or endorsed by Banco de México. The data comes from the SIE API and is reused under Banco de México's terms of use.

Other guides

This guide is also available en español.