Get investor-type trading flows
tossinvest_get_investor_tradingGet KRX buy/sell values by investor type for KOSPI or KOSDAQ, newest period first, to see if foreigners are net buying or selling.
Instructions
Get KRX buy/sell value broken down by investor type for KOSPI or KOSDAQ, newest period first.
This answers "are foreigners buying or selling?" — the classic Korean-market flow question. Net flow = buyAmount - sellAmount.
Args:
symbol ('KOSPI' | 'KOSDAQ'): only these two are supported here.
interval ('1d' | '1w' | '1mo' | '1y'): the period each record aggregates.
count (number): 1-100, default 10.
until (string, optional): YYYY-MM-DD inclusive upper bound. Pass the previous response's nextUntil to page backwards.
response_format ('markdown' | 'json'): default 'markdown'.
Returns { symbol, interval, count, records: [{ date, updatedAt, individual, foreigner, institution, otherCorporation }], nextUntil }. Each investor entry is { buyAmount, sellAmount }; institution additionally carries a 'breakdown' with seven sub-categories (financialInvestment, insurance, trust, privateEquityFund, bank, otherFinancialInstitution, pensionFund) that sum to the institution totals.
All amounts are KRW integers as strings — there is no currency field. 'foreigner' is the total across registered and unregistered foreign investors. Buy totals across the four categories equal sell totals market-wide. The current day's record is provisional until the close; check updatedAt.
Errors: 400 unsupported-symbol for anything other than KOSPI/KOSDAQ.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of records to return (max 100). | |
| until | No | Inclusive upper bound (YYYY-MM-DD). Use the previous response's nextUntil to page backwards. | |
| symbol | Yes | Only KOSPI and KOSDAQ have investor flow data. | |
| interval | Yes | Aggregation period per record: daily, weekly, monthly or yearly. | |
| response_format | No | Output format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| symbol | Yes | ||
| records | Yes | All amounts are KRW integers, newest first | |
| interval | Yes | ||
| nextUntil | No | Pass as `until` for the next (older) page | |
| truncated | No | ||
| truncation_message | No |