Get stock rankings
tossinvest_get_rankingsGet top stock leaderboards by traded value, volume, or price change for Korean or US markets over selected periods. Find most active stocks, top gainers, and largest losers.
Instructions
Get a top-100 stock leaderboard by traded value, traded volume, or price change, for the Korean or US market over a chosen period.
This is the discovery tool: "what is moving today", "most actively traded Korean stocks this week", "biggest losers this month".
Args:
type: which leaderboard, and implicitly which metric it is sorted by: MARKET_TRADING_AMOUNT — highest traded value, whole market MARKET_TRADING_VOLUME — highest traded volume, whole market TOP_GAINERS — largest price gain (does NOT support duration='realtime') TOP_LOSERS — largest price drop (does NOT support duration='realtime') TOSS_SECURITIES_TRADING_AMOUNT — highest traded value among Toss Securities fills only TOSS_SECURITIES_TRADING_VOLUME — highest traded volume among Toss Securities fills only
market_country ('KR' | 'US'): which market.
duration ('realtime' | '1d' | '1w' | '1mo' | '3mo' | '6mo' | '1y'): ranking period, in trading days.
exclude_investment_caution (boolean): default false. Filter out symbols under a caution designation.
count (number): 1-100, default 100.
response_format ('markdown' | 'json'): default 'markdown'.
Returns { type, marketCountry, duration, count, rankedAt, rankings: [{ rank, symbol, currency, price: { lastPrice, basePrice, changeRate }, tradingVolume, tradingAmount }] }.
Reading the numbers correctly:
tradingVolume / tradingAmount are cumulative over 'duration'. For TOSS_SECURITIES_* they count Toss Securities fills only; otherwise the whole market.
price.basePrice and price.changeRate are measured from the START of 'duration' for TOP_GAINERS/TOP_LOSERS, but against the PREVIOUS CLOSE for every other type.
Fewer than 'count' items can come back (symbols whose quote lookup failed are dropped).
An uncomputed combination returns an empty list with rankedAt null — not an error.
Symbols come back without names; pass them to tossinvest_get_stocks to resolve company names.
Errors: 400 unsupported-ranking-duration for TOP_GAINERS/TOP_LOSERS with duration='realtime'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Which leaderboard. TOP_GAINERS/TOP_LOSERS cannot be combined with duration='realtime'. | |
| count | No | Number of ranked entries to return (max 100). | |
| duration | Yes | Ranking period in trading days. 'realtime' is unavailable for TOP_GAINERS/TOP_LOSERS. | |
| market_country | Yes | 'KR' for Korean stocks, 'US' for US stocks. | |
| response_format | No | Output format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload. | markdown |
| exclude_investment_caution | No | Exclude symbols under an investment-caution designation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| count | Yes | ||
| duration | Yes | ||
| rankedAt | No | null when no ranking has been computed for this combination | |
| rankings | Yes | ||
| truncated | No | ||
| marketCountry | Yes | ||
| truncation_message | No |