mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 01:35:36 +00:00
feat: foreign flow from IPOT by default (--source ipot|idx)
`idx stocks flow` now reads IPOT by default, which needs nothing installed: per session, the all-investor broker summary gives the value traded and the foreign one gives foreign buying (its footer), the foreign net and selling (buying less the net), across all boards, through the broker summary cache. IPOT's foreign net matched IDX's estimate within 0.3 B on BBCA 2026-10-12 to 16. `--source idx` (and `source` on get_foreign_flow) keeps IDX's trading summary: exact share counts, close and the non-regular share, behind curl-impersonate and Cloudflare. - ForeignFlowDay gains foreign_buy_value, foreign_sell_value and foreign_share_bps for both sources (estimated at the session average for IDX); ForeignFlow gains source, the value totals and rounded. - The table lays out each source's figures; the live smoke runs both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
parent
b137dbf540
commit
8b507d78e2
37 changed files with 2080 additions and 143 deletions
|
|
@ -127,8 +127,10 @@ contract() {
|
|||
echo '(.symbol | type == "string") and (.buyers | length > 0) and (.sellers | length > 0) and all(.buyers[]; (.code | type == "string") and (.value | type == "number")) and (.total_value | type == "number")' ;;
|
||||
"stocks bandar "*)
|
||||
echo 'type == "array" and length > 0 and all(.[]; (.method | type == "string") and (.tiers | length == 4) and (.imbalance_bps | type == "number"))' ;;
|
||||
"stocks flow "*"--source idx"*)
|
||||
echo '(.source == "idx") and (.days | length > 0) and all(.days[]; (.date | type == "string") and (.foreign_buy | type == "number") and (.foreign_sell | type == "number")) and (.foreign_net | type == "number")' ;;
|
||||
"stocks flow "*)
|
||||
echo '(.days | length > 0) and all(.days[]; (.date | type == "string") and (.foreign_buy | type == "number") and (.foreign_sell | type == "number")) and (.foreign_net | type == "number")' ;;
|
||||
echo '(.source == "ipot") and (.days | length > 0) and all(.days[]; (.date | type == "string") and (.foreign_buy_value | type == "number") and (.foreign_sell_value | type == "number")) and (.foreign_net_value | type == "number")' ;;
|
||||
"ownership discover"*)
|
||||
echo 'type == "array" and length > 0 and (.[0].pdf_url | type == "string")' ;;
|
||||
"ownership releases")
|
||||
|
|
@ -229,10 +231,11 @@ if selected stocks; then
|
|||
run_case compare "stocks compare $SYMBOL,BBRI"
|
||||
# BUMI/ADRO/AIMS return non-finite MSN key ratios (Infinity/NaN).
|
||||
run_case compare-nonfinite "stocks compare BUMI,ADRO,AIMS"
|
||||
# Broker summaries (IPOT) and foreign flow (IDX, via curl-impersonate).
|
||||
# Broker summaries and foreign flow (IPOT; --source idx via curl-impersonate).
|
||||
run_new_case broker "stocks broker $SYMBOL"
|
||||
run_new_case bandar "stocks bandar $SYMBOL,BBRI,TLKM"
|
||||
run_new_case flow "stocks flow $SYMBOL --days 3"
|
||||
run_new_case flow-idx "stocks flow $SYMBOL --days 3 --source idx"
|
||||
fi
|
||||
|
||||
if selected ownership; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue