Malaysia BNM FX, OpenDOSM Fuel & LHDN MyInvois MSIC Sync avatar

Malaysia BNM FX, OpenDOSM Fuel & LHDN MyInvois MSIC Sync

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Malaysia BNM FX, OpenDOSM Fuel & LHDN MyInvois MSIC Sync

Malaysia BNM FX, OpenDOSM Fuel & LHDN MyInvois MSIC Sync

Fetches normalized live Bank Negara Malaysia (BNM) exchange rates, OpenDOSM weekly RON95/RON97/Diesel/BUDI95 pump prices, and LHDN MyInvois MSIC 2008 classification codes with SHA-256 diff hashes for automated ERP, accounting, and AI workflows.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

ZY

ZY

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Categories

Features

Limited permissions

Share

Malaysia BNM MYR FX, OpenDOSM Fuel & LHDN e-Invoice Malaysia Sync

A lightweight, zero-bloat Apify Actor providing a unified MYR exchange rate API (Ringgit FX via BNM Open API), OpenDOSM weekly retail fuel pump prices, and LHDN e-Invoice Malaysia (MyInvois) MSIC 2008 classification codes—with deterministic SHA-256 diff hashes built for n8n webhook, ERP, and accounting automation.

Supported Official Public Sources

  1. Bank Negara Malaysia (BNM) Open API — Official Ringgit FX (MYR) buying, selling, and middle exchange rates (USD, SGD, EUR, GBP, JPY, or all published currencies).
  2. OpenDOSM Official Data Catalogue — Weekly Malaysian retail fuel pump prices (RON95, RON97, Diesel, RON95 BUDI95, BUDI Diesel) plus week-over-week deltas.
  3. LHDN e-Invoice Malaysia (MyInvois SDK Reference) — Official MSIC 2008 classification codes (1,174 codes across Sections A–U) filterable by section letter or keyword.

Output Modes & Sample JSON

1. Snapshot Mode (emitIndividualRecords: false, default)

Emits 1 structured, SHA-256 diff-hashed record per enabled source:

{
"source": "bnm_fx",
"sourceUrl": "https://api.bnm.gov.my/public/exchange-rate",
"fetchedAtUtc": "2026-11-15T00:00:00Z",
"recordCount": 5,
"sha256": "9c3f4d8e2f8f4f5c8f3b21c2d09a4b7b9e6c1a2d3e4f5a6b7c8d9e0f1a2b3c4d",
"summary": {
"lastUpdated": "2026-11-14 17:00:00",
"usdMiddleRate": 4.415
},
"data": {
"lastUpdated": "2026-11-14 17:00:00",
"session": "1700",
"rates": [
{
"currencyCode": "USD",
"unit": 1,
"date": "2026-11-14",
"buyingRate": 4.405,
"sellingRate": 4.425,
"middleRate": 4.415
}
]
}
}

2. Flat Records Mode (emitIndividualRecords: true)

Emits clean, tabular per-item rows (inspectable directly in the Flat Individual Records Console view):

[
{
"source": "bnm_fx",
"lastUpdated": "2026-11-14 17:00:00",
"fetchedAtUtc": "2026-11-15T00:00:00Z",
"currencyCode": "USD",
"unit": 1,
"date": "2026-11-14",
"buyingRate": 4.405,
"sellingRate": 4.425,
"middleRate": 4.415
},
{
"source": "opendosm_fuel",
"fetchedAtUtc": "2026-11-15T00:00:00Z",
"date": "2026-11-14",
"ron95": 2.05,
"ron97": 3.19,
"diesel": 2.95,
"ron95Budi95": 1.99,
"dieselBudi": 2.15,
"deltaRon95": 0.0,
"deltaRon97": -0.02,
"deltaDiesel": 0.0
},
{
"source": "lhdn_msic",
"fetchedAtUtc": "2026-11-15T00:00:00Z",
"code": "62010",
"description": "Computer programming activities",
"category": "J"
}
]

SHA-256 Diff-Detection Automation Recipe (n8n webhook / Cron)

Avoid redundant ERP writes or noisy Slack/Telegram alerts by comparing sha256 against your last stored hash:

  1. Schedule this Actor (e.g., daily at 17:15 MYT for BNM Open API, or Wednesday 18:00 MYT for OpenDOSM fuel).
  2. Read the returned sha256 per source (bnm_fx, opendosm_fuel, lhdn_msic) in an n8n webhook or IF node.
  3. Compare item.sha256 !== previousHash[item.source]:
    • Equal: Stop early (zero downstream database writes).
    • Changed: Update previousHash[item.source], upsert FX/fuel/MSIC records into your database, and fire your notification webhook.

API Integration (curl)

curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~my-gov-macro-myinvois-sync/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"includeBnmFx": true,
"currencies": ["USD", "SGD", "EUR", "GBP", "JPY"],
"includeDosmFuel": true,
"includeLhdnMsic": true,
"msicCategoryFilter": "J",
"emitIndividualRecords": false
}'

Local Testing

$python3 -m unittest discover -s tests -v