# Bank Negara Malaysia FX & Rates API
> Official central-bank data from Bank Negara Malaysia (BNM), the central bank of Malaysia, all quoted around the Malaysian Ringgit (MYR). Read every BNM foreign-exchange reference rate with its buying, selling and middle quote — each row carries the BNM quoting unit (the Japanese Yen, for example, is quoted per 100) plus a normalized myr_per_unit, so conversions are never ambiguous — look up a single currency, or convert any amount between two quoted currencies or MYR using the central-bank cross rate. Beyond FX, the same surface exposes the Kijang Emas gold bullion coin buying and selling prices (one, half and quarter ounce), the current Overnight Policy Rate set by the Monetary Policy Committee, and the published base rate, base lending rate and indicative effective lending rate for every licensed Malaysian bank. Rates always resolve to the latest published business-day fixing. Distinct from our other central-bank FX feeds: this bundles Malaysian FX, gold and policy/lending rates in one API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/malaysia-fx-api/..."
```

## Pricing
- **Free** (Free) — 1,620 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 49,600 calls/Mo, 6 req/s
- **Pro** ($35/Mo) — 214,000 calls/Mo, 18 req/s
- **Scale** ($80/Mo) — 912,000 calls/Mo, 45 req/s

## Endpoints

### FX

#### `GET /v1/exchange-rates` — All BNM FX reference rates

**Parameters:**
- `symbols` (query, optional, string) — Comma-separated currency codes to filter (omit for all) Example: `USD,EUR,SGD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/exchange-rates?symbols=USD%2CEUR%2CSGD"
```

**Response:**
```json
{
    "data": {
        "base": "MYR",
        "date": "2026-06-15",
        "count": 3,
        "rates": [
            {
                "base": "MYR",
                "date": "2026-06-15",
                "unit": 1,
                "currency": "EUR",
                "buying_rate": 4.6953,
                "middle_rate": 4.699,
                "myr_per_unit": 4.699,
                "selling_rate": 4.7027
            },
            {
                "base": "MYR",
                "date": "2026-06-15",
                "unit": 1,
                "currency": "SGD",
                "buying_rate": 3.1578,
                "middle_rate": 3.1604,
                "myr_per_unit": 3.1604,
                "selling_rate": 3.1629
            },
            {
                "base": "MYR",
                "date": "2026-06-15",
                "unit": 1,
                "currency": "USD",
                "buying_rate": 4.048,
                "middle_rate": 4.0505,
                "myr_per_unit": 4.0505,
                "selling_rate": 4.053
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:25.988Z",
        "request_id": "8075ce73-bcb5-4e09-8696-f7f1234da7d2"
    },
    "status": "ok",
    "message": "Rates retrieved successfully",
    "success": true
}
```

#### `GET /v1/rate` — Reference rate for one currency

**Parameters:**
- `code` (query, required, string) — ISO 4217 currency code Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/rate?code=USD"
```

**Response:**
```json
{
    "data": {
        "base": "MYR",
        "date": "2026-06-15",
        "unit": 1,
        "currency": "USD",
        "buying_rate": 4.048,
        "middle_rate": 4.0505,
        "myr_per_unit": 4.0505,
        "selling_rate": 4.053
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:26.081Z",
        "request_id": "a39ebead-5b03-4b53-8cb6-aba1cb394c95"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

### Convert

#### `GET /v1/convert` — Convert between currencies via the BNM cross rate

**Parameters:**
- `from` (query, required, string) — Source currency (or MYR) Example: `USD`
- `to` (query, required, string) — Target currency (or MYR) Example: `MYR`
- `amount` (query, optional, string) — Amount to convert Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/convert?from=USD&to=MYR&amount=100"
```

**Response:**
```json
{
    "data": {
        "to": "MYR",
        "base": "MYR",
        "from": "USD",
        "rate": 4.0505,
        "amount": 100,
        "result": 405.05
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:26.147Z",
        "request_id": "02318974-0e1c-4e26-9970-f892e3dcaaa2"
    },
    "status": "ok",
    "message": "Conversion computed successfully",
    "success": true
}
```

### Gold

#### `GET /v1/gold` — Kijang Emas gold bullion prices

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/gold"
```

**Response:**
```json
{
    "data": {
        "one_oz": {
            "buying": 17701,
            "selling": 18436
        },
        "half_oz": {
            "buying": 8850,
            "selling": 9392
        },
        "currency": "MYR",
        "instrument": "Kijang Emas (Malaysian gold bullion coin)",
        "quarter_oz": {
            "buying": 4425,
            "selling": 4783
        },
        "effective_date": "2026-06-15"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:26.475Z",
        "request_id": "1d9a951f-dd0c-4fa8-9064-054a6c2d613f"
    },
    "status": "ok",
    "message": "Gold prices retrieved successfully",
    "success": true
}
```

### Rates

#### `GET /v1/base-rates` — Per-bank base and lending rates

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/base-rates"
```

**Response:**
```json
{
    "data": {
        "banks": [
            {
                "bank_code": "AFFINBANK",
                "bank_name": "Affin Bank",
                "base_rate": 2.7,
                "base_lending_rate": 5.56,
                "indicative_eff_lending_rate": 3.3
            },
            {
                "bank_code": "ALLIANCEB",
                "bank_name": "Alliance Bank",
                "base_rate": 2.57,
                "base_lending_rate": 5.42,
                "indicative_eff_lending_rate": 3.11
            },
            {
                "bank_code": "AMBANK",
                "bank_name": "AmBank",
                "base_rate": 2.6,
                "base_lending_rate": 5.45,
                "indicative_eff_lending_rate": 3.25
            },
            {
                "bank_code": "BANGKOK",
                "bank_name": "Bangkok Bank Berhad",
                "base_rate": 3.22,
                "base_lending_rate": 5.87,
                "indicative_eff_lending_rate": 4.42
            },
            {
                "bank_code": "BANKCHINA",
                "bank_name": "Bank of China (Malaysia) Berhad",
                "base_rate": 2.55,
                "base_lending_rate": 5.35,
                "indicative_eff_lending_rate": 3.55
            },
            {
                "bank_code": "CIMB BANK",
                "bank_name": "CIMB Bank Berhad",
                "base_rate": 2.75,
                "base_lending_rate": 5.6,
                "indicative_eff_lending_ra
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/opr` — Current Overnight Policy Rate

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/opr"
```

**Response:**
```json
{
    "data": {
        "date": "2026-05-07",
        "year": 2026,
        "indicator": "Overnight Policy Rate (OPR)",
        "change_in_opr": 0,
        "new_opr_level_percent": 2.75
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:27.096Z",
        "request_id": "a5102725-9a93-4b1b-8918-d9d9306bac24"
    },
    "status": "ok",
    "message": "Policy rate retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/malaysia-fx-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Bank Negara Malaysia FX & Rates API",
        "source": "Bank Negara Malaysia Open API (api.bnm.gov.my)",
        "endpoints": [
            {
                "path": "/v1/exchange-rates",
                "description": "All BNM FX reference rates (optional ?symbols=USD,EUR)"
            },
            {
                "path": "/v1/rate",
                "description": "Reference rate for one currency (?code=USD)"
            },
            {
                "path": "/v1/convert",
                "description": "Convert between currencies or MYR (?from=USD&to=MYR&amount=100)"
            },
            {
                "path": "/v1/gold",
                "description": "Kijang Emas gold bullion buying/selling prices"
            },
            {
                "path": "/v1/opr",
                "description": "Current Overnight Policy Rate"
            },
            {
                "path": "/v1/base-rates",
                "description": "Per-bank base and lending rates"
            },
            {
                "path": "/v1/meta",
                "description": "This metadata document"
            }
        ],
        "disclaimer": "Unofficial proxy of the public Bank Negara Malaysia Open API. Not affiliated with BNM. Reference data only.",
        "description": "Official foreign-exchange reference rates (base MYR), Kijang Emas gold bullion prices, the Overnight Policy Rate and per-bank base lending rates, published by Bank Negara M
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/malaysia-fx-api
OpenAPI spec: https://www.oanor.com/api/malaysia-fx-api/openapi.json
