/General

Open API

What is it?

We publish monetary, financial and economic statistics on this site. The API is the programmatic interface to that data, for developers who want to query it on demand rather than download static files.

Every request goes to one host:

https://api.bnm.gov.my

Versions

There are two versions, and the switch at the top of the menu shows the endpoints of each.

  • v2 is the current API. Paths start with /v2/, every response has the same structure, and every error has the same format.
  • v1 is our earlier API, kept so that existing applications keep working. Paths start with /v1/, and each table answers exactly as it always has. See the v1 overview.

Both versions are built from the same data as the Data Catalogue, so they always agree with it and with each other.

Do I need this?

There are two ways to access the data programmatically: download the static files linked from the Data Catalogue, or query this API.

Use the API if…

  • You are building an application that queries data on demand, e.g. a rate lookup or a live dashboard.
  • You are embedding our data into another product, such as a news app or a data pipeline.
  • You need a stable, versioned interface with consistent response schemas.

Use the static files instead if…

  • You need a full dataset for analysis or research.
  • You are working in Python, R, or a BI tool and prefer direct downloads.
  • You want a whole time series at once rather than one period per request.