broker_distribution
Visualize broker-to-broker trade flows for an IDX stock as an SVG diagram showing which brokers bought from which sellers and the amounts transferred.
Instructions
Broker-to-broker flow for an IDX stock, ALWAYS rendered as an SVG diagram laid out BUYER -> SELLER exactly like Stockbit's own Broker Distribution: top buyers on the left, the sellers they bought from on the right. Each seller's bar is that seller's TOTAL, so a partly-filled bar means the buyers shown account for only part of what it sold. For each top broker, WHICH brokers were on the other side of their trades and how much moved between them. broker_summary says how much a broker accumulated; this shows who they accumulated it from.
Returns the diagram as an image AND writes a .svg file, reporting the path in savedTo (pass save_path to choose where). It deliberately does NOT return a table of numbers — the picture is the output. Use broker_summary for per-broker figures.
DATES: pass a period preset, or BOTH from and to (YYYY-MM-DD). from/to override period.
data_type=VALUE is IDR, VOLUME is LOTS (1 lot = 100 shares); the summary states which.
REQUIRES a Stockbit account with at least Rp 10,000,000 total balance — Stockbit gates this feature. If the account does not qualify the tool returns an error saying so.
An empty diagram on a weekend or public holiday is expected, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Window end, YYYY-MM-DD (inclusive). Requires `from`. | |
| from | No | Window start, YYYY-MM-DD. Requires `to`. | |
| theme | No | Palette. Default dark. | |
| period | No | Preset window; default LAST_1_DAY. Ignored when from/to are given. | |
| symbol | Yes | IDX ticker, e.g. BBRI | |
| browser | No | Browser to open Stockbit in, by name, e.g. "Edge". Defaults to STOCKBIT_WEB_BROWSER, else the OS default. | |
| date_to | No | Alias for `to`. | |
| end_date | No | Alias for `to`. | |
| data_type | No | Default VALUE (IDR). VOLUME returns lots (1 lot = 100 shares). | |
| date_from | No | Alias for `from`. | |
| save_path | No | Where to write the .svg. Defaults to charts/ inside the store (~/.stockbit, or $STOCKBIT_STORE_DIR). | |
| start_date | No | Alias for `from`. | |
| top_sources | No | Source brokers to draw (default 8) | |
| top_targets | No | Counterparties to draw; the rest merge into an 'others' band (default 12) | |
| market_board | No | Default REGULER, matching Stockbit's UI. ALL folds in negotiated blocks and changes the numbers a lot. | |
| investor_type | No | Default ALL | |
| open_in_stockbit | No | Open the symbol's Stockbit page in the user's browser. Default true. |