feat: shareholder movements from the Stockbit session (ownership movements)

`idx ownership movements [SYMBOL]` and the MCP tool
`get_shareholder_movements` list reported changes in insiders' and major
holders' stakes, newest first, from Stockbit's
/insider/company/majorholder: IDX insider disclosures (any size, with the
trade price) and KSEI changes of holders at 5% and above (Stockbit's
estimated price). Stockbit filters by date range, holder id, action and
source; each page is 50 rows and one request, up to 10 pages, cached an
hour per page under every filter.

Rows keep exact signed share counts and the stake in basis points as
Stockbit rounds it; unknown action labels are kept as `other` rather than
dropped. JSON is {movements, more}; JSONL is one movement per line. The
command lives under `ownership` but needs no import, and `ownership`
commands now take --offline / --no-cache for it.

The per-symbol summary score is the next PR; docs/STOCKBIT.md records the
endpoint's parameters and action types as checked on 2026-11-03.

Claude-Session: https://claude.ai/code/session_01RqPPVeVDrnLoP7NUZmLRxY
This commit is contained in:
Rasyidan Akbar F. 2026-11-03 16:02:26 +07:00
commit ae0ca0c109
43 changed files with 3050 additions and 29 deletions

View file

@ -77,6 +77,7 @@ idx stocks orderbook BBCA # depth, queued orders, foreign flow
idx stocks orderbook BBRI --depth 5
idx stocks actions BBCA # dividends, splits, meetings, ...
idx stocks calendar --kind dividend # cum dates in the next 30 days
idx ownership movements BBCA # insider and major holder buys and sells
idx --provider stockbit stocks quote BBCA # live, not delayed
idx --provider stockbit stocks history BBCA --period 1y # Stockbit's daily candles
idx stockbit logout
@ -201,6 +202,7 @@ What the login adds:
| `stocks history` under `--provider stockbit` | Yahoo | Stockbit's daily candles for `5d` to `1y`; Yahoo for other windows |
| `stocks intraday` | public page | public page |
| `stocks actions`, `stocks calendar` | `AUTHERROR` | corporate actions: one stock's history, or the market's calendar |
| `ownership movements` | `AUTHERROR` | insider and major holder buys and sells, as reported to IDX and KSEI |
The order book is what Stockbit's own app shows. Outside trading it is the
book as the market left it, and the output says so. Foreign buy, sell and net
@ -222,6 +224,6 @@ market or republishing prices. With your login, automated use is tied to your
account: keep it human-paced.
Over MCP, the same data comes from `get_intraday`, `get_orderbook`,
`get_corporate_actions`, `get_corporate_calendar` and `stockbit_status`, and from `get_quotes` and `get_price_history` when the
`get_corporate_actions`, `get_corporate_calendar`, `get_shareholder_movements` and `stockbit_status`, and from `get_quotes` and `get_price_history` when the
server runs with `IDX_PROVIDER=stockbit`. The server never logs in; run
`idx stockbit login` in a terminal.