idx stocks quote BBCA,BBRI,TLKM
╭────────┬──────────────────────────────┬───────┬──────┬─────────┬───────┬───────┬───────┬───────────────┬─────────┬───────┬────────╮
│ Symbol ┆ Name ┆ Price ┆ Chg ┆ Chg % ┆ Open ┆ High ┆ Low ┆ Volume ┆ Mkt Cap ┆ P/E ┆ Div % │
╞════════╪══════════════════════════════╪═══════╪══════╪═════════╪═══════╪═══════╪═══════╪═══════════════╪═════════╪═══════╪════════╡
│ BBCA ┆ PT Bank Central Asia Tbk ┆ 5,175 ┆ -900 ┆ -14.81% ┆ 5,825 ┆ 5,825 ┆ 5,175 ┆ 1,241,098,200 ┆ 635.7T ┆ 10.96 ┆ 6.27% │
│ BBRI ┆ PT Bank Rakyat Indonesia (P… ┆ 2,640 ┆ -460 ┆ -14.84% ┆ 2,640 ┆ 2,890 ┆ 2,640 ┆ 1,193,916,400 ┆ 397.8T ┆ 6.49 ┆ 13.48% │
│ TLKM ┆ Perusahaan Perseroan (Perse… ┆ 1,900 ┆ -330 ┆ -14.80% ┆ 1,900 ┆ 1,985 ┆ 1,900 ┆ 963,614,200 ┆ 187.3T ┆ 10.98 ┆ 10.01% │
╰────────┴──────────────────────────────┴───────┴──────┴─────────┴───────┴───────┴───────┴───────────────┴─────────┴───────┴────────╯
Last trade 2026-10-16 16:14 WIB · market closed · delayed data
idx -o json stocks quote BBCA | jq '.data[0] | {price, change_pct, pe_trailing, dividend_yield_pct}'
{ "price": 5175.0, "change_pct": -14.814815, "pe_trailing": 10.963983, "dividend_yield_pct": 6.27 }
- Free data, no keys. Yahoo Finance and MSN Money for prices and
fundamentals, the exchange's own idx.co.id summaries for foreign flow,
member activity, indices and the corporate-action calendar, IDX's monthly
KSEI register for ownership, Indo Premier's broker summary for who bought
and sold (read as bandarmology by
idx bandar) and its corporate-action pages, Kontan and CNBC Indonesia feeds for news. Every source sits behind aProvidertrait, so one breaking does not take the tool down, andautofills gaps in one source's fundamentals from the other. - Built for agents.
-o jsonemits a stable, schema-documented envelope (idx schema quotes). Exit codes mean something.idx mcpexposes every command as a typed MCP tool that returns the very same JSON. - Works offline. Responses are cached with per-endpoint TTLs;
--offlineserves the cache instead of failing when the network is gone. - Ownership, not just prices. KSEI's monthly register of holders above 1 % is imported into local SQLite with normalised entity names, so "who owns more than 1 % of BBCA" and "what did this fund change last month" are one command each. The monthly IDX files are mirrored to GitHub, so neither you nor the web terminal imports anything by hand.
- Single static binary. Rust, no runtime, Linux / macOS / Windows.
Install
The package is called ihsg-cli; the command it installs is idx
(npm also adds ihsg-cli as an alias).
cargo install ihsg-cli # crates.io, builds from source (Rust 1.88+)
npm install -g github:fzn0x/idx # npm, straight from this repository
npx github:fzn0x/idx stocks quote BBCA # npm, no install
curl -fsSL https://raw.githubusercontent.com/fzn0x/idx/main/install.sh | sh # Linux, macOS
npm installs a small launcher from this repository; the first idx command
downloads the prebuilt binary for your platform from the matching GitHub
release and checks it against the release's SHA256SUMS (so does
install.sh). The binary is stored next to the launcher, or in a per-user
cache when the global npm folder is not writable. On npm 12, which only
installs from git when allowed, add --allow-git=all to the command.
Windows without npm: download idx-<version>-x86_64-pc-windows-msvc.zip from
the releases page. Static Linux
binaries are musl builds and run on any distribution. The development version installs
with cargo install --git https://github.com/fzn0x/idx.
Shell completions:
idx completions bash > ~/.local/share/bash-completion/completions/idx
idx completions zsh > ~/.zfunc/_idx
idx completions fish > ~/.config/fish/completions/idx.fish
idx completions powershell | Out-String | Invoke-Expression
Commands
Global flags work anywhere on the line:
For scripts and agents
idx -o json stocks history TLKM --period 1y --interval 1wk \
| jq '.data.summary.change_pct'
- stdout carries exactly one JSON document; everything else goes to stderr.
- The envelope records
provider,fetched_at,cached,staleandwarnings. - Fields the source did not return are
null. Nothing is estimated. - Exit codes:
0ok ·2usage ·3network/provider ·4not found ·5offline cache miss ·6config.
Full field reference: docs/json-output.md. Configuration and cache: docs/configuration.md.
MCP server
idx mcp serves the Model Context Protocol over stdio, which is what every
local agent launches. idx mcp --http serves the same tools over streamable
HTTP for products that only connect to a URL. idx mcp setup <client> prints
the exact command or config snippet for your agent with the absolute path of
the binary filled in, because GUI apps rarely inherit your shell PATH:
idx mcp setup --list # every supported client
idx mcp setup codex # prints: codex mcp add idx -- /abs/path/idx mcp
idx mcp setup muse # prints the settings.json block Meta's Muse Code expects
A bare idx in the table assumes the binary is on PATH; idx mcp setup
substitutes the absolute path, and --npx swaps in
npx -y ihsg-cli mcp (npm registry; from this repository use
npx -y github:fzn0x/idx mcp). Each entry's remote (HTTP) form and the
config file locations are in docs/mcp.md.
The server lists 36 tools with typed input schemas kept to the subset every
harness accepts (no nullable type arrays, no format or default keywords)
and one-paragraph descriptions. idx_brief is the one-call starting point;
each tool returns the same envelope as -o json, so an agent that learned the
CLI already knows the tools. Failures come back as tool errors carrying
{error: {code, message}, exit_code}.
Bandarmology
"Bandar" is market slang for the big, concentrated money that moves a stock.
idx bandar reads it from the IPOT broker summary, whose top 10 buyers and
top 10 sellers are ranked by lots. For N = 1, 3, 5 and 10 the top N buyers'
value minus the top N sellers' value is the bandar value (in lots, the bandar
volume); its share of all value traded is the reading, with the headline on
the top 5 (--top):
Quiet accumulation is the usual "bandar buying quietly": concentrated buying
while the price stalls or falls. Each reading also gives the top buyers'
average price against the last price (bandar_gain_pct: below zero they sit
under water), how much of the value the top buyers took, the foreign net
flow, and the rules in plain words (reasons). --daily adds the session
series with its cumulative net and streak. The thresholds were set against
the 40 most traded stocks in October 2026, where about half of single
sessions read neutral. They are heuristics, not advice.
idx bandar detect BBCA # last week, top 5 vs top 5
idx bandar detect BBRI --period 1m --daily # with the bandar movement
idx bandar screen --preset quiet-accumulation # buying while the price stalls
idx bandar screen -f 'acc>=5,fpct>=5,gain<0' # with foreigners, under the bandar's average
Data sources
Prices from the free sources are delayed as published; Stockbit is realtime for your own account. This tool is for research and tooling; it is not investment advice and not affiliated with IDX, KSEI, Yahoo, Microsoft or Stockbit.
Web terminal
https://ihsg.midoriresearch.com/terminal runs the same commands in a
browser, no install: brief BBCA, quote BBCA,BBRI, returns BBCA BBRI,
screen pe<10,div>5,mcap>5T --sort div, news ASII, ownership ticker BBCA,
ownership foreign, bandar BBCA --daily, bandar screen --preset big-accumulation, bandar broker YP, actions BBCA, holidays --upcoming,
list --search bank, members, and tools (all 33 MCP tools as buttons). The idx.co.id
commands (foreign flow, top brokers, the calendar, indices) are CLI and MCP
only, because idx.co.id refuses requests from Cloudflare Workers. quote with one symbol also draws a price chart (1D, 5D,
1M, 6M, YTD, 1Y, 5Y) with volume, the previous close and a crosshair readout.
The web bandar screen reads a scan the Worker runs after each close over the
session's 100 most traded stocks; the CLI scans live.
A Cloudflare Worker refreshes a D1 snapshot of the whole
IDX board every minute in trading hours and serves /api/* with the exact JSON
envelopes the CLI prints; everything else is fetched on demand and cached. The
Worker lives in web/ and answers on the custom domain only
(workers_dev = false, Host check in the Worker).
Ownership data pipeline
Nobody imports the KSEI register by hand, and nothing outside the repository can write it:
.github/workflows/ownership.ymlruns at 08:17, 14:17 and 20:17 WIB. It fetches the IDX "Data Kepemilikan Saham" page through a browser-impersonating client, downloads any new or re-published "Pemegang Saham di Atas 1%" workbook, imports every month withidxto prove it parses, and publishes the files plusindex.jsonand parsed JSON parts to theownership-dataprerelease. idx.co.id blocks cloud networks, GitHub's own runners included, so the job runs on a self-hosted runner (an always-on machine with an ordinary connection; set the repository variableOWNERSHIP_RUNNERtoself-hosted). On GitHub's runners it keeps the mirror as is and turns red once the newest register is 45 days old.- The web terminal's Worker reads that release on its minute cron: it checks
index.jsonevery 30 minutes, verifies each part's SHA-256 and loads one part per minute into D1. A month appears only once all its rows are in and the count matches. The newest six months are kept. The Worker has no write endpoint at all. idx ownership import --lateston your machine tries idx.co.id and, when Cloudflare refuses it, downloads the same file from the mirror and checks its SHA-256.IDX_OWNERSHIP_SOURCE=mirrorskips idx.co.id.
Development
cargo build
cargo test # recorded fixtures, no network
cargo clippy --all-targets -- -D warnings
./scripts/smoke.sh # live providers
Architecture, conventions and "how to add a provider" live in AGENTS.md. Contributions: CONTRIBUTING.md.