mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
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:
parent
1b72c3ed6b
commit
ae0ca0c109
43 changed files with 3050 additions and 29 deletions
|
|
@ -36,6 +36,32 @@ two releases. `ticker` also reports concentration: the top holder's share,
|
|||
the top three, the Herfindahl index (HHI) and the free float (shares held by
|
||||
holders below 1%).
|
||||
|
||||
## Insider and major holder movements
|
||||
|
||||
With your own Stockbit login (`idx stockbit login`, see [Stockbit](/cli/stockbit/)),
|
||||
`movements` lists reported changes in holders' stakes, newest first. It reads
|
||||
Stockbit live and needs no import:
|
||||
|
||||
```bash
|
||||
idx ownership movements BBCA # one stock, 50 rows
|
||||
idx ownership movements # the whole market
|
||||
idx ownership movements --action sell --source ksei --pages 3
|
||||
idx ownership movements --from 2026-10-01 --to 2026-10-31
|
||||
idx ownership movements --holder 1000004481 # one holder's history
|
||||
```
|
||||
|
||||
Two sources share the list. `IDX` rows are insider disclosures: directors,
|
||||
commissioners and other insiders, at any size, with the trade price. `KSEI`
|
||||
rows are changes of holders at 5% and above, which report no price; Stockbit
|
||||
estimates one, shown with `~`. `--holder` takes the number in the HOLDER ID
|
||||
column. Shares are exact. Stakes are as Stockbit rounds them, so a director's
|
||||
small holding reads `<0.01%`.
|
||||
|
||||
These are filings, not signals. Many insiders buying at one price on one day
|
||||
is usually a share plan, transfers are not trades, and a row appears days
|
||||
after the change. Each page is 50 rows and one request to Stockbit (`--pages`
|
||||
up to 10); answers are cached for an hour.
|
||||
|
||||
## Import reports yourself
|
||||
|
||||
The snapshot covers most needs. To load a month it lacks, or older history,
|
||||
|
|
|
|||
|
|
@ -1158,6 +1158,7 @@ Commands:
|
|||
concentration Rank tickers by ownership concentration
|
||||
flow Show Bing institutional flow for a ticker
|
||||
changes Diff two KSEI releases
|
||||
movements Insider and major holder buys and sells, as reported (Stockbit login)
|
||||
graph Ownership network graph
|
||||
resolve Manual entity resolution workflow
|
||||
releases List imported KSEI releases
|
||||
|
|
@ -1547,6 +1548,79 @@ Examples:
|
|||
idx ownership changes --from 2026-08-31 --to 2026-09-30
|
||||
```
|
||||
|
||||
### `idx ownership movements`
|
||||
|
||||
```text
|
||||
Reported changes in holders' stakes from your own Stockbit session (`idx stockbit login`), newest first: IDX insider disclosures (directors, commissioners and other insiders, any size, with the trade price) and KSEI's changes of holders at 5% and above (Stockbit estimates their price). One stock's, or the whole market's without SYMBOL. Each page is 50 rows and one request; answers are cached for an hour.
|
||||
|
||||
These are filings, not signals: a share plan shows as many insiders buying at one price, and a row appears days after the change.
|
||||
|
||||
Usage: idx ownership movements [OPTIONS] [SYMBOL]
|
||||
|
||||
Arguments:
|
||||
[SYMBOL]
|
||||
Single ticker symbol (e.g. BBCA); omit for the whole market
|
||||
|
||||
Options:
|
||||
--from <FROM>
|
||||
First day, YYYY-MM-DD
|
||||
|
||||
-o, --output <OUTPUT>
|
||||
Output format [default: auto = table on a terminal, json when piped]
|
||||
|
||||
[possible values: auto, table, json, jsonl]
|
||||
|
||||
--no-color
|
||||
Disable colored output
|
||||
|
||||
--to <TO>
|
||||
Last day, YYYY-MM-DD
|
||||
|
||||
--holder <ID>
|
||||
One holder's movements, by the id in the HOLDER ID column
|
||||
|
||||
-q, --quiet
|
||||
Suppress non-essential output
|
||||
|
||||
--action <ACTION>
|
||||
Only this kind of movement
|
||||
|
||||
[possible values: buy, sell, transfer, cross, corporate-action]
|
||||
|
||||
-v, --verbose...
|
||||
Increase verbosity (-v, -vv)
|
||||
|
||||
--provider <PROVIDER>
|
||||
Market data provider [default: general.provider, else msn]
|
||||
|
||||
[possible values: yahoo, msn, stockbit]
|
||||
|
||||
--source <SOURCE>
|
||||
Only IDX insider disclosures or KSEI 5% holder changes
|
||||
|
||||
[possible values: idx, ksei]
|
||||
|
||||
--offline
|
||||
Run without network requests
|
||||
|
||||
--pages <PAGES>
|
||||
Pages of 50 rows to read (1-10)
|
||||
|
||||
[default: 1]
|
||||
|
||||
--no-cache
|
||||
Bypass local cache
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
Examples:
|
||||
idx ownership movements BBCA
|
||||
idx ownership movements --action sell --source ksei
|
||||
idx ownership movements --from 2026-10-01 --to 2026-10-31 --pages 5
|
||||
idx ownership movements --holder 1000004481 # one holder's history (HOLDER ID column)
|
||||
```
|
||||
|
||||
### `idx ownership graph`
|
||||
|
||||
```text
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ description: idx-mcp serves idx's stock and ownership data to AI agents over MCP
|
|||
|
||||
`idx-mcp` is a [Model Context Protocol](https://modelcontextprotocol.io)
|
||||
server over stdio. It gives an agent the same data as the `idx` CLI, as
|
||||
[20 tools](/mcp/tools/) (plus an opt-in `ownership_sync`): quotes, today's
|
||||
session by the minute, the order book and corporate actions (with a Stockbit
|
||||
[21 tools](/mcp/tools/) (plus an opt-in `ownership_sync`): quotes, today's
|
||||
session by the minute, the order book, corporate actions and insider movements (with a Stockbit
|
||||
login), price history, screening, company data, analysis, comparison, broker summaries,
|
||||
bandarmology, foreign flow, and the KSEI ownership queries.
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,20 @@ Latest quotes (price, change, volume, 52-week range, market cap) for one or more
|
|||
| --- | --- | --- | --- |
|
||||
| `symbols` | array of string | yes | IDX tickers, e.g. ["BBCA", "BBRI"]; the `.JK` suffix is optional. At most 20. |
|
||||
|
||||
## `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`. 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`
|
||||
|
||||
Shareholders above 1% of an IDX ticker from the latest KSEI release, with concentration metrics (top1, top3, HHI, free float).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue