Tools
Markdownidx-mcp serves these tools. ownership_sync is listed only when the server
starts with --allow-sync. Results that come from a live provider are wrapped
as {data, source, fetched_at, stale}; failures return {error, code, message} with isError set. Either may carry warnings, what idx worked
around (such as a history fallback or a stale cache entry), when there was
any.
analyze_bandar
Section titled “analyze_bandar”Bandarmology for one or more IDX tickers from the broker summary: for the top 1, 3, 5 and 10 brokers per side, buy value minus sell value as basis points of value traded (imbalance_bps), with a signal from big_accumulation (>= +1500) through neutral (within +-500) to big_distribution (<= -1500), headlined by top (default 5). Reports come strongest accumulation first; tickers that fail are listed under failures. A heuristic over end-of-day broker codes: brokers trade for many clients, and both_sides lists brokers whose gross figures overstate their direction. method names the rules applied. With investor foreign or domestic, shares are of that side’s own buying (buy_value) and selling (sell_value); that needs board all.
| Input | Type | Required | Description |
|---|---|---|---|
board |
all / regular / cash / negotiated |
no | Which board’s trades to count (default “all”); “regular” leaves out negotiated block trades. |
date |
string | no | One session, YYYY-MM-DD. Omit date, from and to for the latest session with trades. |
from |
string | no | First session of a range, YYYY-MM-DD (at most 366 days). |
investor |
all / foreign / domestic |
no | Whose trades to count, by investor domicile (default “all”). |
symbols |
array of string | yes | IDX tickers, e.g. [“BBCA”, “BBRI”]; the .JK suffix is optional. At most 20. |
to |
string | no | Last session of the range, YYYY-MM-DD (default today). |
top |
1 / 3 / 5 / 10 |
no | Tier behind the headline signal: 1, 3, 5 or 10 brokers per side (default 5). |
analyze_stock
Section titled “analyze_stock”Analyze one IDX ticker: technical signals (trend, RSI, MACD, moving averages) and fundamental growth, valuation, and risk ratings. Analyses that fail are listed under errors; the call fails only if every analysis fails.
| Input | Type | Required | Description |
|---|---|---|---|
kinds |
array of technical / growth / valuation / risk |
no | Analyses to run (default: all). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
compare_stocks
Section titled “compare_stocks”Compare fundamental reports (growth, valuation, risk) across IDX tickers. Tickers that fail are listed under failures.
| Input | Type | Required | Description |
|---|---|---|---|
symbols |
array of string | yes | IDX tickers, e.g. [“BBCA”, “BBRI”]; the .JK suffix is optional. At most 20. |
get_broker_summary
Section titled “get_broker_summary”Broker summary for one IDX ticker: the top 10 buyers and top 10 sellers by lots over a session or date range, each with lots (1 lot = 100 shares), value and average price in IDR, plus totals. Buyers and sellers are ranked separately and gross, so a broker can appear on both sides. End of day only (IDX hides broker codes during trading); kind is the broker’s own status (local, foreign, state_owned), not its clients’. With investor foreign or domestic, each row is that broker’s foreign or domestic clients’ trades, total_value is null, and buy_value/sell_value give what that side bought and sold (sell_value needs board all). rounded = true means figures of a million and more carry one decimal of precision.
| Input | Type | Required | Description |
|---|---|---|---|
board |
all / regular / cash / negotiated |
no | Which board’s trades to count (default “all”); “regular” leaves out negotiated block trades. |
date |
string | no | One session, YYYY-MM-DD. Omit date, from and to for the latest session with trades. |
from |
string | no | First session of a range, YYYY-MM-DD (at most 366 days). |
investor |
all / foreign / domestic |
no | Whose trades to count, by investor domicile (default “all”). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
to |
string | no | Last session of the range, YYYY-MM-DD (default today). |
get_company
Section titled “get_company”Company data for one IDX ticker: profile, financial statements, earnings, analyst sentiment, insights, and news. News items carry relevance: company (about this ticker) first, then market (general market news). Sections that fail are listed under errors; the call fails only if every section fails.
| Input | Type | Required | Description |
|---|---|---|---|
sections |
array of profile / financials / earnings / sentiment / insights / news |
no | Sections to fetch (default: all). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
get_corporate_actions
Section titled “get_corporate_actions”Corporate actions of one IDX stock from the user’s own Stockbit session, newest first: kind (dividend, stock-dividend, bonus, rights, warrant, split, reverse-split, meeting, expose, ipo, tender), date (the cum date for dividends, bonuses, rights and splits, i.e. the last day to buy and be entitled, or the ex date when cum_date is absent; else the event’s first day), ex_date, record_date, pay_date, and per kind cash_per_share (IDR, may have decimals; in currency, an ISO code, when that is present), ratio {old, new} (1:5 split = 1 share becomes 5; 655:104 rights = 104 rights per 655 held), factor (price adjustment), price (rights, warrant exercise, tender or IPO price, IDR), period and exercise {start, end}, shares, percentage_bps, time, venue. Absent fields are omitted. One Stockbit request per kind (about 1 s each on a cold cache, then cached 6 hours). AUTHERROR means there is no session: call stockbit_status, then stockbit_login.
| Input | Type | Required | Description |
|---|---|---|---|
kinds |
array of dividend / stock-dividend / bonus / rights / warrant / split / reverse-split / meeting / expose / ipo / tender |
no | Kinds to list (default: every kind but “ipo”). Each kind is one request to Stockbit. |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
get_corporate_calendar
Section titled “get_corporate_calendar”Corporate actions across IDX from the user’s own Stockbit session, oldest first, dated from from to to (default today and the next 30 days), plus rights trading, tender offers and IPO offers still open in that range (their period overlaps it, though date may be earlier): upcoming cum dates, meetings, exposes, rights, warrants, IPOs and tender offers, and the past year. Each item has the same fields as get_corporate_actions, with symbol. One Stockbit request per kind (about 1 s each on a cold cache, then cached 6 hours); pass kinds to ask for less. AUTHERROR means there is no session: call stockbit_status, then stockbit_login.
| Input | Type | Required | Description |
|---|---|---|---|
from |
string | no | First day, YYYY-MM-DD (default today). |
kinds |
array of dividend / stock-dividend / bonus / rights / warrant / split / reverse-split / meeting / expose / ipo / tender |
no | Kinds to list (default: every kind). Each kind is one request to Stockbit. |
to |
string | no | Last day, YYYY-MM-DD (default 30 days after from; at most 366 days). |
get_foreign_flow
Section titled “get_foreign_flow”Foreign investors’ buying and selling of one IDX ticker, session by session (oldest first), with range totals; end of day. With source “ipot” (default): foreign_buy_value, foreign_sell_value and foreign_net_value in IDR across all boards, value traded, and foreign_share_bps (foreign share of trading); share counts, close and non_regular_bps are null, and rounded = true means one decimal of precision. With “idx”: exact foreign share counts on the regular board, values estimated at the session’s average price, the close, change_bps and non_regular_bps.
| Input | Type | Required | Description |
|---|---|---|---|
days |
integer | no | Latest sessions (default 10, at most 60). Omit when giving from/to. |
from |
string | no | First session of a range, YYYY-MM-DD (at most 92 days). |
source |
ipot / idx |
no | Where the figures come from (default “ipot”): “ipot” gives foreign buy, sell and net value across all boards; “idx” gives exact share counts, the close and the non-regular share, but needs curl-impersonate and may be blocked (HTTP 403). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
to |
string | no | Last session of the range, YYYY-MM-DD (default today). |
get_intraday
Section titled “get_intraday”Today’s session of one IDX stock or index from Stockbit’s public page (no login), whichever provider the server uses: quote (price, change, volume, market_status, bid/offer only while the market is open, session_note) and points, the price per minute in WIB, oldest first. Delayed at least 10 minutes; no per-minute volume. Empty points means the stock did not trade this session (see session_note), not an error. quote.behind_session is true when the chart is from before the latest IDX session (a holiday, or Stockbit lagging), as in get_quotes. UPSTREAMBLOCKED means stockbit.com refused this machine (HTTP 403): do not retry at once.
| Input | Type | Required | Description |
|---|---|---|---|
symbol |
string | yes | IDX ticker, e.g. “BBCA”; indices as “^JKSE” or “IHSG”. |
tail |
integer | no | Only the latest N minutes (default: the whole session, at most 400). |
get_investor_holdings
Section titled “get_investor_holdings”Every IDX holding (above 1%) of one investor, matched by name.
| Input | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Investor name or part of it, e.g. “DWIMURIA”; the closest match is used. |
get_orderbook
Section titled “get_orderbook”Order book of one IDX stock from the user’s own Stockbit session: bids and offers (best price first) of {price, shares, orders}, the session’s OHLC, volume (shares), value and frequency, and foreign buy/sell/net in IDR (null while Stockbit marks them not current, as during trading; get_foreign_flow has them per session). market_status is Stockbit’s state, verbatim: STATE_NAME_SESSION_1 or _2 is trading; in any other state the book is as the market left it. AUTHERROR means there is no session: call stockbit_status, then stockbit_login for a URL the user can open.
| Input | Type | Required | Description |
|---|---|---|---|
depth |
integer | no | Price levels per side (default 10, at most 50). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
get_ownership_changes
Section titled “get_ownership_changes”Holder changes (new, exited, increased, decreased) between two KSEI release dates, optionally for one ticker. Rows come largest change first, one page at a time: summary covers all of them (counts by type, tickers with the most changes), and next_offset is the offset for the next page, or null after the last.
| Input | Type | Required | Description |
|---|---|---|---|
from |
string | yes | Earlier release date, YYYY-MM-DD (see ownership_status). |
limit |
integer | no | Rows per page (default 200, at most 300); total reports the full count. |
offset |
integer | no | Rows to skip, for the next page: the previous response’s next_offset. |
ticker |
string | no | Only this ticker’s changes. |
to |
string | yes | Later release date, YYYY-MM-DD. |
get_price_history
Section titled “get_price_history”OHLCV price history for one IDX ticker.
| Input | Type | Required | Description |
|---|---|---|---|
interval |
1d / 1wk / 1mo |
no | Candle size (default “1d”). |
period |
1d / 5d / 1mo / 3mo / 6mo / 1y / 2y / 5y |
no | Lookback window (default “3mo”). |
symbol |
string | yes | IDX ticker, e.g. “BBCA”. |
get_quotes
Section titled “get_quotes”Latest quotes (price, change, volume, 52-week range, market cap) for one or more IDX tickers. as_of is the last trade in WIB; behind_session is true when that is before the latest IDX session, so the price is not that session’s close: the provider lags, the stock did not trade, or the day was an exchange holiday. When the server runs with the stockbit provider, quotes also carry market_status (“open” while the regular market trades, else “close”, with or without a login), bid/offer (best price, only while the market is open) and session_note (suspended, delisted, no trades); Stockbit data is delayed at least 10 minutes.
| Input | Type | Required | Description |
|---|---|---|---|
symbols |
array of string | yes | IDX tickers, e.g. [“BBCA”, “BBRI”]; the .JK suffix is optional. At most 20. |
get_shareholder_movements
Section titled “get_shareholder_movements”Reported changes in insiders’ and major holders’ stakes in IDX stocks, from the user’s own Stockbit session, newest first: IDX insider disclosures (directors, commissioners and other insiders, any size, with the trade price) and KSEI changes of holders at 5% and above (price estimated: price_estimated). One stock’s, or the market’s without symbol. Shares are exact and signed (shares_change < 0 is a sale); percentages are basis points as Stockbit rounds them, so a small insider can read 0. more is true when rows remain past pages; incomplete, when present, says a later page failed and the rows are those read before it (retry later for the rest). These are filings, not signals: many insiders buying at one price on one day is usually a share plan, and rows appear days after the change. AUTHERROR means there is no session: call stockbit_status, then stockbit_login.
| Input | Type | Required | Description |
|---|---|---|---|
action |
buy / sell / transfer / cross / corporate-action |
no | Only this kind of movement; “corporate-action” covers rights issues, private placements and the like. |
from |
string | no | First day, YYYY-MM-DD. |
holder_id |
string | no | One holder’s movements: the holder_id of a row. |
pages |
integer | no | Pages of 50 rows (default 1, at most 10); each page is one request to Stockbit. |
source |
idx / ksei |
no | “idx” (insider disclosures, any size) or “ksei” (holders at 5% and above). |
symbol |
string | no | IDX ticker, e.g. “BBCA”; omit for the whole market. |
to |
string | no | Last day, YYYY-MM-DD. |
get_shareholders
Section titled “get_shareholders”Shareholders above 1% of an IDX ticker from the latest KSEI release, with concentration metrics (top1, top3, HHI, free float).
| Input | Type | Required | Description |
|---|---|---|---|
ticker |
string | yes | IDX ticker, e.g. “BBCA”. |
ownership_status
Section titled “ownership_status”Ownership database status: whether it has data, and the imported KSEI release dates.
No inputs.
ownership_sync
Section titled “ownership_sync”Download or refresh the KSEI ownership snapshot (several MB) into the local database.
| Input | Type | Required | Description |
|---|---|---|---|
force |
boolean | no | Re-download even when the local snapshot is current. |
screen_stocks
Section titled “screen_stocks”Run a stock screen (top/worst performers, high dividend, low P/E, 52-week highs/lows, high volume, large cap). Rows carry as_of and, for the IDX region, behind_session as in get_quotes.
| Input | Type | Required | Description |
|---|---|---|---|
filter |
top-performers / worst-performers / high-dividend / low-pe / 52w-high / 52w-low / high-volume / large-cap |
no | Screen to run (default “top-performers”). |
limit |
integer | no | Maximum results (default 50, at most 200). |
region |
id / us / sg / hk / jp |
no | Market region (default “id”). |
search_investors
Section titled “search_investors”Search investor names in the KSEI ownership database.
| Input | Type | Required | Description |
|---|---|---|---|
limit |
integer | no | Maximum results (default 20, at most 100). |
query |
string | yes | Full-text query over investor names. |
stockbit_login
Section titled “stockbit_login”Start a Stockbit sign-in and return at once; this call does not wait for it. With method auto (the default), idx-mcp opens a browser window on Stockbit’s own sign-in page when its machine has a display and is not reached over SSH (method: "browser" in the answer): the user signs in there and the window closes by itself. Otherwise it serves a page on 127.0.0.1 (method: "page", with url and an ssh -L forward for a browser on another machine) that takes stockbit.com’s session cookie from the user’s own browser. Never ask the user for their password, and never type it. Then poll stockbit_status until sign_in.state is signed_in or failed. A session that already works answers state signed_in without opening anything; a second call while one is waiting returns it again (already_open).
| Input | Type | Required | Description |
|---|---|---|---|
method |
auto / browser / page |
no | “auto” (default): a browser window when idx-mcp’s machine has a display and no SSH, else the local page; “browser” or “page” picks one. |
stockbit_status
Section titled “stockbit_status”Whether a Stockbit session is stored (or seeded by IDX_STOCKBIT_REFRESH_TOKEN) and when its tokens expire; never the tokens. Without one, get_orderbook fails and stockbit-provider quotes use Stockbit’s delayed public page; the user adds one with stockbit_login, or idx stockbit login in a terminal. After stockbit_login, sign_in.state says whether that sign-in is waiting, signed_in or failed (with sign_in.error). While it waits, sign_in.warning is the latest problem it hit, such as Stockbit refusing the session the user signed in with: pass it on, since the user may need to sign in again.
No inputs.