idx-cli/web/src/content/docs/cli/stocks.md
hermes 1796e58105 feat(news): rank this company's news first and label each item
MSN's feed for a stock is often mostly general market news: of 10 items,
ADRO, BREN and CUAN had none about the company, BBRI one, yet they were
presented as the company's news. Fetch at least 50 items, label each
`relevance: company` (tagged by MSN with the stock's instrument id, or
naming the ticker or the company) or `market`, and return company items
first, newest first, trimmed to --limit.

Company names come from the quote's short and display names, best
effort: MSN tags Telkom articles with its NYSE ADR, not TLKM, so names
catch what tags miss. Classification stays a pure function in parse_news.

Output change, intentional: news JSON gains `relevance`, the table an
ABOUT column (goldens regenerated), and the get_company tool description
explains the field (tools.json and the website tools page regenerated).
News cache keys change so entries without the field are not reused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
2026-10-16 09:54:30 +00:00

2 KiB

title description
Stocks Quotes, history, company data, analysis and screening.

All stocks commands take IDX tickers (BBCA, or BBCA.JK). Every flag is listed in the command reference.

Quotes and history

idx stocks quote BBCA BBRI,BMRI
idx stocks history BBCA --period 1y --interval 1wk

quote takes several tickers, separated by spaces or commas, or - to read them from stdin. history takes --period (1d to 5y) and --interval (1d, 1wk, 1mo).

Company data

Command What it shows
profile sector, industry, description, contacts and officers
financials income, balance sheet and cash flow statements (--statement income,balance)
earnings reported and estimated earnings
sentiment crowd sentiment
insights AI insights from the provider
news recent news, this company's first (ABOUT = company), then general market news (market)

Analysis

Command What it computes
technical trend, RSI, MACD, moving averages and signals
growth revenue and earnings growth rating
valuation P/E, P/B, ROE, net margin and EV/EBITDA, with a rating
risk debt to equity, current ratio and ROA, with a rating
fundamental growth, valuation and risk in one report
compare fundamental for several tickers side by side
idx stocks fundamental BBRI
idx stocks compare BBCA BBRI BMRI

Screening

idx stocks screen --filter high-dividend --limit 20

Filters: top-performers (default), worst-performers, high-dividend, low-pe, 52w-high, 52w-low, high-volume, large-cap.

Screen results pipe straight into compare:

idx stocks screen --filter high-dividend | jq -r '.[].symbol' | idx stocks compare -

Providers

MSN is the default for quotes, company data and screening; Yahoo serves price history. Switch with IDX_PROVIDER=msn|yahoo and IDX_HISTORY_PROVIDER=auto|yahoo|msn, or the matching config keys.