# BNM API - Malaysia FX Rates, OPR, Kijang Emas & MGS Yields (`jungle_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper`) Actor

Scrape Bank Negara Malaysia (BNM) Open API: daily MYR FX rates for 27 currencies, Overnight Policy Rate (OPR), bank base/lending rates (BR/BLR), kijang emas gold prices, MGS yields, and interbank rates. Date-range backfill. No auth required.

- **URL**: https://apify.com/jungle\_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## BNM API - Malaysia FX Rates, OPR, Kijang Emas & MGS Yields

Extract data from the **Bank Negara Malaysia (BNM) Open API** — the official Malaysian central bank data portal. Covers MYR foreign exchange rates, Overnight Policy Rate (OPR), bank base/lending rates, kijang emas gold prices, Malaysian Government Securities (MGS) yields, interbank swap volumes, and more. No authentication required.

### What you get

Each run returns clean, flat JSON records across all requested BNM endpoints:

- **Exchange Rates** (`exchange_rate`) — Daily MYR buying, selling, and middle rates for 27 currencies (USD, EUR, SGD, CNY, AUD, JPY, GBP, CAD, CHF, AED, and more). These are the legally-recognised BNM reference rates for MYR-denominated financial reporting.
- **Kijang Emas Gold** (`kijang_emas`) — BNM's official gold coin reference prices in RM per troy oz, half oz, and quarter oz. Used by gold dealers and jewellers across Malaysia.
- **Overnight Policy Rate** (`opr`) — BNM's benchmark monetary policy rate. Updated after each Monetary Policy Committee (MPC) meeting.
- **Bank Base Rates** (`base_rate`) — Published base rate (BR) and base lending rate (BLR) for 35+ Malaysian banks.
- **MGS Yields** (`mgs_yields`) — Malaysian Government Securities yields.
- **FX Turnover** (`fx_turnover`) — Daily MYR foreign exchange market turnover by tenor.
- **Interbank Swap** (`interbank_swap`) — Daily interbank swap volume by maturity (overnight through 12 months).
- **Interest Rates** (`interest_rate`) — Money market interest rates for overnight, 1-month, and 3-month tenors.
- **Welfare Fund Rate** (`welfare_fund_rate`) — Government welfare fund reference rates.

### Use cases

- **Fintech and accounting tools** — BNM rates are the legally-recognised reference for MYR-denominated financial reporting in Malaysia and Singapore
- **Gold dealers** — kijang emas is BNM's official gold reference, updated daily
- **Fixed-income teams** — MGS yield data for Malaysian Government Securities
- **Treasury and FX desks** — Daily MYR rates against 27 currencies for hedging and exposure management
- **Corporate finance** — OPR and bank base rate tracking for loan pricing analysis

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `endpoints` | array | `["exchange_rate", "kijang_emas", "opr"]` | BNM endpoints to fetch. Choose from: `exchange_rate`, `kijang_emas`, `base_rate`, `opr`, `mgs_yields`, `fx_turnover`, `interbank_swap`, `interest_rate`, `welfare_fund_rate` |
| `currencies` | array | `[]` (all) | ISO 4217 currency codes to filter for the `exchange_rate` endpoint. Empty = return all 27 currencies. |
| `dateMode` | string | `"latest"` | `"latest"` (current day), `"specific_date"` (one month), or `"date_range"` (multi-month backfill) |
| `startDate` | string | — | Required for `specific_date` and `date_range`. Format: `YYYY-MM-DD` |
| `endDate` | string | — | Required for `date_range`. Format: `YYYY-MM-DD` |
| `maxItems` | integer | `200` | Maximum number of records to return |

### Output

Each record includes:

```json
{
  "endpoint": "exchange_rate",
  "currency_code": "USD",
  "unit": 1,
  "buying_rate": 4.42,
  "selling_rate": 4.4255,
  "middle_rate": 4.4227,
  "date": "2026-05-15",
  "source_endpoint": "https://api.bnm.gov.my/public/exchange-rate",
  "scraped_at": "2026-05-16T10:00:00.000Z"
}
````

Gold (kijang emas) records:

```json
{
  "endpoint": "kijang_emas",
  "date": "2026-05-15",
  "gold_buying_per_oz": 18660,
  "gold_selling_per_oz": 19434,
  "gold_buying_per_half_oz": 9330,
  "gold_selling_per_half_oz": 9900,
  "gold_buying_per_quarter_oz": 4665,
  "gold_selling_per_quarter_oz": 5042,
  "source_endpoint": "https://api.bnm.gov.my/public/kijang-emas",
  "scraped_at": "2026-05-16T10:00:00.000Z"
}
```

OPR records:

```json
{
  "endpoint": "opr",
  "date": "2026-05-07",
  "opr_rate": 2.75,
  "source_endpoint": "https://api.bnm.gov.my/public/opr",
  "scraped_at": "2026-05-16T10:00:00.000Z"
}
```

### Data source

All data is sourced from the [BNM Open API](https://apikijangportal.bnm.gov.my/openapi) — Bank Negara Malaysia's publicly documented API with no authentication required. Data is official and updated daily by BNM.

### Notes

- No proxy required — the BNM API is globally accessible without IP restrictions
- Rate limit: 60 requests per minute (handled automatically with built-in throttling)
- Date-range backfill mode generates one API call per calendar month — historical data availability varies by endpoint
- Some endpoints (e.g. `mgs_yields`, `fx_turnover`) may return no data on weekends and public holidays

# Actor input Schema

## `sp_intended_usage` (type: `string`):

Please describe how you plan to use the data extracted by this crawler.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

Provide your email address so we can get in touch with you.

## `endpoints` (type: `array`):

No description

## `currencies` (type: `array`):

ISO 4217 codes to filter. Empty = all ~27 currencies.

## `dateMode` (type: `string`):

No description

## `startDate` (type: `string`):

No description

## `endDate` (type: `string`):

No description

## `maxItems` (type: `integer`):

No description

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "endpoints": [
    "exchange_rate",
    "kijang_emas",
    "opr"
  ],
  "currencies": [],
  "dateMode": "latest",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "endpoints": [
        "exchange_rate",
        "kijang_emas",
        "opr"
    ],
    "currencies": [],
    "dateMode": "latest",
    "startDate": "",
    "endDate": "",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "endpoints": [
        "exchange_rate",
        "kijang_emas",
        "opr",
    ],
    "currencies": [],
    "dateMode": "latest",
    "startDate": "",
    "endDate": "",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "endpoints": [
    "exchange_rate",
    "kijang_emas",
    "opr"
  ],
  "currencies": [],
  "dateMode": "latest",
  "startDate": "",
  "endDate": "",
  "maxItems": 10
}' |
apify call jungle_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jungle_synthesizer/bank-negara-malaysia-fx-rate-economy-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "BNM API - Malaysia FX Rates, OPR, Kijang Emas & MGS Yields",
        "description": "Scrape Bank Negara Malaysia (BNM) Open API: daily MYR FX rates for 27 currencies, Overnight Policy Rate (OPR), bank base/lending rates (BR/BLR), kijang emas gold prices, MGS yields, and interbank rates. Date-range backfill. No auth required.",
        "version": "1.0",
        "x-build-id": "XvjFO5nAAVqSSuqr1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jungle_synthesizer~bank-negara-malaysia-fx-rate-economy-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jungle_synthesizer-bank-negara-malaysia-fx-rate-economy-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~bank-negara-malaysia-fx-rate-economy-scraper/runs": {
            "post": {
                "operationId": "runs-sync-jungle_synthesizer-bank-negara-malaysia-fx-rate-economy-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~bank-negara-malaysia-fx-rate-economy-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-jungle_synthesizer-bank-negara-malaysia-fx-rate-economy-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "sp_intended_usage",
                    "sp_improvement_suggestions"
                ],
                "properties": {
                    "sp_intended_usage": {
                        "title": "What is the intended usage of this data?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Please describe how you plan to use the data extracted by this crawler."
                    },
                    "sp_improvement_suggestions": {
                        "title": "How can we improve this crawler for you?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide any feedback or suggestions for improvements."
                    },
                    "sp_contact": {
                        "title": "Contact Email",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide your email address so we can get in touch with you."
                    },
                    "endpoints": {
                        "title": "Endpoints to scrape",
                        "type": "array",
                        "description": "",
                        "items": {
                            "type": "string",
                            "enum": [
                                "exchange_rate",
                                "kijang_emas",
                                "base_rate",
                                "opr",
                                "mgs_yields",
                                "fx_turnover",
                                "interbank_swap",
                                "interest_rate",
                                "welfare_fund_rate"
                            ]
                        }
                    },
                    "currencies": {
                        "title": "Currency Filter (FX endpoint)",
                        "type": "array",
                        "description": "ISO 4217 codes to filter. Empty = all ~27 currencies.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dateMode": {
                        "title": "Date Mode",
                        "enum": [
                            "latest",
                            "specific_date",
                            "date_range"
                        ],
                        "type": "string",
                        "description": ""
                    },
                    "startDate": {
                        "title": "Start Date (YYYY-MM-DD)",
                        "type": "string",
                        "description": ""
                    },
                    "endDate": {
                        "title": "End Date (YYYY-MM-DD)",
                        "type": "string",
                        "description": ""
                    },
                    "maxItems": {
                        "title": "Max Records",
                        "type": "integer",
                        "description": "",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
