Malaysia Stocks API Integration Guide: Real-Time Quotes & Historical Data

Bursa Malaysia serves as the core capital market hub of ASEAN, hosting high-quality blue-chip issuers such as Malayan Banking (Maybank), Public Bank Berhad, Tenaga Nasional Berhad, and others — attracting significant interest from global quantitative traders and cross-border investors. However, obtaining stable, low-latency Malaysian equity data has long been a pain point for developers: free endpoints suffer from high latency, incomplete historical coverage, and lack of WebSocket support. This guide provides a comprehensive walkthrough on leveraging the iTick API to rapidly integrate Bursa Malaysia data, delivering a complete solution from real-time quotes to historical backtesting.
Why Professional Malaysia Stock APIs Are Essential
When investing in Malaysian equities or developing quantitative strategies, data quality directly determines success. Below are the common challenges developers face:
| Challenge | Issues with Free Endpoints | iTick Solution |
|---|---|---|
| Data Latency | 15-minute delay, missing opportunities | WebSocket real-time push <50 ms |
| Historical Gaps | Only 1–2 years available, insufficient for long-cycle backtesting | 15+ years of daily/minute bars |
| Market Coverage | Limited to major index constituents | Full Bursa Malaysia universe |
| Protocol Limitation | REST polling only, no real-time push | REST + WebSocket + FIX |
| Reliability | Frequent disconnections, no auto-reconnect | Enterprise-grade high-availability architecture |
As a professional global financial data provider, iTick delivers comprehensive coverage for the Malaysian market (region=MY) with developer-friendly APIs. The free tier already includes unlimited basic real-time quotes — making it the ideal entry point for individuals and teams.
iTick Malaysia Stocks API — Core Capabilities Overview
iTick provides the following key data services for Bursa Malaysia, addressing diverse use cases:
- Real-Time Quotes (REST API): Latest price, percentage change, volume, order book snapshots — latency <100 ms
- Historical OHLCV Bars (REST API): Daily, weekly, monthly, and intraday bars — up to 30+ years, perfect for strategy backtesting
- WebSocket Real-Time Streaming: Subscribe to
tick(trade-by-trade),quote(Level-1),depth(Level-2) — latency <50 ms - Fundamental Data: Financial ratios, valuation metrics
- Multi-Market Support: Seamless access to Malaysia, Singapore, Korea, Hong Kong, Taiwan, Japan, India, Thailand, Vietnam, and more via a single API
1. 5-Minute Quick Start: Fetching Malaysia Real-Time Quotes
1. Register & Obtain API Token
Visit the iTick official website to register (≈30 seconds). Your dedicated API Token is available immediately in the developer console.
2. Install Python Dependencies
pip install requests websocket-client
3. Retrieve Real-Time Quote (REST API)
The code below fetches the live quote for Malayan Banking Berhad (ticker: MAYBANK):
import requests
API_TOKEN = "your_token_here" # Replace with your actual token
BASE_URL = "https://api.itick.org"
def get_malaysia_quote(symbol):
url = f"{BASE_URL}/stock/quote"
params = {"region": "MY", "code": symbol}
headers = {"token": API_TOKEN}
try:
resp = requests.get(url, params=params, headers=headers, timeout=5)
data = resp.json()
if data.get("code") == 0:
quote = data["data"]
print(f"📈 {quote.get('n')} ({quote.get('s')})")
print(f"Last Price: {quote.get('ld')} MYR")
print(f"Change %: {quote.get('chp')}%")
print(f"Volume: {quote.get('v')}")
return quote
else:
print(f"API Error: {data.get('msg')}")
except Exception as e:
print(f"Request Exception: {e}")
# Example call
get_malaysia_quote("MAYBANK") # Maybank
4. Retrieve Historical Bars (Backtesting Ready)
Historical data forms the foundation of quantitative backtesting. The snippet below fetches the last 100 trading days for Maybank:
def get_malaysia_kline(symbol, ktype=8, limit=100):
"""ktype: 8=daily, 9=weekly, 10=monthly, 1–5=intraday bars"""
url = f"{BASE_URL}/stock/kline"
params = {"region": "MY", "code": symbol, "kType": ktype, "limit": limit}
headers = {"token": API_TOKEN}
resp = requests.get(url, params=params, headers=headers)
data = resp.json()
if data.get("code") == 0:
kline_list = data.get("data", [])
print(f"Retrieved {len(kline_list)} bars")
for item in kline_list[-5:]: # Show last 5 bars
print(f"Time:{item['t']} O:{item['o']} H:{item['h']} L:{item['l']} C:{item['c']} Vol:{item['v']}")
else:
print(f"Error: {data.get('msg')}")
get_malaysia_kline("MAYBANK", limit=10) # Last 10 trading days
5. WebSocket Real-Time Streaming (Low-Latency)
For latency-sensitive quantitative strategies, WebSocket is essential. The example below subscribes to live quotes for three Malaysian blue-chips:
import websocket
import json
import threading
import time
WS_URL = "wss://api.itick.org/stock"
API_TOKEN = "your_token_here"
def on_message(ws, message):
data = json.loads(message)
if "data" in data:
md = data["data"]
if md.get("type") == "quote":
print(f"[{md['s']}] Last: {md['ld']} MYR | Chg: {md['chp']}%")
def on_open(ws):
# Subscription format: ticker$MY
subscribe = {
"ac": "subscribe",
"params": "MAYBANK$MY,PBBANK$MY,TENAGA$MY",
"types": "quote"
}
ws.send(json.dumps(subscribe))
def send_ping(ws):
while True:
time.sleep(30)
ws.send(json.dumps({"ac": "ping", "params": str(int(time.time()*1000))}))
ws = websocket.WebSocketApp(WS_URL, header={"token": API_TOKEN},
on_open=on_open, on_message=on_message)
threading.Thread(target=send_ping, args=(ws,), daemon=True).start()
ws.run_forever()
2. Key Bursa Malaysia Market Reference
Ticker Format & Market Identifier
- Local codes: e.g. MAYBANK, PBBANK, TENAGA (case-insensitive)
- REST request:
region=MY+code=MAYBANK - WebSocket subscription:
MAYBANK$MY
Major Malaysian Equities Reference (SEO-Optimized)
| Company Name | Ticker | Sector | Business Overview |
|---|---|---|---|
| Malayan Banking Berhad (Maybank) | MAYBANK | Financials | Malaysia’s largest banking group |
| Public Bank Berhad | PBBANK | Financials | Leading retail-focused bank |
| Tenaga Nasional Berhad | TENAGA | Utilities | National power utility giant |
| CIMB Group Holdings Berhad | CIMB | Financials | Regional universal banking group |
| Petronas Chemicals Group Berhad | PCHEM | Chemicals | Leading petrochemical producer |
| IHH Healthcare Berhad | IHH | Healthcare | Major private hospital operator |
| Axiata Group Berhad | AXIATA | Telecommunications | Multinational telecom operator |
| IOI Corporation Berhad | IOICORP | Plantations | Global palm oil leader |
Trading Hours & Currency
- Regular session: Malaysia time 09:00 – 17:00 (lunch break 13:00 – 14:30)
- Corresponding Beijing / Hong Kong time: Same (no time difference)
- Trading currency: Malaysian Ringgit (MYR)
3. Why iTick Stands Out as the Best Malaysia Stock API Choice
A side-by-side comparison with common alternatives highlights iTick’s advantages:
| Dimension | iTick API | Traditional Broker API | Free Public Endpoints |
|---|---|---|---|
| Real-Time Latency | WebSocket <50 ms | REST polling >500 ms | 15-minute delay |
| Historical Depth | 30+ years daily/intraday | Usually 5–10 years | 1–2 years only |
| Market Coverage | Full Bursa Malaysia universe | Limited to tradable | Index constituents |
| Protocol Support | REST + WebSocket + FIX | Usually REST only | REST only |
| Free Tier | ✓ Unlimited basic quotes | ✗ Requires account | ✓ But rate-limited |
| Multi-Asset | Equities / FX / Futures / Funds | Equities only | Equities only |
Real-World Use Cases
- Quantitative Traders: Subscribe to Maybank / Public Bank Level-1 quotes via WebSocket (<50 ms), combine with long-history bars for alpha strategy development and live execution.
- Fintech Application Developers: Integrate Bursa Malaysia quotes into mobile/web apps using REST — free tier supports early-stage user growth.
- Cross-Border Investors: Retrieve fundamental metrics for Tenaga, PCHEM, etc., to support informed allocation decisions.
4. Frequently Asked Questions (FAQ)
Q1: Does the iTick free tier provide historical data for Malaysian stocks?
A: Yes — daily bars are accessible (with quantity limits), sufficient for personal study and lightweight backtesting. Upgrade to paid for extended periods or intraday granularity.
Q2: Do I need to implement WebSocket reconnection myself?
A: Recommended for production. The example includes basic heartbeat; refer to the official iTick documentation for full auto-reconnect patterns.
Q3: Are Bursa Malaysia tickers case-sensitive?
A: No — but use official uppercase format (e.g. MAYBANK) for consistency.
Q4: Does iTick support company financials / fundamentals?
A: Yes — financial ratios and key metrics are available via the /stock/info endpoint. See official docs for parameters.
Q5: How to get technical support?
A: Detailed documentation is on the iTick website; paid users receive priority support via email or Telegram @iticksupport.
5. Summary
This guide has equipped you with the core techniques to integrate Bursa Malaysia data using iTick API — from real-time Level-1 quotes and WebSocket streaming to deep historical bars. iTick delivers a unified, low-latency, highly reliable data service suitable for quantitative systems, robo-advisors, mobile apps, and academic research.
Register today at https://itick.org and start building with Malaysian equity data.
Further Reading:
- Free Japan Stock Quote APIs Compared
- Korea Stocks API Guide: KRX Real-Time & Historical Access
- Singapore Stocks API Guide: SGX Real-Time & Historical Integration
- Thailand Real-Time Quote API Comparison & iTick Advantages
- 2026 Vietnam Stock Exchange (VN30, HOSE) API Guide
- Official iTick API Documentation
- iTick GitHub Repository