IDX Realtime Market Data API
Mengambil snapshot harga terkini satu atau banyak saham IDX menggunakan POST body agar cocok untuk watchlist berisi banyak symbol.
Base Information
- BASE_URL_API:
https://api.maelyn.eu/api - Path / Endpoint:
/financial/idx/realtime-price - Method:
POST - Credit Usage:
10
Authentication
x-maelyn-auth: YOUR_API_KEY
content-type: application/json
Description
Endpoint ini mengambil snapshot harga terkini untuk satu atau banyak saham IDX. Method yang digunakan adalah POST karena umumnya endpoint ini dipakai untuk watchlist yang dapat berisi banyak symbol.
Endpoint ini bersifat one-shot snapshot. Untuk tampilan realtime di frontend, panggil endpoint ini berkala dari sisi client atau backend scheduler, misalnya setiap 10–30 detik.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
symbols | array<string> | Yes | Daftar kode saham IDX. Maksimal 20 symbol |
symbol | string | No | Alternatif untuk mengambil satu saham saja |
Example Usage
1. Snapshot beberapa saham
POST /financial/idx/realtime-price
{
"symbols": ["BBCA", "BBRI", "TLKM", "GOTO"]
}
2. Snapshot satu saham
{
"symbol": "BBCA"
}
Success Response
{
"success": true,
"data": {
"mode": "snapshot",
"total_requested": 3,
"symbols": ["BBCA", "BBRI", "TLKM"],
"prices": {
"BBCA": {
"symbol": "BBCA",
"name": "Bank Central Asia Tbk",
"price": 9500,
"prevPrice": 9400,
"open": 9400,
"high": 9550,
"low": 9350,
"volume": 55000000,
"tick": 100,
"tickPct": 1.06,
"direction": "UP",
"high52w": 10500,
"low52w": 8200,
"timestamp": "2026-05-29T00:00:00.000+07:00",
"date": "2026-05-29",
"error": null
}
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
mode | string | Selalu snapshot |
symbols | array | Daftar symbol yang diproses |
prices | object | Object harga keyed by symbol |
prices.{symbol}.price | number | Harga terakhir |
prices.{symbol}.prevPrice | number | Harga pembanding sebelumnya |
prices.{symbol}.tick | number | Perubahan harga dari pembanding |
prices.{symbol}.tickPct | number | Persentase perubahan harga |
prices.{symbol}.direction | string | UP, DOWN, atau FLAT |
prices.{symbol}.volume | number | Volume candle terakhir |
Error Response
{
"success": false,
"message": "Body wajib berisi symbols array"
}